changeset 3800:21914530c21c

evolve: move if-else block under the right block the index related if-else should be only executed when all three base, divergent and other have different branch names. I coded this last night and mistakenly mis-indented it. Caught when I was adding more tests.
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 06 Jun 2018 01:19:36 +0530
parents 037ccbf41c6d
children ee78135b2f45
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Tue Jun 05 22:02:24 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Wed Jun 06 01:19:36 2018 +0530
@@ -477,12 +477,13 @@
                                           "%s or (b) %s or (c) %s? $$ &a $$ &b"
                                           " $$ &c") %
                                         (basebranch, divbranch, othbranch), 0)
-            if index == 0:
-                repo.dirstate.setbranch(basebranch)
-            elif index == 1:
-                pass
-            elif index == 2:
-                repo.dirstate.setbranch(othbranch)
+
+                if index == 0:
+                    repo.dirstate.setbranch(basebranch)
+                elif index == 1:
+                    pass
+                elif index == 2:
+                    repo.dirstate.setbranch(othbranch)
 
         # new node if any formed as the replacement
         newnode = None