mercurial/util.py
changeset 2271 90b122730d32
parent 2263 2f64cbaa1e92
child 2278 3711e23ab10a
equal deleted inserted replaced
2270:afd7c4ec000f 2271:90b122730d32
   203 
   203 
   204 def canonpath(root, cwd, myname):
   204 def canonpath(root, cwd, myname):
   205     """return the canonical path of myname, given cwd and root"""
   205     """return the canonical path of myname, given cwd and root"""
   206     if root == os.sep:
   206     if root == os.sep:
   207         rootsep = os.sep
   207         rootsep = os.sep
       
   208     elif root.endswith(os.sep):
       
   209         rootsep = root
   208     else:
   210     else:
   209         rootsep = root + os.sep
   211         rootsep = root + os.sep
   210     name = myname
   212     name = myname
   211     if not os.path.isabs(name):
   213     if not os.path.isabs(name):
   212         name = os.path.join(root, cwd, name)
   214         name = os.path.join(root, cwd, name)