changeset 48115:b067d22dc6ad

phase: avoid a no-op resolution of revset from revnums I was surprised that `scmutil.revrange()` supports integers in the list of revsets. I think it's clearer to not pass a list that's known to contain only integers into the function. Differential Revision: https://phab.mercurial-scm.org/D11559
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 28 Sep 2021 09:08:43 -0700
parents 73bcfde21fc2
children 5ced12cfa41b
files mercurial/commands.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Oct 01 15:19:37 2021 +0200
+++ b/mercurial/commands.py	Tue Sep 28 09:08:43 2021 -0700
@@ -5219,13 +5219,13 @@
     # look for specified revision
     revs = list(revs)
     revs.extend(opts[b'rev'])
-    if not revs:
+    if revs:
+        revs = scmutil.revrange(repo, revs)
+    else:
         # display both parents as the second parent phase can influence
         # the phase of a merge commit
         revs = [c.rev() for c in repo[None].parents()]
 
-    revs = scmutil.revrange(repo, revs)
-
     ret = 0
     if targetphase is None:
         # display