# HG changeset patch # User Sushil khanchi # Date 1559989771 -19800 # Node ID 3027005c42c33622955a3fd1506c54e3bd97a36a # Parent 52c1809f35c186940b22875a2cdbc7d7296b8029 evolve: move a code block to have right value in has_some_val Because of this we were having wrong value of has_some_val and had some buggy behavior which is being fixed by this patch. Fixed behavior is reflected by the changes in test file. diff -r 52c1809f35c1 -r 3027005c42c3 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Sat Apr 27 13:09:34 2019 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Sat Jun 08 15:59:31 2019 +0530 @@ -1612,8 +1612,6 @@ contopt = opts['continue'] anyopt = opts['any'] allopt = opts['all'] - if allopt is None: - allopt = True startnode = repo['.'].node() dryrunopt = opts['dry_run'] confirmopt = opts['confirm'] @@ -1633,6 +1631,8 @@ targetcat = 'orphan' has_some_opts = bool(revopt or anyopt or allopt or contopt or stopopt or abortopt) + if allopt is None: + allopt = True if 1 < len(specifiedcategories): msg = _('cannot specify more than one trouble category to solve (yet)') raise error.Abort(msg) diff -r 52c1809f35c1 -r 3027005c42c3 tests/test-evolve-topic.t --- a/tests/test-evolve-topic.t Sat Apr 27 13:09:34 2019 +0530 +++ b/tests/test-evolve-topic.t Sat Jun 08 15:59:31 2019 +0530 @@ -458,5 +458,3 @@ switching to topic bar 3 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory is now at 2c295936ac04 - abort: filtered revision '3'! - [255] diff -r 52c1809f35c1 -r 3027005c42c3 tests/test-evolve.t --- a/tests/test-evolve.t Sat Apr 27 13:09:34 2019 +0530 +++ b/tests/test-evolve.t Sat Jun 08 15:59:31 2019 +0530 @@ -1442,7 +1442,6 @@ update:[1] added a 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory is now at ab832e43dd5a - no troubled changesets $ hg log -GT "{rev}:{node|short} {desc} ({bookmarks})\n" --hidden @ 1:ab832e43dd5a added a (book) diff -r 52c1809f35c1 -r 3027005c42c3 tests/test-tutorial.t --- a/tests/test-tutorial.t Sat Apr 27 13:09:34 2019 +0530 +++ b/tests/test-tutorial.t Sat Jun 08 15:59:31 2019 +0530 @@ -1528,7 +1528,6 @@ update:[8] animals 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory is now at 2a2b36e14660 - no troubled changesets Relocating unstable change after prune ----------------------------------------------