##// END OF EJS Templates
pathauditor: preserve case in abort messages...
FUJIWARA Katsunori -
r15665:081e795c stable
parent child Browse files
Show More
@@ -87,7 +87,7 b' class pathauditor(object):'
87 87 # AIX ignores "/" at end of path, others raise EISDIR.
88 88 if util.endswithsep(path):
89 89 raise util.Abort(_("path ends in directory separator: %s") % path)
90 parts = util.splitpath(normpath)
90 parts = util.splitpath(path)
91 91 if (os.path.splitdrive(path)[0]
92 92 or parts[0].lower() in ('.hg', '.hg.', '')
93 93 or os.pardir in parts):
@@ -101,11 +101,16 b' class pathauditor(object):'
101 101 raise util.Abort(_('path %r is inside nested repo %r')
102 102 % (path, base))
103 103
104 normparts = util.splitpath(normpath)
105 assert len(parts) == len(normparts)
106
104 107 parts.pop()
108 normparts.pop()
105 109 prefixes = []
106 110 while parts:
107 111 prefix = os.sep.join(parts)
108 if prefix in self.auditeddir:
112 normprefix = os.sep.join(normparts)
113 if normprefix in self.auditeddir:
109 114 break
110 115 curpath = os.path.join(self.root, prefix)
111 116 try:
@@ -125,8 +130,9 b' class pathauditor(object):'
125 130 if not self.callback or not self.callback(curpath):
126 131 raise util.Abort(_('path %r is inside nested repo %r') %
127 132 (path, prefix))
128 prefixes.append(prefix)
133 prefixes.append(normprefix)
129 134 parts.pop()
135 normparts.pop()
130 136
131 137 self.audited.add(normpath)
132 138 # only add prefixes to the cache after checking everything: we don't
General Comments 0
You need to be logged in to leave comments. Login now