10167 unable to check out illumos-gate on Windows Reviewed by: Reviewed by: Approved by:
Review Request #2185 — Created July 16, 2019 and submitted
Information | |
---|---|
gdamore | |
illumos-gate | |
master | |
75da172... | |
Reviewers | |
general | |
10167 unable to check out illumos-gate on Windows Reviewed by: Reviewed by: Approved by:
Test build in progress. git pbhck verified by hand -- this includes special test cases to keep us from needing to fix this in the future.
-
-
usr/src/tools/scripts/git-pbchk.py (Diff revision 1) Have you tested this with toold built both against python2 and python3?
-
usr/src/tools/scripts/git-pbchk.py (Diff revision 1) Rather than duplicating the entire
gen_files()
here, I would add an extra parameter togen_files()
.Something like
def gen_files(root, parent, paths, exclude, filter=None): ... if filter is None: filter = lambda x: os.path.isfile(x) ... def gen(select=None): ... if (filter(path) and not empty and select(path) and not exclude(abspath)): yield path
Then gen_links can be implemented as:
def gen_links(root, parent, paths, exclude) return gen_files(root, parent, paths, exclude, lambda x: os.path.islink(x))
or the call to gen_links() could just be replaced with this.
-
usr/src/tools/scripts/git-pbchk.py (Diff revision 1) This is not necessary, only symlinks will be returned from the
flist()
generator. -
usr/src/tools/scripts/git-pbchk.py (Diff revision 1) Have you tried using a pre-compiled regexp for this (and the previous test)? It should be significantly faster for large changesets.
Change Summary:
Incorporated review feedback. Thanks Andy Fiddaman!
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+93 -11) |
-
-
usr/src/tools/scripts/git-pbchk.py (Diff revision 2) This should be moved up out of this loop. It does not need to be done each iteration.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+93 -11) |