Show More
@@ -814,9 +814,15 b' class path_auditor(object):' | |||
|
814 | 814 | return |
|
815 | 815 | normpath = os.path.normcase(path) |
|
816 | 816 | parts = splitpath(normpath) |
|
817 | if (os.path.splitdrive(path)[0] or parts[0] in ('.hg', '') | |
|
817 | if (os.path.splitdrive(path)[0] or parts[0] in ('.hg', '.hg.', '') | |
|
818 | 818 | or os.pardir in parts): |
|
819 | 819 | raise Abort(_("path contains illegal component: %s") % path) |
|
820 | if '.hg' in path: | |
|
821 | for p in '.hg', '.hg.': | |
|
822 | if p in parts[1:-1]: | |
|
823 | pos = parts.index(p) | |
|
824 | base = os.path.join(*parts[:pos]) | |
|
825 | raise Abort(_('path %r is inside repo %r') % (path, base)) | |
|
820 | 826 | def check(prefix): |
|
821 | 827 | curpath = os.path.join(self.root, prefix) |
|
822 | 828 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now