Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 6405:b8346ae5d64b
commands: fix shadowed repo module
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 30 Mar 2008 20:18:40 +0200 |
parents | 0d4e068e9e52 |
children | 7c36aee46bf5 a60b711c7ac4 |
comparison
equal
deleted
inserted
replaced
6401:635c57cf0de8 | 6405:b8346ae5d64b |
---|---|
4 # | 4 # |
5 # This software may be used and distributed according to the terms | 5 # This software may be used and distributed according to the terms |
6 # of the GNU General Public License, incorporated herein by reference. | 6 # of the GNU General Public License, incorporated herein by reference. |
7 | 7 |
8 from node import hex, nullid, nullrev, short | 8 from node import hex, nullid, nullrev, short |
9 from repo import RepoError | 9 from repo import RepoError, NoCapability |
10 from i18n import _ | 10 from i18n import _ |
11 import os, re, sys, urllib | 11 import os, re, sys, urllib |
12 import hg, util, revlog, bundlerepo, extensions, copies | 12 import hg, util, revlog, bundlerepo, extensions, copies |
13 import difflib, patch, time, help, mdiff, tempfile | 13 import difflib, patch, time, help, mdiff, tempfile |
14 import version, socket | 14 import version, socket |
2043 other = hg.repository(ui, source) | 2043 other = hg.repository(ui, source) |
2044 ui.status(_('pulling from %s\n') % util.hidepassword(source)) | 2044 ui.status(_('pulling from %s\n') % util.hidepassword(source)) |
2045 if revs: | 2045 if revs: |
2046 try: | 2046 try: |
2047 revs = [other.lookup(rev) for rev in revs] | 2047 revs = [other.lookup(rev) for rev in revs] |
2048 except repo.NoCapability: | 2048 except NoCapability: |
2049 error = _("Other repository doesn't support revision lookup, " | 2049 error = _("Other repository doesn't support revision lookup, " |
2050 "so a rev cannot be specified.") | 2050 "so a rev cannot be specified.") |
2051 raise util.Abort(error) | 2051 raise util.Abort(error) |
2052 | 2052 |
2053 modheads = repo.pull(other, heads=revs, force=opts['force']) | 2053 modheads = repo.pull(other, heads=revs, force=opts['force']) |