mercurial/dirstate.py
changeset 30614 cfe66dcf45c0
parent 30519 20a42325fdef
child 30634 ad15646dc61c
equal deleted inserted replaced
30613:1112ff99d965 30614:cfe66dcf45c0
   284         if cwd == self._root:
   284         if cwd == self._root:
   285             return ''
   285             return ''
   286         # self._root ends with a path separator if self._root is '/' or 'C:\'
   286         # self._root ends with a path separator if self._root is '/' or 'C:\'
   287         rootsep = self._root
   287         rootsep = self._root
   288         if not util.endswithsep(rootsep):
   288         if not util.endswithsep(rootsep):
   289             rootsep += os.sep
   289             rootsep += pycompat.ossep
   290         if cwd.startswith(rootsep):
   290         if cwd.startswith(rootsep):
   291             return cwd[len(rootsep):]
   291             return cwd[len(rootsep):]
   292         else:
   292         else:
   293             # we're outside the repo. return an absolute path.
   293             # we're outside the repo. return an absolute path.
   294             return cwd
   294             return cwd