mercurial/util.py
changeset 6111 213ea6eed412
parent 6091 41aa0a37d9be
child 6132 1ee95f7df611
child 6134 7b937b26adf7
equal deleted inserted replaced
6110:81e20e01d465 6111:213ea6eed412
   333     b.reverse()
   333     b.reverse()
   334     while a and b and a[-1] == b[-1]:
   334     while a and b and a[-1] == b[-1]:
   335         a.pop()
   335         a.pop()
   336         b.pop()
   336         b.pop()
   337     b.reverse()
   337     b.reverse()
   338     return os.sep.join((['..'] * len(a)) + b)
   338     return os.sep.join((['..'] * len(a)) + b) or '.'
   339 
   339 
   340 def canonpath(root, cwd, myname):
   340 def canonpath(root, cwd, myname):
   341     """return the canonical path of myname, given cwd and root"""
   341     """return the canonical path of myname, given cwd and root"""
   342     if root == os.sep:
   342     if root == os.sep:
   343         rootsep = os.sep
   343         rootsep = os.sep