Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 3448:6ca49c5fe268
Stop erroring out pull -r and clone -r if repository isn't local.
author | Eric Hopper <hopper@omnifarious.org> |
---|---|
date | Sat, 09 Sep 2006 18:25:07 -0700 |
parents | 357b5589dc62 |
children | 6e998a4575c6 |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Sep 09 18:25:06 2006 -0700 +++ b/mercurial/commands.py Sat Sep 09 18:25:07 2006 -0700 @@ -2105,10 +2105,12 @@ other = hg.repository(ui, source) ui.status(_('pulling from %s\n') % (source)) revs = None - if opts['rev'] and not other.local(): - raise util.Abort(_("pull -r doesn't work for remote repositories yet")) - elif opts['rev']: - revs = [other.lookup(rev) for rev in opts['rev']] + if opts['rev']: + if 'lookup' in other.capabilities: + revs = [other.lookup(rev) for rev in opts['rev']] + else: + error = _("Other repository doesn't support revision lookup, so a rev cannot be specified.") + raise util.Abort(error) modheads = repo.pull(other, heads=revs, force=opts['force']) return postincoming(ui, repo, modheads, opts['update'])