comparison mercurial/util.py @ 2271:90b122730d32

Make it possible to use the root directory as the root of a repository.
author Manpreet Singh <junkblocker@yahoo.com>
date Thu, 11 May 2006 21:55:15 -0700
parents 2f64cbaa1e92
children 3711e23ab10a
comparison
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)