##// END OF EJS Templates
histedit: suggest "histedit --abort" for inconsistent histedit state...
FUJIWARA Katsunori -
r19847:45c30868 stable
parent child Browse files
Show More
@@ -646,8 +646,7 b' def bootstrapcontinue(ui, repo, parentct'
646 # `parentctxnode` should match but no result. This means that
646 # `parentctxnode` should match but no result. This means that
647 # currentnode is not a descendant from parentctxnode.
647 # currentnode is not a descendant from parentctxnode.
648 msg = _('%s is not an ancestor of working directory')
648 msg = _('%s is not an ancestor of working directory')
649 hint = _('update to %s or descendant and run "hg histedit '
649 hint = _('use "histedit --abort" to clear broken state')
650 '--continue" again') % parentctx
651 raise util.Abort(msg % parentctx, hint=hint)
650 raise util.Abort(msg % parentctx, hint=hint)
652 newchildren.pop(0) # remove parentctxnode
651 newchildren.pop(0) # remove parentctxnode
653 # Commit dirty working directory if necessary
652 # Commit dirty working directory if necessary
@@ -70,6 +70,35 b' Run on a revision not ancestors of the c'
70 [255]
70 [255]
71 $ hg up --quiet
71 $ hg up --quiet
72
72
73 Run on a revision not descendants of the initial parent
74 --------------------------------------------------------------------
75
76 Test the message shown for inconsistent histedit state, which may be
77 created (and forgotten) by Mercurial earlier than 2.7. This emulates
78 Mercurial earlier than 2.7 by renaming ".hg/histedit-state"
79 temporarily.
80
81 $ HGEDITOR=cat hg histedit -r 4 --commands - << EOF
82 > edit 08d98a8350f3 4 five
83 > EOF
84 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
85 reverting alpha
86 Make changes as needed, you may commit or record as needed now.
87 When you are finished, run hg histedit --continue to resume.
88 [1]
89
90 $ mv .hg/histedit-state .hg/histedit-state.back
91 $ hg update --quiet --clean 2
92 $ mv .hg/histedit-state.back .hg/histedit-state
93
94 $ hg histedit --continue
95 abort: c8e68270e35a is not an ancestor of working directory
96 (use "histedit --abort" to clear broken state)
97 [255]
98
99 $ hg histedit --abort
100 $ hg update --quiet --clean
101
73 Test that missing revisions are detected
102 Test that missing revisions are detected
74 ---------------------------------------
103 ---------------------------------------
75
104
General Comments 0
You need to be logged in to leave comments. Login now