comparison mercurial/scmutil.py @ 15721:4751d5133f15 stable

windows: force specified path to be audited in localpath form pathauditor is invoked not only for localpath form using "os.sep" as separator, but also for normalized form using "/": for example, hg internal path like "store/data" under ".hg", or ones normalized by match object this causes insufficient repository nesting check, because current pathauditor implementation divides specified path into components by "os.sep", and this causes to treat multiple path components joined by "/" as single one on Windows environment. this patch applies "util.localpath()" on specified path to force it to be divided into components correctly. in fact, root for pathauditor also uses multiple path separator on Windows. but this does not affect audit itself, so "util.localpath()" is not applied on it.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sat, 24 Dec 2011 19:01:07 +0900
parents 37a6e9765015
children 5b384b7f48d5
comparison
equal deleted inserted replaced
15701:32a6e00e4cfe 15721:4751d5133f15
83 83
84 def __call__(self, path): 84 def __call__(self, path):
85 '''Check the relative path. 85 '''Check the relative path.
86 path may contain a pattern (e.g. foodir/**.txt)''' 86 path may contain a pattern (e.g. foodir/**.txt)'''
87 87
88 path = util.localpath(path)
88 normpath = self.normcase(path) 89 normpath = self.normcase(path)
89 if normpath in self.audited: 90 if normpath in self.audited:
90 return 91 return
91 # AIX ignores "/" at end of path, others raise EISDIR. 92 # AIX ignores "/" at end of path, others raise EISDIR.
92 if util.endswithsep(path): 93 if util.endswithsep(path):