revset: drop argument when it's None
authorAnton Shestakov <av6@dwimlabs.net>
Thu, 18 Jul 2019 17:10:38 +0800
changeset 42721 911e25dc9d8c
parent 42720 77c52ce50e6a
child 42722 f9b64ff9d26b
revset: drop argument when it's None getstack's definition is `getstack(repo, rev=None)`, so providing None explicitly is unnecessary. Moreover, when x is not None, it's definitely not a revision but a part of a parsed tree of revset arguments. Differential Revision: https://phab.mercurial-scm.org/D6707
mercurial/revset.py
--- a/mercurial/revset.py	Thu Jul 18 17:07:34 2019 +0800
+++ b/mercurial/revset.py	Thu Jul 18 17:10:38 2019 +0800
@@ -1695,7 +1695,7 @@
     parent. (EXPERIMENTAL)
     """
     if x is None:
-        stacks = stackmod.getstack(repo, x)
+        stacks = stackmod.getstack(repo)
     else:
         stacks = smartset.baseset([])
         for revision in getset(repo, fullreposet(repo), x):