summaryrefslogtreecommitdiffstats
path: root/platform_utils_win32.py
Commit message (Collapse)AuthorAgeFilesLines
* flake8: Suppress "F821 undefined name" inline for Python 2 namesDavid Pursehouse2020-02-151-2/+2
| | | | | | | | | | | | | | | | All of the instances of this are related to Python 2 names that don't exist in Python 3, and the warnings are raised when running flake8 on Python 3. All of these will go away once we completely remove support for Python 2, so just suppress them inline. We don't globally suppress the check so that we will still see legitimate errors if/when they occur in new code. Change-Id: Iccf955f50abfc9f83b371fc0af6cceb51037456f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255039 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* pyflakes: Fix remaining "E501 line too long" warningsDavid Pursehouse2020-02-131-1/+2
| | | | | | | | | | | We increased the max line length to 100 columns which got rid of the majority of these warnings, but there were still a few lines that exceeded 100 columns. Change-Id: Ib3372868ca2297f83073a14f91c8ae3df9d0d0e6 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254699 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
* [Win32] Make platform_utils compatible for Python3Remy Böhmer2020-02-061-4/+9
| | | | | | | | | | On Python 3 several imports are to be imported from different locations. Signed-off-by: Remy Böhmer <linux@bohmer.net> Change-Id: I4f243d145f65e38f74743a742583cfc5c5d76deb Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/249610 Reviewed-by: Mike Frysinger <vapier@google.com>
* Fix a typoRostislav Krasny2020-01-251-3/+3
| | | | | | | Change-Id: I1d1d1c7ec6c0c706eb08ceb803c37e1ce1baf8b3 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/251834 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Rostislav Krasny <rostigm@gmail.com>
* Make _preserve_encoding in platform_utils_win32 compatible with Python 3Rostislav Krasny2020-01-241-0/+5
| | | | | | | | Bug: https://crbug.com/gerrit/12145 Change-Id: I01d1ef96ff7b474f55ed42ecc13bd5943006d3b5 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/251833 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Rostislav Krasny <rostigm@gmail.com>
* set default file encoding to utf-8Mike Frysinger2019-06-131-0/+1
| | | | | | | | There's no reason to support any other encoding in these files. This only affects the files themselves and not streams they open. Bug: https://crbug.com/gerrit/10418 Change-Id: I053cb40cd3666ce5c8a0689b9dd938f24ca765bf
* platform_utils_win32: remove an unnecessary workaroundРоман Донченко2019-03-211-12/+5
| | | | | | | | | | The comment in _create_symlink is incorrect. The return value of CreateSymbolicLink is as documented, it was just declared with the wrong return type. The actual return type is BOOLEAN, not BOOL. Fixing this allows us to simplify the code a bit. Change-Id: I4d2190a50d45ba41dd9814bf7079a5784fc0a366
* Windows: Add support for creating symlinks as an unprivileged userRenaud Paquay2018-10-031-7/+15
| | | | | | | | | | See https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/ for announcement of new flag. This change follow the same pattern as what was done in "go": https://github.com/golang/go/pull/24307/files#diff-b87bc12e4da2497308f9ef746086e4f0 Change-Id: If1e99fefdd3f787598e695731019c34b9bfcd1c2
* Implement islink, readlink and realpath using Win32 apiRenaud Paquay2017-08-311-5/+159
| | | | Change-Id: I18452cbb32d24db73601ad10485dbe6bb278731c
* Add support for creating symbolic links on WindowsRenaud Paquay2017-05-291-0/+63
Replace all calls to os.symlink with platform_utils.symlink. The Windows implementation calls into the CreateSymbolicLinkW Win32 API, as os.symlink is not supported. Separate the Win32 API definitions into a separate module platform_utils_win32 for clarity. Change-Id: I0714c598664c2df93383734e609d948692c17ec5