evolve: use --all by default (BC)
allopt defaults to None to avoid touching _checkevolveopts(). If it were True
by default, that function would always act like the flag was provided by user,
and so using --abort, --stop, --continue or --rev on their own would never work
(hg evolve will complain that you cannot specify both --rev and --all).
A notable change in tests is "no troubled changesets" line that gets printed
when using `hg evolve` to update to the evolved successor of working directory
parent, but there were no actual instabilities.
--- a/CHANGELOG Wed Apr 24 17:02:27 2019 +0800
+++ b/CHANGELOG Wed Apr 24 17:21:21 2019 +0800
@@ -6,6 +6,8 @@
* evolve: preserve the working directory after resolving instability (BC)
(use `hg next` or `hg evolve --no-update` to get the old behavior)
+ * evolve: evolve all relevant revision by default (BC)
+ (use --no-all to evolve only one)
* evolve: drop compatibility with 4.4
* evolve: reinstalled compatibility with narrow repositories,
--- a/hgext3rd/evolve/evolvecmd.py Wed Apr 24 17:02:27 2019 +0800
+++ b/hgext3rd/evolve/evolvecmd.py Wed Apr 24 17:21:21 2019 +0800
@@ -1473,8 +1473,8 @@
('', 'content-divergent', False, _('solves only content-divergent changesets')),
('', 'unstable', False, _('solves only unstable changesets (DEPRECATED)')),
('', 'orphan', False, _('solves only orphan changesets (default)')),
- ('a', 'all', False, _('evolve all troubled changesets related to the '
- 'current working directory and its descendants')),
+ ('a', 'all', None, _('evolve all troubled changesets related to the '
+ 'current working directory and its descendants')),
('', 'update', False, _('update to the head of evolved changesets')),
('c', 'continue', False, _('continue an interrupted evolution')),
('', 'stop', False, _('stop the interrupted evolution')),
@@ -1583,6 +1583,8 @@
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']
--- a/tests/test-evolve-content-divergent-corner-cases.t Wed Apr 24 17:02:27 2019 +0800
+++ b/tests/test-evolve-content-divergent-corner-cases.t Wed Apr 24 17:21:21 2019 +0800
@@ -199,15 +199,16 @@
> [extensions]
> testextension=$TESTTMP/test_extension.py
> EOF
- $ hg evolve --all
+ $ hg evolve
nothing to evolve on current working copy parent
(do you want to use --content-divergent)
[2]
$ hg evolve --content-divergent
- merge:[3] bdivergent
- with: [2] bdivergent
+ merge:[2] bdivergent
+ with: [3] bdivergent
base: [1] add _b
- merging "other" content-divergent changeset '05a6b6a9e633'
+ updating to "local" side of the conflict: 05a6b6a9e633
+ merging "other" content-divergent changeset '6b096fb45070'
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
working directory is now at 73ff357d3975
@@ -364,10 +365,11 @@
Resolve the divergence, only "a" should be removed
$ hg evolve --content-divergent --update
- merge:[3] delete a
- with: [2] delete a
+ merge:[2] delete a
+ with: [3] delete a
base: [1] delete a
- merging "other" content-divergent changeset '0825dcee2670'
+ updating to "local" side of the conflict: 0825dcee2670
+ merging "other" content-divergent changeset '92ecd58f9b05'
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
working directory is now at 7ca6a9fafcf6
$ hg glog
--- a/tests/test-evolve.t Wed Apr 24 17:02:27 2019 +0800
+++ b/tests/test-evolve.t Wed Apr 24 17:21:21 2019 +0800
@@ -1503,6 +1503,7 @@
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 Wed Apr 24 17:02:27 2019 +0800
+++ b/tests/test-tutorial.t Wed Apr 24 17:21:21 2019 +0800
@@ -1528,6 +1528,7 @@
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
----------------------------------------------