# HG changeset patch # User Shun-ichi GOTO # Date 2008-01-09 12:30:37 # Node ID 5924a11aa419d4e7d2509aacd9613a6830f32449 # Parent 07d8eb78dd6870fb8f6899ac3d40c123ad05b3cd Fix not to use os.sep directly. This change is intended for MBCS support. diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -713,14 +713,15 @@ class path_auditor(object): os.path.isdir(os.path.join(curpath, '.hg'))): raise Abort(_('path %r is inside repo %r') % (path, prefix)) - + parts.pop() prefixes = [] - for c in strutil.rfindall(normpath, os.sep): - prefix = normpath[:c] + for n in range(len(parts)): + prefix = os.sep.join(parts) if prefix in self.auditeddir: break check(prefix) prefixes.append(prefix) + parts.pop() self.audited.add(path) # only add prefixes to the cache after checking everything: we don't