mercurial/util.py
changeset 1810 7596611ab3d5
parent 1635 ae61937c61c5
child 1830 4ced57680ce7
equal deleted inserted replaced
1809:ef53d200df3d 1810:7596611ab3d5
   177 def canonpath(root, cwd, myname):
   177 def canonpath(root, cwd, myname):
   178     """return the canonical path of myname, given cwd and root"""
   178     """return the canonical path of myname, given cwd and root"""
   179     if root == os.sep:
   179     if root == os.sep:
   180         rootsep = os.sep
   180         rootsep = os.sep
   181     else:
   181     else:
   182     	rootsep = root + os.sep
   182         rootsep = root + os.sep
   183     name = myname
   183     name = myname
   184     if not name.startswith(os.sep):
   184     if not name.startswith(os.sep):
   185         name = os.path.join(root, cwd, name)
   185         name = os.path.join(root, cwd, name)
   186     name = os.path.normpath(name)
   186     name = os.path.normpath(name)
   187     if name.startswith(rootsep):
   187     if name.startswith(rootsep):