# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1528228176 -19800 # Node ID 21914530c21c95d6e31b22b39c9855c801c5fa8a # Parent 037ccbf41c6d88fe801a7f859d04b2636e47bf01 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. diff -r 037ccbf41c6d -r 21914530c21c hgext3rd/evolve/evolvecmd.py --- 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