From patchwork Fri Aug 2 08:12:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D6707: revset: drop argument when it's None From: phabricator X-Patchwork-Id: 41115 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 2 Aug 2019 08:12:21 +0000 av6 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY 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. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6707 AFFECTED FILES mercurial/revset.py CHANGE DETAILS To: av6, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -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):