revset: use nullrev constant in merge()
authorYuya Nishihara <yuya@tcha.org>
Sun, 09 Jun 2019 22:18:22 +0900
changeset 42440 d279e4f453c4
parent 42439 aae93201f758
child 42441 43c8f72184f4
revset: use nullrev constant in merge()
mercurial/revset.py
--- a/mercurial/revset.py	Fri May 31 22:38:04 2019 -0700
+++ b/mercurial/revset.py	Sun Jun 09 22:18:22 2019 +0900
@@ -1361,7 +1361,8 @@
     # i18n: "merge" is a keyword
     getargs(x, 0, 0, _("merge takes no arguments"))
     cl = repo.changelog
-    return subset.filter(lambda r: cl.parentrevs(r)[1] != -1,
+    nullrev = node.nullrev
+    return subset.filter(lambda r: cl.parentrevs(r)[1] != nullrev,
                          condrepr='<merge>')
 
 @predicate('branchpoint()', safe=True)