Handle hg under /
authorArun Sharma <arun@sharma-home.net>
Thu, 01 Dec 2005 10:48:42 -0600
changeset 1566 8befbb4e30b2
parent 1565 4bcbc126b80b
child 1567 b4956bbbadc9
Handle hg under /
mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -175,7 +175,10 @@ def pathto(n1, n2):
 
 def canonpath(root, cwd, myname):
     """return the canonical path of myname, given cwd and root"""
-    rootsep = root + os.sep
+    if root == os.sep:
+        rootsep = os.sep
+    else:
+    	rootsep = root + os.sep
     name = myname
     if not name.startswith(os.sep):
         name = os.path.join(root, cwd, name)