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.
--- 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)
--- 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]
--- 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)
--- 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
----------------------------------------------