revset: fix traceback for bogus revisions in id(rev)
hg log -r "id(1234567)" now returns an empty list like rev() does.
--- a/mercurial/revset.py Tue May 15 12:44:07 2012 +0200
+++ b/mercurial/revset.py Mon May 14 19:25:13 2012 -0400
@@ -740,7 +740,11 @@
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):