Mercurial > hg-stable
changeset 1440:bf109779f48b
Fix relative pull in a subdir
author | tonfa@arakou.lan |
---|---|
date | Mon, 24 Oct 2005 17:41:45 -0700 |
parents | 65cbe22b03fa |
children | cbc36ad70945 |
files | mercurial/commands.py mercurial/ui.py |
diffstat | 2 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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:
--- 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)