# HG changeset patch # User Arun Sharma # Date 1133455722 21600 # Node ID 8befbb4e30b20ab48daf552829f02d5f55f19c72 # Parent 4bcbc126b80b2a0532751270fc04a01091aa01f3 Handle hg under / diff --git a/mercurial/util.py b/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)