evolve: store --update flag state in evolvestate file
Part of 9c522bdfc846 that wasn't yet accepted.
--- a/CHANGELOG Fri Apr 12 02:55:34 2019 +0800
+++ b/CHANGELOG Thu Apr 11 17:45:36 2019 +0800
@@ -11,6 +11,7 @@
* stack: mention all divergences too.
* evolve: share evolve related cache between `shares`
* evolve: improved compatibility with narrow repositories,
+ * evolve: preserve --[no-]update value over --continue,
8.4.1 - in progress
-------------------
--- a/hgext3rd/evolve/evolvecmd.py Fri Apr 12 02:55:34 2019 +0800
+++ b/hgext3rd/evolve/evolvecmd.py Thu Apr 11 17:45:36 2019 +0800
@@ -1631,6 +1631,8 @@
evolvestate.delete()
return
startnode = repo.unfiltered()[evolvestate['startnode']]
+ if 'update' in evolvestate:
+ shouldupdate = evolvestate['update']
evolvestate.delete()
elif stopopt:
if not evolvestate:
@@ -1680,7 +1682,8 @@
'revs': list(revs), 'confirm': confirmopt,
'startnode': startnode, 'skippedrevs': [],
'command': 'evolve', 'orphanmerge': False,
- 'bookmarkchanges': [], 'temprevs': [], 'obsmarkers': []}
+ 'bookmarkchanges': [], 'temprevs': [], 'obsmarkers': [],
+ 'update': shouldupdate}
evolvestate.addopts(stateopts)
# lastsolved: keep track of successor of last troubled cset we evolved
# to confirm that if atop msg should be suppressed to remove redundancy
--- a/tests/test-evolve-continue.t Fri Apr 12 02:55:34 2019 +0800
+++ b/tests/test-evolve-continue.t Thu Apr 11 17:45:36 2019 +0800
@@ -31,7 +31,7 @@
o 0:8fa14d15e168 added hgignore
() draft
-Simple case of evolve --continue
+Simple case of evolve --continue (with --[no-]update flag)
$ hg up ca1b80f7960a
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -53,7 +53,7 @@
o 0:8fa14d15e168 added hgignore
() draft
- $ hg evolve --all
+ $ hg evolve --all --no-update
move:[4] added d
atop:[5] added c
merging d
@@ -68,12 +68,12 @@
$ hg evolve --continue
evolving 4:c41c793e0ef1 "added d"
- working directory is now at 2a4e03d422e2
+ working directory is now at cb6a2ab625bb
$ hg glog
- @ 6:2a4e03d422e2 added d
+ o 6:2a4e03d422e2 added d
| () draft
- o 5:cb6a2ab625bb added c
+ @ 5:cb6a2ab625bb added c
| () draft
o 2:b1661037fa25 added b
| () draft
@@ -82,6 +82,9 @@
o 0:8fa14d15e168 added hgignore
() draft
+ $ hg up
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
Case when conflicts resolution lead to empty wdir in evolve --continue
$ echo foo > e