# HG changeset patch # User Patrick Mezard # Date 1206901120 -7200 # Node ID b8346ae5d64be473ed323eeb24d53277ac75e1fd # Parent 635c57cf0de81f6ba3d26b0c133ecf0bf8fb2a49 commands: fix shadowed repo module diff -r 635c57cf0de8 -r b8346ae5d64b mercurial/commands.py --- a/mercurial/commands.py Sat Mar 29 17:16:39 2008 +0100 +++ b/mercurial/commands.py Sun Mar 30 20:18:40 2008 +0200 @@ -6,7 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. from node import hex, nullid, nullrev, short -from repo import RepoError +from repo import RepoError, NoCapability from i18n import _ import os, re, sys, urllib import hg, util, revlog, bundlerepo, extensions, copies @@ -2045,7 +2045,7 @@ if revs: try: revs = [other.lookup(rev) for rev in revs] - except repo.NoCapability: + except NoCapability: error = _("Other repository doesn't support revision lookup, " "so a rev cannot be specified.") raise util.Abort(error) diff -r 635c57cf0de8 -r b8346ae5d64b tests/test-pull-r --- a/tests/test-pull-r Sat Mar 29 17:16:39 2008 +0100 +++ b/tests/test-pull-r Sun Mar 30 20:18:40 2008 +0200 @@ -14,6 +14,9 @@ hg init copy cd copy +echo '% pull a missing revision' +hg pull -qr missing ../repo + echo '% pull -r 0' hg pull -qr 0 ../repo hg log diff -r 635c57cf0de8 -r b8346ae5d64b tests/test-pull-r.out --- a/tests/test-pull-r.out Sat Mar 29 17:16:39 2008 +0100 +++ b/tests/test-pull-r.out Sun Mar 30 20:18:40 2008 +0200 @@ -15,6 +15,8 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: add foo +% pull a missing revision +abort: unknown revision 'missing'! % pull -r 0 changeset: 0:bbd179dfa0a7 tag: tip