changeset 32438:14482f8e6ce6

revset: remove redundant condition and change to else from elif Before going to this piece of code, we already check whether n is in [0, 1, 2], so dropping the redundant condition.
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 22 May 2017 01:38:00 +0530
parents f03dcb3f95a5
children e72c5263ccaf
files mercurial/revset.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Mon May 22 01:35:53 2017 +0530
+++ b/mercurial/revset.py	Mon May 22 01:38:00 2017 +0530
@@ -1506,7 +1506,7 @@
                 ps.add(cl.parentrevs(r)[0])
             except error.WdirUnsupported:
                 ps.add(repo[r].parents()[0].rev())
-        elif n == 2:
+        else:
             try:
                 parents = cl.parentrevs(r)
                 if parents[1] != node.nullrev: