# HG changeset patch # User Matt Harbison # Date 2012-05-14 23:25:13 # Node ID 47b8ec0eb7fbfa090b99030498e27f8199194bcd # Parent 3c398032bf464bc1c99c5d7cec3eddcc30ce8403 revset: fix traceback for bogus revisions in id(rev) hg log -r "id(1234567)" now returns an empty list like rev() does. diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -740,7 +740,11 @@ def node_(repo, subset, x): if len(n) == 40: rn = repo[n].rev() else: - rn = repo.changelog.rev(repo.changelog._partialmatch(n)) + rn = None + pm = repo.changelog._partialmatch(n) + if pm is not None: + rn = repo.changelog.rev(pm) + return [r for r in subset if r == rn] def outgoing(repo, subset, x):