2103 setremoteconfig(ui, opts) |
2103 setremoteconfig(ui, opts) |
2104 |
2104 |
2105 other = hg.repository(ui, source) |
2105 other = hg.repository(ui, source) |
2106 ui.status(_('pulling from %s\n') % (source)) |
2106 ui.status(_('pulling from %s\n') % (source)) |
2107 revs = None |
2107 revs = None |
2108 if opts['rev'] and not other.local(): |
2108 if opts['rev']: |
2109 raise util.Abort(_("pull -r doesn't work for remote repositories yet")) |
2109 if 'lookup' in other.capabilities: |
2110 elif opts['rev']: |
2110 revs = [other.lookup(rev) for rev in opts['rev']] |
2111 revs = [other.lookup(rev) for rev in opts['rev']] |
2111 else: |
|
2112 error = _("Other repository doesn't support revision lookup, so a rev cannot be specified.") |
|
2113 raise util.Abort(error) |
2112 modheads = repo.pull(other, heads=revs, force=opts['force']) |
2114 modheads = repo.pull(other, heads=revs, force=opts['force']) |
2113 return postincoming(ui, repo, modheads, opts['update']) |
2115 return postincoming(ui, repo, modheads, opts['update']) |
2114 |
2116 |
2115 def push(ui, repo, dest=None, **opts): |
2117 def push(ui, repo, dest=None, **opts): |
2116 """push changes to the specified destination |
2118 """push changes to the specified destination |