##// END OF EJS Templates
histedit-test: generalise --commands "-" usage...
Pierre-Yves David -
r19019:53060cc1 default
parent child Browse files
Show More
@@ -76,14 +76,13 b''
76 # m, mess = edit message without changing commit content
76 # m, mess = edit message without changing commit content
77 #
77 #
78 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
78 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
79 $ cat >> commands.txt <<EOF
79 $ hg histedit 1 --commands - --verbose << EOF | grep histedit
80 > pick 177f92b77385 2 c
80 > pick 177f92b77385 2 c
81 > drop d2ae7f538514 1 b
81 > drop d2ae7f538514 1 b
82 > pick 055a42cdd887 3 d
82 > pick 055a42cdd887 3 d
83 > fold e860deea161a 4 e
83 > fold e860deea161a 4 e
84 > pick 652413bf663e 5 f
84 > pick 652413bf663e 5 f
85 > EOF
85 > EOF
86 $ hg histedit 1 --commands commands.txt --verbose | grep histedit
87 histedit: moving bookmarks also-two from 177f92b77385 to b346ab9a313d
86 histedit: moving bookmarks also-two from 177f92b77385 to b346ab9a313d
88 histedit: moving bookmarks five from 652413bf663e to cacdfd884a93
87 histedit: moving bookmarks five from 652413bf663e to cacdfd884a93
89 histedit: moving bookmarks four from e860deea161a to 59d9f330561f
88 histedit: moving bookmarks four from e860deea161a to 59d9f330561f
@@ -135,12 +134,11 b''
135 # m, mess = edit message without changing commit content
134 # m, mess = edit message without changing commit content
136 #
135 #
137 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
136 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
138 $ cat > commands.txt << EOF
137 $ hg histedit 1 --commands - --verbose << EOF | grep histedit
139 > pick b346ab9a313d 1 c
138 > pick b346ab9a313d 1 c
140 > pick cacdfd884a93 3 f
139 > pick cacdfd884a93 3 f
141 > pick 59d9f330561f 2 d
140 > pick 59d9f330561f 2 d
142 > EOF
141 > EOF
143 $ hg histedit 1 --commands commands.txt --verbose | grep histedit
144 histedit: moving bookmarks five from cacdfd884a93 to c04e50810e4b
142 histedit: moving bookmarks five from cacdfd884a93 to c04e50810e4b
145 histedit: moving bookmarks four from 59d9f330561f to c04e50810e4b
143 histedit: moving bookmarks four from 59d9f330561f to c04e50810e4b
146 histedit: moving bookmarks three from 59d9f330561f to c04e50810e4b
144 histedit: moving bookmarks three from 59d9f330561f to c04e50810e4b
@@ -6,13 +6,6 b''
6 > histedit=
6 > histedit=
7 > EOF
7 > EOF
8
8
9 $ EDITED="$TESTTMP/editedhistory"
10 $ cat > $EDITED <<EOF
11 > pick 177f92b77385 c
12 > pick e860deea161a e
13 > pick 652413bf663e f
14 > pick 055a42cdd887 d
15 > EOF
16 $ initrepo ()
9 $ initrepo ()
17 > {
10 > {
18 > hg init r
11 > hg init r
@@ -79,6 +72,15 b' show the edit commands offered'
79 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
72 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
80
73
81 edit the history
74 edit the history
75 (use a hacky editor to check histedit-last-edit.txt backup)
76
77 $ EDITED="$TESTTMP/editedhistory"
78 $ cat > $EDITED <<EOF
79 > pick 177f92b77385 c
80 > pick e860deea161a e
81 > pick 652413bf663e f
82 > pick 055a42cdd887 d
83 > EOF
82 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
84 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
83 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
85 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
84 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
86 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -128,13 +130,12 b' log after edit'
128
130
129 put things back
131 put things back
130
132
131 $ cat > $EDITED <<EOF
133 $ hg histedit 177f92b77385 --commands - 2>&1 << EOF | fixbundle
132 > pick 177f92b77385 c
134 > pick 177f92b77385 c
133 > pick 07114f51870f d
135 > pick 07114f51870f d
134 > pick d8249471110a e
136 > pick d8249471110a e
135 > pick 8ade9693061e f
137 > pick 8ade9693061e f
136 > EOF
138 > EOF
137 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
138 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
139 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
139 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
140 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
140 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
141 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -175,13 +176,12 b' put things back'
175
176
176 slightly different this time
177 slightly different this time
177
178
178 $ cat > $EDITED <<EOF
179 $ hg histedit 177f92b77385 --commands - << EOF 2>&1 | fixbundle
179 > pick 10517e47bbbb d
180 > pick 10517e47bbbb d
180 > pick 7eca9b5b1148 f
181 > pick 7eca9b5b1148 f
181 > pick 915da888f2de e
182 > pick 915da888f2de e
182 > pick 177f92b77385 c
183 > pick 177f92b77385 c
183 > EOF
184 > EOF
184 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
185 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
185 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
186 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
186 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
187 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
187 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -221,21 +221,16 b' slightly different this time'
221
221
222
222
223 keep prevents stripping dead revs
223 keep prevents stripping dead revs
224 $ cat > $EDITED <<EOF
224 $ hg histedit 799205341b6b --keep --commands - 2>&1 << EOF | fixbundle
225 > pick 799205341b6b d
225 > pick 799205341b6b d
226 > pick be9ae3a309c6 f
226 > pick be9ae3a309c6 f
227 > pick 38b92f448761 c
227 > pick 38b92f448761 c
228 > pick de71b079d9ce e
228 > pick de71b079d9ce e
229 > EOF
229 > EOF
230 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 799205341b6b --keep 2>&1 | fixbundle
231 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
230 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
232 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
231 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
233 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
232 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
234 $ hg log --graph
233 $ hg log --graph
235 > cat > $EDITED <<EOF
236 > pick de71b079d9ce e
237 > pick 38b92f448761 c
238 > EOF
239 @ changeset: 7:803ef1c6fcfd
234 @ changeset: 7:803ef1c6fcfd
240 | tag: tip
235 | tag: tip
241 | user: test
236 | user: test
@@ -280,7 +275,10 b' keep prevents stripping dead revs'
280
275
281
276
282 try with --rev
277 try with --rev
283 $ hg histedit --commands "$EDITED" --rev -2 2>&1 | fixbundle
278 $ hg histedit --commands - --rev -2 2>&1 <<EOF | fixbundle
279 > pick de71b079d9ce e
280 > pick 38b92f448761 c
281 > EOF
284 abort: may not use changesets other than the ones listed
282 abort: may not use changesets other than the ones listed
285 $ hg log --graph
283 $ hg log --graph
286 @ changeset: 7:803ef1c6fcfd
284 @ changeset: 7:803ef1c6fcfd
@@ -6,13 +6,6 b''
6 > histedit=
6 > histedit=
7 > EOF
7 > EOF
8
8
9 $ EDITED="$TESTTMP/editedhistory"
10 $ cat > $EDITED <<EOF
11 > drop 177f92b77385 c
12 > pick e860deea161a e
13 > pick 652413bf663e f
14 > pick 055a42cdd887 d
15 > EOF
16 $ initrepo ()
9 $ initrepo ()
17 > {
10 > {
18 > hg init r
11 > hg init r
@@ -61,7 +54,12 b' log before edit'
61
54
62
55
63 edit the history
56 edit the history
64 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
57 $ hg histedit 177f92b77385 --commands - 2>&1 << EOF | fixbundle
58 > drop 177f92b77385 c
59 > pick e860deea161a e
60 > pick 652413bf663e f
61 > pick 055a42cdd887 d
62 > EOF
65 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
63 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
66 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
64 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
67 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
65 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -125,12 +123,11 b' manifest after edit'
125
123
126 Drop the last changeset
124 Drop the last changeset
127
125
128 $ cat > $EDITED <<EOF
126 $ hg histedit ee283cb5f2d5 --commands - 2>&1 << EOF | fixbundle
129 > pick ee283cb5f2d5 e
127 > pick ee283cb5f2d5 e
130 > pick a4f7421b80f7 f
128 > pick a4f7421b80f7 f
131 > drop f518305ce889 d
129 > drop f518305ce889 d
132 > EOF
130 > EOF
133 $ HGEDITOR="cat \"$EDITED\" > " hg histedit ee283cb5f2d5 2>&1 | fixbundle
134 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
131 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
135 $ hg log --graph
132 $ hg log --graph
136 @ changeset: 3:a4f7421b80f7
133 @ changeset: 3:a4f7421b80f7
@@ -6,13 +6,6 b''
6 > histedit=
6 > histedit=
7 > EOF
7 > EOF
8
8
9 $ EDITED="$TESTTMP/editedhistory"
10 $ cat > $EDITED <<EOF
11 > pick 177f92b77385 c
12 > pick 055a42cdd887 d
13 > edit e860deea161a e
14 > pick 652413bf663e f
15 > EOF
16 $ initrepo ()
9 $ initrepo ()
17 > {
10 > {
18 > hg init r
11 > hg init r
@@ -61,7 +54,12 b' log before edit'
61
54
62
55
63 edit the history
56 edit the history
64 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
57 $ hg histedit 177f92b77385 --commands - 2>&1 << EOF| fixbundle
58 > pick 177f92b77385 c
59 > pick 055a42cdd887 d
60 > edit e860deea161a e
61 > pick 652413bf663e f
62 > EOF
65 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
63 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
66 Make changes as needed, you may commit or record as needed now.
64 Make changes as needed, you may commit or record as needed now.
67 When you are finished, run hg histedit --continue to resume.
65 When you are finished, run hg histedit --continue to resume.
@@ -146,10 +144,9 b' check histedit_source'
146
144
147
145
148
146
149 $ cat > $EDITED <<EOF
147 $ hg histedit tip --commands - 2>&1 <<EOF| fixbundle
150 > edit b5f70786f9b0 f
148 > edit b5f70786f9b0 f
151 > EOF
149 > EOF
152 $ HGEDITOR="cat \"$EDITED\" > " hg histedit tip 2>&1 | fixbundle
153 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
150 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
154 Make changes as needed, you may commit or record as needed now.
151 Make changes as needed, you may commit or record as needed now.
155 When you are finished, run hg histedit --continue to resume.
152 When you are finished, run hg histedit --continue to resume.
@@ -188,19 +185,18 b" say we'll change the message, but don't."
188
185
189
186
190 modify the message
187 modify the message
191 $ cat > $EDITED <<EOF
188 $ hg histedit tip --commands - 2>&1 << EOF | fixbundle
192 > mess 1fd3b2fe7754 f
189 > mess 1fd3b2fe7754 f
193 > EOF
190 > EOF
194 $ HGEDITOR="cat \"$EDITED\" > " hg histedit tip 2>&1 | fixbundle
195 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
191 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
196 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
192 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
197 $ hg status
193 $ hg status
198 $ hg log --limit 1
194 $ hg log --limit 1
199 changeset: 6:5585e802ef99
195 changeset: 6:62feedb1200e
200 tag: tip
196 tag: tip
201 user: test
197 user: test
202 date: Thu Jan 01 00:00:00 1970 +0000
198 date: Thu Jan 01 00:00:00 1970 +0000
203 summary: mess 1fd3b2fe7754 f
199 summary: f
204
200
205
201
206 rollback should not work after a histedit
202 rollback should not work after a histedit
@@ -211,9 +207,10 b' rollback should not work after a histedi'
211 $ cd ..
207 $ cd ..
212 $ hg clone -qr0 r r0
208 $ hg clone -qr0 r r0
213 $ cd r0
209 $ cd r0
214 $ echo edit cb9a9f314b8b a > $EDITED
215 $ hg phase -fdr0
210 $ hg phase -fdr0
216 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 0 2>&1
211 $ hg histedit --commands - 0 2>&1 << EOF
212 > edit cb9a9f314b8b a > $EDITED
213 > EOF
217 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
214 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
218 adding a
215 adding a
219 Make changes as needed, you may commit or record as needed now.
216 Make changes as needed, you may commit or record as needed now.
@@ -86,7 +86,7 b' log before edit'
86
86
87
87
88 edit the history
88 edit the history
89 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 3 2>&1 | fixbundle
89 $ hg histedit 3 --commands $EDITED 2>&1 | fixbundle
90 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
91 merging e
91 merging e
92 warning: conflicts during merge.
92 warning: conflicts during merge.
@@ -89,7 +89,7 b' post-fold manifest'
89 check histedit_source
89 check histedit_source
90
90
91 $ hg log --debug --rev 3
91 $ hg log --debug --rev 3
92 changeset: 3:5e24935bad3d5a4486de3b90f233e991465ced72
92 changeset: 3:6de59d13424a8a13acd3e975514aed29dd0d9b2d
93 phase: draft
93 phase: draft
94 parent: 2:ee283cb5f2d5955443f23a27b697a04339e9a39a
94 parent: 2:ee283cb5f2d5955443f23a27b697a04339e9a39a
95 parent: -1:0000000000000000000000000000000000000000
95 parent: -1:0000000000000000000000000000000000000000
@@ -100,10 +100,9 b' check histedit_source'
100 extra: branch=default
100 extra: branch=default
101 extra: histedit_source=a4f7421b80f79fcc59fff01bcbf4a53d127dd6d3,177f92b773850b59254aa5e923436f921b55483b
101 extra: histedit_source=a4f7421b80f79fcc59fff01bcbf4a53d127dd6d3,177f92b773850b59254aa5e923436f921b55483b
102 description:
102 description:
103 pick e860deea161a e
103 f
104 pick 652413bf663e f
104 ***
105 fold 177f92b77385 c
105 c
106 pick 055a42cdd887 d
107
106
108
107
109
108
@@ -136,14 +135,11 b' folded content is dropped during a merge'
136 o 0:0189ba417d34 1+2+3
135 o 0:0189ba417d34 1+2+3
137
136
138
137
139 $ EDITED="$TESTTMP/editedhistory"
138 $ hg histedit 1 --commands - << EOF
140 $ cat > $EDITED <<EOF
141 > pick 617f94f13c0f 1 +4
139 > pick 617f94f13c0f 1 +4
142 > drop 888f9082bf99 2 +5
140 > drop 888f9082bf99 2 +5
143 > fold 251d831eeec5 3 +6
141 > fold 251d831eeec5 3 +6
144 > EOF
142 > EOF
145
146 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 1
147 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
143 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
148 merging file
144 merging file
149 warning: conflicts during merge.
145 warning: conflicts during merge.
@@ -199,13 +195,11 b' dropped revision.'
199 |
195 |
200 o 0:0189ba417d34 1+2+3
196 o 0:0189ba417d34 1+2+3
201
197
202 $ EDITED="$TESTTMP/editcommands"
198 $ hg histedit 1 --commands - << EOF
203 $ cat > $EDITED <<EOF
204 > pick 617f94f13c0f 1 +4
199 > pick 617f94f13c0f 1 +4
205 > drop 888f9082bf99 2 +5
200 > drop 888f9082bf99 2 +5
206 > fold 251d831eeec5 3 +6
201 > fold 251d831eeec5 3 +6
207 > EOF
202 > EOF
208 $ HGEDITOR="cat $EDITED >" hg histedit 1
209 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
203 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
210 merging file
204 merging file
211 warning: conflicts during merge.
205 warning: conflicts during merge.
@@ -6,14 +6,6 b''
6 > histedit=
6 > histedit=
7 > EOF
7 > EOF
8
8
9 $ EDITED="$TESTTMP/editedhistory"
10 $ cat > $EDITED <<EOF
11 > pick 177f92b77385 c
12 > pick 055a42cdd887 d
13 > pick bfa474341cc9 does not commute with e
14 > pick e860deea161a e
15 > pick 652413bf663e f
16 > EOF
17 $ initrepo ()
9 $ initrepo ()
18 > {
10 > {
19 > hg init r
11 > hg init r
@@ -71,7 +63,13 b' log before edit'
71
63
72
64
73 edit the history
65 edit the history
74 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
66 $ hg histedit 177f92b77385 --commands - 2>&1 <<EOF | fixbundle
67 > pick 177f92b77385 c
68 > pick 055a42cdd887 d
69 > pick bfa474341cc9 does not commute with e
70 > pick e860deea161a e
71 > pick 652413bf663e f
72 > EOF
75 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
73 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
76 remote changed e which local deleted
74 remote changed e which local deleted
77 use (c)hanged version or leave (d)eleted? c
75 use (c)hanged version or leave (d)eleted? c
@@ -87,7 +87,7 b' log before edit'
87
87
88
88
89 edit the history
89 edit the history
90 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 3 2>&1 | fixbundle
90 $ hg histedit 3 --commands $EDITED 2>&1 | fixbundle
91 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
91 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
92 merging e
92 merging e
93 warning: conflicts during merge.
93 warning: conflicts during merge.
@@ -145,7 +145,7 b' second edit set'
145
145
146
146
147 edit the history
147 edit the history
148 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 3 2>&1 | fixbundle
148 $ hg histedit 3 --commands $EDITED 2>&1 | fixbundle
149 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
149 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
150 merging e
150 merging e
151 warning: conflicts during merge.
151 warning: conflicts during merge.
@@ -231,7 +231,7 b' start over'
231 pick 500cac37a696 6 f
231 pick 500cac37a696 6 f
232
232
233 edit the history, this time with a fold action
233 edit the history, this time with a fold action
234 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 3 2>&1 | fixbundle
234 $ hg histedit 3 --commands $EDITED 2>&1 | fixbundle
235 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
235 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
236 merging e
236 merging e
237 warning: conflicts during merge.
237 warning: conflicts during merge.
@@ -240,7 +240,7 b' edit the history, this time with a fold '
240
240
241 $ echo 'I can haz no commute' > e
241 $ echo 'I can haz no commute' > e
242 $ hg resolve --mark e
242 $ hg resolve --mark e
243 $ HGEDITOR="cat \"$EDITED\" > " hg histedit --continue 2>&1 | fixbundle
243 $ hg histedit --commands $EDITED --continue 2>&1 | fixbundle
244 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
244 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
245 merging e
245 merging e
246 warning: conflicts during merge.
246 warning: conflicts during merge.
@@ -255,16 +255,16 b' second edit also fails, but just continu'
255
255
256 post message fix
256 post message fix
257 $ hg log --graph
257 $ hg log --graph
258 @ changeset: 6:521c4c32c5e2
258 @ changeset: 6:7efe1373e4bc
259 | tag: tip
259 | tag: tip
260 | user: test
260 | user: test
261 | date: Thu Jan 01 00:00:00 1970 +0000
261 | date: Thu Jan 01 00:00:00 1970 +0000
262 | summary: f
262 | summary: f
263 |
263 |
264 o changeset: 5:f4f088e8adf6
264 o changeset: 5:e334d87a1e55
265 | user: test
265 | user: test
266 | date: Thu Jan 01 00:00:00 1970 +0000
266 | date: Thu Jan 01 00:00:00 1970 +0000
267 | summary: pick 65a9a84f33fd 3 c
267 | summary: does not commute with e
268 |
268 |
269 o changeset: 4:00f1c5383965
269 o changeset: 4:00f1c5383965
270 | user: test
270 | user: test
@@ -59,14 +59,13 b' Enable obsolete'
59 # m, mess = edit message without changing commit content
59 # m, mess = edit message without changing commit content
60 #
60 #
61 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
61 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
62 $ cat > commands.txt <<EOF
62 $ hg histedit 1 --commands - --verbose <<EOF | grep histedit
63 > pick 177f92b77385 2 c
63 > pick 177f92b77385 2 c
64 > drop d2ae7f538514 1 b
64 > drop d2ae7f538514 1 b
65 > pick 055a42cdd887 3 d
65 > pick 055a42cdd887 3 d
66 > fold e860deea161a 4 e
66 > fold e860deea161a 4 e
67 > pick 652413bf663e 5 f
67 > pick 652413bf663e 5 f
68 > EOF
68 > EOF
69 $ hg histedit 1 --commands commands.txt --verbose | grep histedit
70 saved backup bundle to $TESTTMP/base/.hg/strip-backup/96e494a2d553-backup.hg (glob)
69 saved backup bundle to $TESTTMP/base/.hg/strip-backup/96e494a2d553-backup.hg (glob)
71 $ hg log --graph --hidden
70 $ hg log --graph --hidden
72 @ 8:cacdfd884a93 f
71 @ 8:cacdfd884a93 f
@@ -100,12 +99,11 b' Ensure hidden revision does not prevent '
100
99
101 create an hidden revision
100 create an hidden revision
102
101
103 $ cat > commands.txt <<EOF
102 $ hg histedit 6 --commands - << EOF
104 > pick b346ab9a313d 6 c
103 > pick b346ab9a313d 6 c
105 > drop 59d9f330561f 7 d
104 > drop 59d9f330561f 7 d
106 > pick cacdfd884a93 8 f
105 > pick cacdfd884a93 8 f
107 > EOF
106 > EOF
108 $ hg histedit 6 --commands commands.txt
109 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
107 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
110 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
108 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
111 $ hg log --graph
109 $ hg log --graph
@@ -117,11 +115,10 b' create an hidden revision'
117
115
118 check hidden revision are ignored (6 have hidden children 7 and 8)
116 check hidden revision are ignored (6 have hidden children 7 and 8)
119
117
120 $ cat > commands.txt <<EOF
118 $ hg histedit 6 --commands - << EOF
121 > pick b346ab9a313d 6 c
119 > pick b346ab9a313d 6 c
122 > pick c13eb81022ca 8 f
120 > pick c13eb81022ca 8 f
123 > EOF
121 > EOF
124 $ hg histedit 6 --commands commands.txt
125 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
122 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
126
123
127
124
@@ -133,10 +130,9 b' Test that rewriting leaving instability '
133 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
130 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
134 $ hg log -r 'children(.)'
131 $ hg log -r 'children(.)'
135 9:c13eb81022ca f (no-eol)
132 9:c13eb81022ca f (no-eol)
136 $ cat > commands.txt <<EOF
133 $ hg histedit -r '.' --commands - <<EOF
137 > edit b346ab9a313d 6 c
134 > edit b346ab9a313d 6 c
138 > EOF
135 > EOF
139 $ hg histedit -r '.' --commands commands.txt
140 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
136 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
141 adding c
137 adding c
142 Make changes as needed, you may commit or record as needed now.
138 Make changes as needed, you may commit or record as needed now.
@@ -164,11 +160,10 b' dropped changeset to be hidden.'
164 updating to branch default
160 updating to branch default
165 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
161 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
166 $ cd droplast
162 $ cd droplast
167 $ cat > commands.txt <<EOF
163 $ hg histedit -r '40db8afa467b' --commands - << EOF
168 > pick 40db8afa467b 10 c
164 > pick 40db8afa467b 10 c
169 > drop b449568bf7fc 11 f
165 > drop b449568bf7fc 11 f
170 > EOF
166 > EOF
171 $ hg histedit -r '40db8afa467b' --commands commands.txt
172 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
167 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
173 $ hg log -G
168 $ hg log -G
174 @ 10:40db8afa467b c
169 @ 10:40db8afa467b c
@@ -184,12 +179,11 b' With rewritten ancestors'
184 $ echo f > f
179 $ echo f > f
185 $ hg add f
180 $ hg add f
186 $ hg commit -m h
181 $ hg commit -m h
187 $ cat > commands.txt <<EOF
182 $ hg histedit -r '40db8afa467b' --commands - << EOF
188 > pick 47a8561c0449 12 g
183 > pick 47a8561c0449 12 g
189 > pick 40db8afa467b 10 c
184 > pick 40db8afa467b 10 c
190 > drop 1b3b05f35ff0 13 h
185 > drop 1b3b05f35ff0 13 h
191 > EOF
186 > EOF
192 $ hg histedit -r '40db8afa467b' --commands commands.txt
193 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
187 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
194 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
188 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
195 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
189 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -267,7 +261,7 b' New-commit as draft (default)'
267
261
268 $ cp -r base simple-draft
262 $ cp -r base simple-draft
269 $ cd simple-draft
263 $ cd simple-draft
270 $ cat > commands.txt <<EOF
264 $ hg histedit -r 'b449568bf7fc' --commands - << EOF
271 > edit b449568bf7fc 11 f
265 > edit b449568bf7fc 11 f
272 > pick 6b70183d2492 12 g
266 > pick 6b70183d2492 12 g
273 > pick 7395e1ff83bd 13 h
267 > pick 7395e1ff83bd 13 h
@@ -275,7 +269,6 b' New-commit as draft (default)'
275 > pick 3a6c53ee7f3d 15 j
269 > pick 3a6c53ee7f3d 15 j
276 > pick ee118ab9fa44 16 k
270 > pick ee118ab9fa44 16 k
277 > EOF
271 > EOF
278 $ hg histedit -r 'b449568bf7fc' --commands commands.txt
279 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
272 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
280 adding f
273 adding f
281 Make changes as needed, you may commit or record as needed now.
274 Make changes as needed, you may commit or record as needed now.
@@ -317,7 +310,7 b' New-commit as draft (default)'
317 > [phases]
310 > [phases]
318 > new-commit=secret
311 > new-commit=secret
319 > EOF
312 > EOF
320 $ cat > commands.txt <<EOF
313 $ hg histedit -r 'b449568bf7fc' --commands - << EOF
321 > edit b449568bf7fc 11 f
314 > edit b449568bf7fc 11 f
322 > pick 6b70183d2492 12 g
315 > pick 6b70183d2492 12 g
323 > pick 7395e1ff83bd 13 h
316 > pick 7395e1ff83bd 13 h
@@ -325,7 +318,6 b' New-commit as draft (default)'
325 > pick 3a6c53ee7f3d 15 j
318 > pick 3a6c53ee7f3d 15 j
326 > pick ee118ab9fa44 16 k
319 > pick ee118ab9fa44 16 k
327 > EOF
320 > EOF
328 $ hg histedit -r 'b449568bf7fc' --commands commands.txt
329 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
321 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
330 adding f
322 adding f
331 Make changes as needed, you may commit or record as needed now.
323 Make changes as needed, you may commit or record as needed now.
@@ -367,7 +359,7 b' It seems more important to present the s'
367
359
368 $ cp -r base reorder
360 $ cp -r base reorder
369 $ cd reorder
361 $ cd reorder
370 $ cat > commands.txt <<EOF
362 $ hg histedit -r 'b449568bf7fc' --commands - << EOF
371 > pick b449568bf7fc 11 f
363 > pick b449568bf7fc 11 f
372 > pick 3a6c53ee7f3d 15 j
364 > pick 3a6c53ee7f3d 15 j
373 > pick 6b70183d2492 12 g
365 > pick 6b70183d2492 12 g
@@ -375,7 +367,6 b' It seems more important to present the s'
375 > pick 7395e1ff83bd 13 h
367 > pick 7395e1ff83bd 13 h
376 > pick ee118ab9fa44 16 k
368 > pick ee118ab9fa44 16 k
377 > EOF
369 > EOF
378 $ hg histedit -r 'b449568bf7fc' --commands commands.txt
379 0 files updated, 0 files merged, 5 files removed, 0 files unresolved
370 0 files updated, 0 files merged, 5 files removed, 0 files unresolved
380 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
371 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
381 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
372 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -415,7 +406,7 b' Note that there is a few reordering in t'
415 > [phases]
406 > [phases]
416 > new-commit=secret
407 > new-commit=secret
417 > EOF
408 > EOF
418 $ cat > commands.txt <<EOF
409 $ hg histedit -r 'b449568bf7fc' --commands - << EOF
419 > pick 7395e1ff83bd 13 h
410 > pick 7395e1ff83bd 13 h
420 > fold b449568bf7fc 11 f
411 > fold b449568bf7fc 11 f
421 > pick 6b70183d2492 12 g
412 > pick 6b70183d2492 12 g
@@ -423,7 +414,6 b' Note that there is a few reordering in t'
423 > pick b605fb7503f2 14 i
414 > pick b605fb7503f2 14 i
424 > fold ee118ab9fa44 16 k
415 > fold ee118ab9fa44 16 k
425 > EOF
416 > EOF
426 $ hg histedit -r 'b449568bf7fc' --commands commands.txt
427 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
417 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
428 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
418 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
429 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
419 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
General Comments 0
You need to be logged in to leave comments. Login now