##// END OF EJS Templates
histedit: fix keep during --continue...
Durham Goode -
r25330:8594d0b3 stable
parent child Browse files
Show More
@@ -741,7 +741,7 b' def _histedit(ui, repo, state, *freeargs'
741
741
742
742
743 replacements = []
743 replacements = []
744 keep = opts.get('keep', False)
744 state.keep = opts.get('keep', False)
745
745
746 # rebuild state
746 # rebuild state
747 if goal == 'continue':
747 if goal == 'continue':
@@ -810,7 +810,7 b' def _histedit(ui, repo, state, *freeargs'
810 'exactly one common root'))
810 'exactly one common root'))
811 root = rr[0].node()
811 root = rr[0].node()
812
812
813 revs = between(repo, root, topmost, keep)
813 revs = between(repo, root, topmost, state.keep)
814 if not revs:
814 if not revs:
815 raise util.Abort(_('%s is not an ancestor of working directory') %
815 raise util.Abort(_('%s is not an ancestor of working directory') %
816 node.short(root))
816 node.short(root))
@@ -834,7 +834,6 b' def _histedit(ui, repo, state, *freeargs'
834
834
835 state.parentctxnode = parentctxnode
835 state.parentctxnode = parentctxnode
836 state.rules = rules
836 state.rules = rules
837 state.keep = keep
838 state.topmost = topmost
837 state.topmost = topmost
839 state.replacements = replacements
838 state.replacements = replacements
840
839
@@ -870,7 +869,7 b' def _histedit(ui, repo, state, *freeargs'
870 for n in succs[1:]:
869 for n in succs[1:]:
871 ui.debug(m % node.short(n))
870 ui.debug(m % node.short(n))
872
871
873 if not keep:
872 if not state.keep:
874 if mapping:
873 if mapping:
875 movebookmarks(ui, repo, mapping, state.topmost, ntm)
874 movebookmarks(ui, repo, mapping, state.topmost, ntm)
876 # TODO update mq state
875 # TODO update mq state
@@ -295,3 +295,32 b' Test that trimming description using mul'
295 # m, mess = edit message without changing commit content
295 # m, mess = edit message without changing commit content
296 #
296 #
297 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
297 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
298
299 Test --continue with --keep
300
301 $ hg strip -q -r . --config extensions.strip=
302 $ hg histedit '.^' -q --keep --commands - << EOF
303 > edit eb57da33312f 2 three
304 > pick f3cfcca30c44 4 x
305 > EOF
306 Make changes as needed, you may commit or record as needed now.
307 When you are finished, run hg histedit --continue to resume.
308 [1]
309 $ echo edit >> alpha
310 $ hg histedit -q --continue
311 $ hg log -G -T '{rev}:{node|short} {desc}'
312 @ 6:8fda0c726bf2 x
313 |
314 o 5:63379946892c three
315 |
316 | o 4:f3cfcca30c44 x
317 | |
318 | | o 3:2a30f3cfee78 four
319 | |/ ***
320 | | five
321 | o 2:eb57da33312f three
322 |/
323 o 1:579e40513370 two
324 |
325 o 0:6058cbb6cfd7 one
326
General Comments 0
You need to be logged in to leave comments. Login now