# HG changeset patch # User Laurent Charignon # Date 1431535416 25200 # Node ID 70681abf79d16c41177c6415bf0c36f419a590fd # Parent 14b537042245f44b61264346114ce5f633907ddc evolve: move return statement at the right level When no trouble was found with the --rev option, the code of the evolve function would continue running and would solve unwanted troubles. This patch makes sure it does not happen. diff -r 14b537042245 -r 70681abf79d1 hgext/evolve.py --- a/hgext/evolve.py Wed May 27 14:00:01 2015 -0700 +++ b/hgext/evolve.py Wed May 13 09:43:36 2015 -0700 @@ -1314,7 +1314,7 @@ seen += 1 progresscb() _cleanup(ui, repo, startnode, showprogress) - return + return nexttrouble = _picknexttroubled(ui, repo, anyopt or allopt) # No trouble to resolve if not nexttrouble: diff -r 14b537042245 -r 70681abf79d1 tests/test-evolve.t --- a/tests/test-evolve.t Wed May 27 14:00:01 2015 -0700 +++ b/tests/test-evolve.t Wed May 13 09:43:36 2015 -0700 @@ -1001,6 +1001,11 @@ | o 0 : a0 - test + +Evolving an empty revset should do nothing + $ hg evolve --rev "16 and 15" + No troubled changes in the specified revset (no-eol) + $ hg evolve --rev "14::" move:[15] add gg atop:[18] a3