equal
deleted
inserted
replaced
88 ): |
88 ): |
89 raise error.InputError( |
89 raise error.InputError( |
90 _(b"path contains illegal component: %s") % path |
90 _(b"path contains illegal component: %s") % path |
91 ) |
91 ) |
92 # Windows shortname aliases |
92 # Windows shortname aliases |
93 for p in parts: |
93 if b"~" in path: |
94 if b"~" in p: |
94 for p in parts: |
95 first, last = p.split(b"~", 1) |
95 if b"~" in p: |
96 if last.isdigit() and first.upper() in [b"HG", b"HG8B6C"]: |
96 first, last = p.split(b"~", 1) |
97 raise error.InputError( |
97 if last.isdigit() and first.upper() in [b"HG", b"HG8B6C"]: |
98 _(b"path contains illegal component: %s") % path |
98 raise error.InputError( |
99 ) |
99 _(b"path contains illegal component: %s") % path |
|
100 ) |
100 if b'.hg' in _lowerclean(path): |
101 if b'.hg' in _lowerclean(path): |
101 lparts = [_lowerclean(p) for p in parts] |
102 lparts = [_lowerclean(p) for p in parts] |
102 for p in b'.hg', b'.hg.': |
103 for p in b'.hg', b'.hg.': |
103 if p in lparts[1:]: |
104 if p in lparts[1:]: |
104 pos = lparts.index(p) |
105 pos = lparts.index(p) |