118 Test the message shown for inconsistent histedit state, which may be |
118 Test the message shown for inconsistent histedit state, which may be |
119 created (and forgotten) by Mercurial earlier than 2.7. This emulates |
119 created (and forgotten) by Mercurial earlier than 2.7. This emulates |
120 Mercurial earlier than 2.7 by renaming ".hg/histedit-state" |
120 Mercurial earlier than 2.7 by renaming ".hg/histedit-state" |
121 temporarily. |
121 temporarily. |
122 |
122 |
|
123 $ hg log -G -T '{rev} {shortest(node)} {desc}\n' -r 2:: |
|
124 @ 4 08d9 five |
|
125 | |
|
126 o 3 c8e6 four |
|
127 | |
|
128 o 2 eb57 three |
|
129 | |
123 $ HGEDITOR=cat hg histedit -r 4 --commands - << EOF |
130 $ HGEDITOR=cat hg histedit -r 4 --commands - << EOF |
124 > edit 08d98a8350f3 4 five |
131 > edit 08d98a8350f3 4 five |
125 > EOF |
132 > EOF |
126 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
133 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
127 reverting alpha |
134 reverting alpha |
129 When you are finished, run hg histedit --continue to resume. |
136 When you are finished, run hg histedit --continue to resume. |
130 [1] |
137 [1] |
131 |
138 |
132 $ mv .hg/histedit-state .hg/histedit-state.back |
139 $ mv .hg/histedit-state .hg/histedit-state.back |
133 $ hg update --quiet --clean 2 |
140 $ hg update --quiet --clean 2 |
|
141 $ echo alpha >> alpha |
134 $ mv .hg/histedit-state.back .hg/histedit-state |
142 $ mv .hg/histedit-state.back .hg/histedit-state |
135 |
143 |
136 $ hg histedit --continue |
144 $ hg histedit --continue |
137 abort: c8e68270e35a is not an ancestor of working directory |
145 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
138 (use "histedit --abort" to clear broken state) |
146 saved backup bundle to $TESTTMP/foo/.hg/strip-backup/08d98a8350f3-02594089-backup.hg (glob) |
139 [255] |
147 $ hg log -G -T '{rev} {shortest(node)} {desc}\n' -r 2:: |
140 |
148 @ 4 f5ed five |
141 $ hg histedit --abort |
149 | |
142 $ hg update --quiet --clean |
150 | o 3 c8e6 four |
|
151 |/ |
|
152 o 2 eb57 three |
|
153 | |
|
154 |
|
155 $ hg unbundle -q $TESTTMP/foo/.hg/strip-backup/08d98a8350f3-02594089-backup.hg |
|
156 $ hg strip -q -r f5ed --config extensions.strip= |
|
157 $ hg up -q 08d98a8350f3 |
143 |
158 |
144 Test that missing revisions are detected |
159 Test that missing revisions are detected |
145 --------------------------------------- |
160 --------------------------------------- |
146 |
161 |
147 $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF |
162 $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF |