# HG changeset patch # User Alexis S. L. Carvalho # Date 2008-02-15 12:38:37 # Node ID 213ea6eed41281a0a5eeec9d6707b392dd4a413f # Parent 81e20e01d465a916aba6d44e5add6169a7bd1f04 util.pathto: return '.' instead of an empty string This could happen with something like pathto(repo.root, 'foo/bar', 'foo/bar') diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -335,7 +335,7 @@ def pathto(root, n1, n2): a.pop() b.pop() b.reverse() - return os.sep.join((['..'] * len(a)) + b) + return os.sep.join((['..'] * len(a)) + b) or '.' def canonpath(root, cwd, myname): """return the canonical path of myname, given cwd and root"""