diff options
author | Renaud Paquay <rpaquay@google.com> | 2018-09-27 10:46:58 -0700 |
---|---|---|
committer | Renaud Paquay <rpaquay@google.com> | 2018-10-22 08:16:35 -0700 |
commit | bed8b62345e484b27e048e8f21280c5611f795df (patch) | |
tree | 4efc8203f0a092428377ebc3e3494f01fdb9b90c /subcmds/status.py | |
parent | b3133a31642ea88f0e4fe9c382411d43278dc9e4 (diff) | |
download | git-repo-bed8b62345e484b27e048e8f21280c5611f795df.tar.gz |
Add support for long paths
* Add more file i/o wrappers in platform_utils to allow using
long paths (length > MAX_PATH) on Windows.
* Paths using the long path syntax ("\\?\" prefix) should never
escape the platform_utils API surface area, so that this
specific syntax is not visible to the rest of the repo code base.
* Forward many calls from os.xxx to platform_utils.xxx in various place
to ensure long paths support, specifically when repo decides to delete
obsolete directories.
* There are more places that need to be converted to support long paths,
this commit is an initial effort to unblock a few common use cases.
* Also, fix remove function to handle directory symlinks
Change-Id: If82ccc408e516e96ff7260be25f8fd2fe3f9571a
Diffstat (limited to 'subcmds/status.py')
-rw-r--r-- | subcmds/status.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/subcmds/status.py b/subcmds/status.py index b47c8736..773f22d4 100644 --- a/subcmds/status.py +++ b/subcmds/status.py | |||
@@ -26,6 +26,7 @@ import itertools | |||
26 | import os | 26 | import os |
27 | 27 | ||
28 | from color import Coloring | 28 | from color import Coloring |
29 | import platform_utils | ||
29 | 30 | ||
30 | class Status(PagedCommand): | 31 | class Status(PagedCommand): |
31 | common = True | 32 | common = True |
@@ -115,7 +116,7 @@ the following meanings: | |||
115 | """find 'dirs' that are present in 'proj_dirs_parents' but not in 'proj_dirs'""" | 116 | """find 'dirs' that are present in 'proj_dirs_parents' but not in 'proj_dirs'""" |
116 | status_header = ' --\t' | 117 | status_header = ' --\t' |
117 | for item in dirs: | 118 | for item in dirs: |
118 | if not os.path.isdir(item): | 119 | if not platform_utils.isdir(item): |
119 | outstring.append(''.join([status_header, item])) | 120 | outstring.append(''.join([status_header, item])) |
120 | continue | 121 | continue |
121 | if item in proj_dirs: | 122 | if item in proj_dirs: |