# HG changeset patch # User tonfa@arakou.lan # Date 1130200905 25200 # Node ID bf109779f48bff62884b443d2bd132728caf448a # Parent 65cbe22b03fadb8c19e45a5a4ebb3853fa623b09 Fix relative pull in a subdir diff -r 65cbe22b03fa -r bf109779f48b mercurial/commands.py --- a/mercurial/commands.py Mon Oct 24 16:59:31 2005 -0700 +++ b/mercurial/commands.py Mon Oct 24 17:41:45 2005 -0700 @@ -591,7 +591,7 @@ contents including permissions, rename data, and revision history. """ f = open(fname, "wb") - dest = ui.expandpath(dest) + dest = ui.expandpath(dest, repo.root) other = hg.repository(ui, dest) o = repo.findoutgoing(other) cg = repo.changegroup(o) @@ -1380,7 +1380,7 @@ Currently only local repositories are supported. """ - source = ui.expandpath(source) + source = ui.expandpath(source, repo.root) other = hg.repository(ui, source) if not other.local(): raise util.Abort(_("incoming doesn't work for remote repositories yet")) @@ -1549,7 +1549,7 @@ default push repo. These are the changesets that would be pushed if a push was requested. """ - dest = ui.expandpath(dest) + dest = ui.expandpath(dest, repo.root) other = hg.repository(ui, dest) o = repo.findoutgoing(other) o = repo.newer(o) @@ -1625,7 +1625,7 @@ to the remote user's home directory by default; use two slashes at the start of a path to specify it as relative to the filesystem root. """ - source = ui.expandpath(source) + source = ui.expandpath(source, repo.root) ui.status(_('pulling from %s\n') % (source)) if opts['ssh']: @@ -1665,7 +1665,7 @@ SSH requires an accessible shell account on the destination machine and a copy of hg in the remote path. """ - dest = ui.expandpath(dest) + dest = ui.expandpath(dest, repo.root) ui.status('pushing to %s\n' % (dest)) if ssh: diff -r 65cbe22b03fa -r bf109779f48b mercurial/ui.py --- a/mercurial/ui.py Mon Oct 24 16:59:31 2005 -0700 +++ b/mercurial/ui.py Mon Oct 24 17:41:45 2005 -0700 @@ -89,9 +89,12 @@ user = user[f+1:] return user - def expandpath(self, loc): + def expandpath(self, loc, root=""): paths = {} for name, path in self.configitems("paths"): + m = path.find("://") + if m == -1: + path = os.path.join(root, path) paths[name] = path return paths.get(loc, loc)