Submitter | Yuya Nishihara |
---|---|
Date | Jan. 25, 2015, 2:09 p.m. |
Message ID | <2c01b019a43ddc3ccaed.1422194979@mimosa> |
Download | mbox | patch |
Permalink | /patch/7553/ |
State | Accepted |
Commit | 310222feb9a8671d48a8df6b57300d0326176ba0 |
Headers | show |
Comments
Patch
diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -1545,7 +1545,7 @@ def rev(repo, subset, x): except (TypeError, ValueError): # i18n: "rev" is a keyword raise error.ParseError(_("rev expects a number")) - if l not in fullreposet(repo): + if l not in fullreposet(repo) and l != node.nullrev: return baseset() return subset & baseset([l]) diff --git a/tests/test-revset.t b/tests/test-revset.t --- a/tests/test-revset.t +++ b/tests/test-revset.t @@ -465,7 +465,9 @@ Test the order of operations 9 Test explicit numeric revision + $ log 'rev(-2)' $ log 'rev(-1)' + -1 $ log 'rev(0)' 0 $ log 'rev(9)'