Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHGb8bbe589fd47: narrowspec: consistently use set() to copy sets
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
indygreg |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | hgext/narrow/narrowspec.py (2 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 |
([], set(['path:.'])) | ([], set(['path:.'])) | ||||
>>> restrictpatterns({'f1/../f2/fc2'}, {}, ['f1','f2'], []) | >>> restrictpatterns({'f1/../f2/fc2'}, {}, ['f1','f2'], []) | ||||
(set(['f2/fc2']), {}) | (set(['f2/fc2']), {}) | ||||
>>> restrictpatterns({'f1/../f3/fc3'}, {}, ['f1','f2'], []) | >>> restrictpatterns({'f1/../f3/fc3'}, {}, ['f1','f2'], []) | ||||
([], set(['path:.'])) | ([], set(['path:.'])) | ||||
>>> restrictpatterns({'f1/$non_exitent_var'}, {}, ['f1','f2'], []) | >>> restrictpatterns({'f1/$non_exitent_var'}, {}, ['f1','f2'], []) | ||||
(set(['f1/$non_exitent_var']), {}) | (set(['f1/$non_exitent_var']), {}) | ||||
""" | """ | ||||
res_excludes = req_excludes.copy() | res_excludes = set(req_excludes) | ||||
res_excludes.update(repo_excludes) | res_excludes.update(repo_excludes) | ||||
if not req_includes: | if not req_includes: | ||||
res_includes = set(repo_includes) | res_includes = set(repo_includes) | ||||
elif 'path:.' not in repo_includes: | elif 'path:.' not in repo_includes: | ||||
res_includes = [] | res_includes = [] | ||||
for req_include in req_includes: | for req_include in req_includes: | ||||
req_include = util.expandpath(util.normpath(req_include)) | req_include = util.expandpath(util.normpath(req_include)) | ||||
if req_include in repo_includes: | if req_include in repo_includes: |