mercurial/util.py
changeset 7820 346fafc144fc
parent 7784 8a217626bb0c
child 7869 bc027d72c289
equal deleted inserted replaced
7819:14b703252f14 7820:346fafc144fc
   820             or os.pardir in parts):
   820             or os.pardir in parts):
   821             raise Abort(_("path contains illegal component: %s") % path)
   821             raise Abort(_("path contains illegal component: %s") % path)
   822         if '.hg' in path.lower():
   822         if '.hg' in path.lower():
   823             lparts = [p.lower() for p in parts]
   823             lparts = [p.lower() for p in parts]
   824             for p in '.hg', '.hg.':
   824             for p in '.hg', '.hg.':
   825                 if p in lparts[1:-1]:
   825                 if p in lparts[1:]:
   826                     pos = lparts.index(p)
   826                     pos = lparts.index(p)
   827                     base = os.path.join(*parts[:pos])
   827                     base = os.path.join(*parts[:pos])
   828                     raise Abort(_('path %r is inside repo %r') % (path, base))
   828                     raise Abort(_('path %r is inside repo %r') % (path, base))
   829         def check(prefix):
   829         def check(prefix):
   830             curpath = os.path.join(self.root, prefix)
   830             curpath = os.path.join(self.root, prefix)