Mercurial > evolve
comparison tests/test-userguide.t @ 3105:f5d472b7e800 mercurial-4.3
test-compat: revert output changes related to temporary amend commit
This backed out changeset 06844693bb21 and other related changes.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 20 Oct 2017 19:32:18 +0200 |
parents | 945a0989e41b |
children | a867d59ea97a |
comparison
equal
deleted
inserted
replaced
3104:3dd5a6f83f8b | 3105:f5d472b7e800 |
---|---|
40 $ hg shortlog -q -r fe0ecd3bd2a4 | 40 $ hg shortlog -q -r fe0ecd3bd2a4 |
41 abort: hidden revision 'fe0ecd3bd2a4'! | 41 abort: hidden revision 'fe0ecd3bd2a4'! |
42 (use --hidden to access hidden revisions; successor: 934359450037) | 42 (use --hidden to access hidden revisions; successor: 934359450037) |
43 [255] | 43 [255] |
44 $ hg --hidden shortlog -G | 44 $ hg --hidden shortlog -G |
45 @ 2:934359450037 draft implement feature Y | 45 @ 3:934359450037 draft implement feature Y |
46 | | 46 | |
47 | x 2:6c5f78d5d467 draft temporary amend commit for fe0ecd3bd2a4 | |
48 | | | |
47 | x 1:fe0ecd3bd2a4 draft implement feature Y | 49 | x 1:fe0ecd3bd2a4 draft implement feature Y |
48 |/ | 50 |/ |
49 o 0:08c4b6f4efc8 draft init | 51 o 0:08c4b6f4efc8 draft init |
50 | 52 |
51 example 3 redux: repeat safe amend, this time with "hg amend" | 53 example 3 redux: repeat safe amend, this time with "hg amend" |
52 $ hg rollback -q | 54 $ hg rollback -q |
53 $ hg amend -u alice -d '2 0' -m 'implement feature Y' | 55 $ hg amend -u alice -d '2 0' -m 'implement feature Y' |
54 $ hg --hidden shortlog -G | 56 $ hg --hidden shortlog -G |
55 @ 2:934359450037 draft implement feature Y | 57 @ 3:934359450037 draft implement feature Y |
56 | | 58 | |
59 | x 2:6c5f78d5d467 draft temporary amend commit for fe0ecd3bd2a4 | |
60 | | | |
57 | x 1:fe0ecd3bd2a4 draft implement feature Y | 61 | x 1:fe0ecd3bd2a4 draft implement feature Y |
58 |/ | 62 |/ |
59 o 0:08c4b6f4efc8 draft init | 63 o 0:08c4b6f4efc8 draft init |
60 | 64 |
61 example 4: prune at head (figure 3) | 65 example 4: prune at head (figure 3) |
64 $ hg prune . | 68 $ hg prune . |
65 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 69 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
66 working directory now at 934359450037 | 70 working directory now at 934359450037 |
67 1 changesets pruned | 71 1 changesets pruned |
68 $ hg parents --template '{rev}:{node|short} {desc|firstline}\n' | 72 $ hg parents --template '{rev}:{node|short} {desc|firstline}\n' |
69 2:934359450037 implement feature Y | 73 3:934359450037 implement feature Y |
70 $ hg --hidden shortlog -G -r 934359450037: | 74 $ hg --hidden shortlog -G -r 934359450037: |
71 x 3:a3e0ef24aaf0 draft debug hack | 75 x 4:a3e0ef24aaf0 draft debug hack |
72 | | 76 | |
73 @ 2:934359450037 draft implement feature Y | 77 @ 3:934359450037 draft implement feature Y |
74 | | 78 | |
75 ~ | 79 ~ |
76 | 80 |
77 example 5: uncommit files at head (figure 4) | 81 example 5: uncommit files at head (figure 4) |
78 $ echo 'relevant' >> file1.c | 82 $ echo 'relevant' >> file1.c |
80 $ hg commit -u dan -d '10 0' -m 'fix bug 234' | 84 $ hg commit -u dan -d '10 0' -m 'fix bug 234' |
81 $ hg uncommit file2.c | 85 $ hg uncommit file2.c |
82 $ hg status | 86 $ hg status |
83 M file2.c | 87 M file2.c |
84 $ hg --hidden shortlog -G -r 'descendants(934359450037) - a3e0ef24aaf0' | 88 $ hg --hidden shortlog -G -r 'descendants(934359450037) - a3e0ef24aaf0' |
85 @ 5:c8defeecf7a4 draft fix bug 234 | 89 @ 6:c8defeecf7a4 draft fix bug 234 |
86 | | 90 | |
87 | x 4:da4331967f5f draft fix bug 234 | 91 | x 5:da4331967f5f draft fix bug 234 |
88 |/ | 92 |/ |
89 o 2:934359450037 draft implement feature Y | 93 o 3:934359450037 draft implement feature Y |
90 | | 94 | |
91 ~ | 95 ~ |
92 $ hg parents --template '{rev}:{node|short} {desc|firstline}\n{files}\n' | 96 $ hg parents --template '{rev}:{node|short} {desc|firstline}\n{files}\n' |
93 5:c8defeecf7a4 fix bug 234 | 97 6:c8defeecf7a4 fix bug 234 |
94 file1.c | 98 file1.c |
95 $ hg revert --no-backup file2.c | 99 $ hg revert --no-backup file2.c |
96 | 100 |
97 example 6: fold multiple changesets together into one (figure 5) | 101 example 6: fold multiple changesets together into one (figure 5) |
98 $ echo step1 >> file1.c | 102 $ echo step1 >> file1.c |
100 $ echo step2 >> file1.c | 104 $ echo step2 >> file1.c |
101 $ hg commit -m 'step 2' | 105 $ hg commit -m 'step 2' |
102 $ echo step3 >> file2.c | 106 $ echo step3 >> file2.c |
103 $ hg commit -m 'step 3' | 107 $ hg commit -m 'step 3' |
104 $ hg log --template '{rev}:{node|short} {desc|firstline}\n' -r 05e61aab8294:: | 108 $ hg log --template '{rev}:{node|short} {desc|firstline}\n' -r 05e61aab8294:: |
105 6:05e61aab8294 step 1 | 109 7:05e61aab8294 step 1 |
106 7:be6d5bc8e4cc step 2 | 110 8:be6d5bc8e4cc step 2 |
107 8:35f432d9f7c1 step 3 | 111 9:35f432d9f7c1 step 3 |
108 $ hg fold -d '0 0' -m 'fix bug 64' --from -r 05e61aab8294:: | 112 $ hg fold -d '0 0' -m 'fix bug 64' --from -r 05e61aab8294:: |
109 3 changesets folded | 113 3 changesets folded |
110 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 114 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
111 $ hg --hidden shortlog -G -r c8defeecf7a4:: | 115 $ hg --hidden shortlog -G -r c8defeecf7a4:: |
112 @ 9:171c6a79a27b draft fix bug 64 | 116 @ 10:171c6a79a27b draft fix bug 64 |
113 | | 117 | |
114 | x 8:35f432d9f7c1 draft step 3 | 118 | x 9:35f432d9f7c1 draft step 3 |
115 | | | 119 | | |
116 | x 7:be6d5bc8e4cc draft step 2 | 120 | x 8:be6d5bc8e4cc draft step 2 |
117 | | | 121 | | |
118 | x 6:05e61aab8294 draft step 1 | 122 | x 7:05e61aab8294 draft step 1 |
119 |/ | 123 |/ |
120 o 5:c8defeecf7a4 draft fix bug 234 | 124 o 6:c8defeecf7a4 draft fix bug 234 |
121 | | 125 | |
122 ~ | 126 ~ |
123 $ hg --hidden log -q -r 'successors(05e61aab8294) | successors(be6d5bc8e4cc) | successors(35f432d9f7c1)' | 127 $ hg --hidden log -q -r 'successors(05e61aab8294) | successors(be6d5bc8e4cc) | successors(35f432d9f7c1)' |
124 9:171c6a79a27b | 128 10:171c6a79a27b |
125 $ hg --hidden log -q -r 'precursors(171c6a79a27b)' | 129 $ hg --hidden log -q -r 'precursors(171c6a79a27b)' |
126 6:05e61aab8294 | 130 7:05e61aab8294 |
127 7:be6d5bc8e4cc | 131 8:be6d5bc8e4cc |
128 8:35f432d9f7c1 | 132 9:35f432d9f7c1 |
129 $ hg diff -c 171c6a79a27b -U 0 | 133 $ hg diff -c 171c6a79a27b -U 0 |
130 diff -r c8defeecf7a4 -r 171c6a79a27b file1.c | 134 diff -r c8defeecf7a4 -r 171c6a79a27b file1.c |
131 --- a/file1.c Thu Jan 01 00:00:10 1970 +0000 | 135 --- a/file1.c Thu Jan 01 00:00:10 1970 +0000 |
132 +++ b/file1.c Thu Jan 01 00:00:00 1970 +0000 | 136 +++ b/file1.c Thu Jan 01 00:00:00 1970 +0000 |
133 @@ -3,0 +4,2 @@ | 137 @@ -3,0 +4,2 @@ |
145 $ echo 'cleanup' >> file1.c | 149 $ echo 'cleanup' >> file1.c |
146 $ hg commit -u bob -d '4 0' -m 'cleanup' | 150 $ hg commit -u bob -d '4 0' -m 'cleanup' |
147 $ echo 'new feature' >> file1.c | 151 $ echo 'new feature' >> file1.c |
148 $ hg commit -u bob -d '5 0' -m 'feature 23' | 152 $ hg commit -u bob -d '5 0' -m 'feature 23' |
149 $ hg --hidden shortlog -G -r 171c6a79a27b:: | 153 $ hg --hidden shortlog -G -r 171c6a79a27b:: |
150 @ 12:dadcbba2d606 draft feature 23 | 154 @ 13:dadcbba2d606 draft feature 23 |
151 | | 155 | |
152 o 11:debd46bb29dc draft cleanup | 156 o 12:debd46bb29dc draft cleanup |
153 | | 157 | |
154 o 10:3e1cb8f70c02 draft fix bug 17 | 158 o 11:3e1cb8f70c02 draft fix bug 17 |
155 | | 159 | |
156 o 9:171c6a79a27b draft fix bug 64 | 160 o 10:171c6a79a27b draft fix bug 64 |
157 | | 161 | |
158 ~ | 162 ~ |
159 | 163 |
160 example 7: amend an older changeset (figures 6, 7) | 164 example 7: amend an older changeset (figures 6, 7) |
161 $ hg update -q -r 3e1cb8f70c02 | 165 $ hg update -q -r 3e1cb8f70c02 |
162 $ echo 'fix fix fix fix' > file2.c | 166 $ echo 'fix fix fix fix' > file2.c |
163 $ hg amend -u bob -d '6 0' | 167 $ hg amend -u bob -d '6 0' |
164 2 new orphan changesets | 168 2 new orphan changesets |
165 $ hg shortlog -r 'obsolete()' | 169 $ hg shortlog -r 'obsolete()' |
166 10:3e1cb8f70c02 draft fix bug 17 | 170 11:3e1cb8f70c02 draft fix bug 17 |
167 $ hg shortlog -r "orphan()" | 171 $ hg shortlog -r "orphan()" |
168 11:debd46bb29dc draft cleanup | 172 12:debd46bb29dc draft cleanup |
169 12:dadcbba2d606 draft feature 23 | 173 13:dadcbba2d606 draft feature 23 |
170 $ hg --hidden shortlog -G -r 171c6a79a27b:: | 174 $ hg --hidden shortlog -G -r 171c6a79a27b:: |
171 @ 13:395cbeda3a06 draft fix bug 17 | 175 @ 15:395cbeda3a06 draft fix bug 17 |
172 | | 176 | |
173 | o 12:dadcbba2d606 draft feature 23 | 177 | x 14:f7fab707e247 draft temporary amend commit for 3e1cb8f70c02 |
174 | | | 178 | | |
175 | o 11:debd46bb29dc draft cleanup | 179 | | o 13:dadcbba2d606 draft feature 23 |
176 | | | 180 | | | |
177 | x 10:3e1cb8f70c02 draft fix bug 17 | 181 | | o 12:debd46bb29dc draft cleanup |
178 |/ | 182 | |/ |
179 o 9:171c6a79a27b draft fix bug 64 | 183 | x 11:3e1cb8f70c02 draft fix bug 17 |
184 |/ | |
185 o 10:171c6a79a27b draft fix bug 64 | |
180 | | 186 | |
181 ~ | 187 ~ |
182 $ hg evolve -q --all | 188 $ hg evolve -q --all |
183 $ hg shortlog -G -r 171c6a79a27b:: | 189 $ hg shortlog -G -r 171c6a79a27b:: |
184 @ 15:91b4b0f8b5c5 draft feature 23 | 190 @ 17:91b4b0f8b5c5 draft feature 23 |
185 | | 191 | |
186 o 14:fe8858bd9bc2 draft cleanup | 192 o 16:fe8858bd9bc2 draft cleanup |
187 | | 193 | |
188 o 13:395cbeda3a06 draft fix bug 17 | 194 o 15:395cbeda3a06 draft fix bug 17 |
189 | | 195 | |
190 o 9:171c6a79a27b draft fix bug 64 | 196 o 10:171c6a79a27b draft fix bug 64 |
191 | | 197 | |
192 ~ | 198 ~ |
193 | 199 |
194 setup for example 8: prune an older changeset (figure 8) | 200 setup for example 8: prune an older changeset (figure 8) |
195 $ echo 'useful' >> file1.c | 201 $ echo 'useful' >> file1.c |
197 $ echo 'debug' >> file2.c | 203 $ echo 'debug' >> file2.c |
198 $ hg commit -u carl -d '8 0' -m 'debug hack' | 204 $ hg commit -u carl -d '8 0' -m 'debug hack' |
199 $ echo 'more useful' >> file1.c | 205 $ echo 'more useful' >> file1.c |
200 $ hg commit -u carl -d '9 0' -m 'more work' | 206 $ hg commit -u carl -d '9 0' -m 'more work' |
201 $ hg shortlog -G -r 91b4b0f8b5c5:: | 207 $ hg shortlog -G -r 91b4b0f8b5c5:: |
202 @ 18:ea8fafca914b draft more work | 208 @ 20:ea8fafca914b draft more work |
203 | | 209 | |
204 o 17:b23d06b457a8 draft debug hack | 210 o 19:b23d06b457a8 draft debug hack |
205 | | 211 | |
206 o 16:1f33e68b18b9 draft useful work | 212 o 18:1f33e68b18b9 draft useful work |
207 | | 213 | |
208 o 15:91b4b0f8b5c5 draft feature 23 | 214 o 17:91b4b0f8b5c5 draft feature 23 |
209 | | 215 | |
210 ~ | 216 ~ |
211 | 217 |
212 example 8: prune an older changeset (figures 8, 9) | 218 example 8: prune an older changeset (figures 8, 9) |
213 $ hg prune b23d06b457a8 | 219 $ hg prune b23d06b457a8 |
214 1 changesets pruned | 220 1 changesets pruned |
215 1 new orphan changesets | 221 1 new orphan changesets |
216 $ hg --hidden shortlog -G -r b23d06b457a8:: | 222 $ hg --hidden shortlog -G -r b23d06b457a8:: |
217 @ 18:ea8fafca914b draft more work | 223 @ 20:ea8fafca914b draft more work |
218 | | 224 | |
219 x 17:b23d06b457a8 draft debug hack | 225 x 19:b23d06b457a8 draft debug hack |
220 | | 226 | |
221 ~ | 227 ~ |
222 $ hg evolve -q --all --any | 228 $ hg evolve -q --all --any |
223 $ hg --hidden shortlog -G -r 1f33e68b18b9:: | 229 $ hg --hidden shortlog -G -r 1f33e68b18b9:: |
224 @ 19:4393e5877437 draft more work | 230 @ 21:4393e5877437 draft more work |
225 | | 231 | |
226 | x 18:ea8fafca914b draft more work | 232 | x 20:ea8fafca914b draft more work |
227 | | | 233 | | |
228 | x 17:b23d06b457a8 draft debug hack | 234 | x 19:b23d06b457a8 draft debug hack |
229 |/ | 235 |/ |
230 o 16:1f33e68b18b9 draft useful work | 236 o 18:1f33e68b18b9 draft useful work |
231 | | 237 | |
232 ~ | 238 ~ |
233 | 239 |
234 example 9: uncommit files from an older changeset (discard changes) | 240 example 9: uncommit files from an older changeset (discard changes) |
235 (figure 10) | 241 (figure 10) |
239 $ echo 'and this handles bug 67' >> file1.c | 245 $ echo 'and this handles bug 67' >> file1.c |
240 $ hg commit -u dan -d '12 0' -m 'fix bug 67' | 246 $ hg commit -u dan -d '12 0' -m 'fix bug 67' |
241 $ hg update -r f84357446753 | 247 $ hg update -r f84357446753 |
242 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 248 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
243 $ hg shortlog -G -r 4393e5877437:: | 249 $ hg shortlog -G -r 4393e5877437:: |
244 o 21:4db2428c8ae3 draft fix bug 67 | 250 o 23:4db2428c8ae3 draft fix bug 67 |
245 | | 251 | |
246 @ 20:f84357446753 draft fix bug 53 | 252 @ 22:f84357446753 draft fix bug 53 |
247 | | 253 | |
248 o 19:4393e5877437 draft more work | 254 o 21:4393e5877437 draft more work |
249 | | 255 | |
250 ~ | 256 ~ |
251 $ hg uncommit file2.c | 257 $ hg uncommit file2.c |
252 1 new orphan changesets | 258 1 new orphan changesets |
253 $ hg status | 259 $ hg status |
254 M file2.c | 260 M file2.c |
255 $ hg revert file2.c | 261 $ hg revert file2.c |
256 $ hg evolve --all --any | 262 $ hg evolve --all --any |
257 move:[21] fix bug 67 | 263 move:[23] fix bug 67 |
258 atop:[22] fix bug 53 | 264 atop:[24] fix bug 53 |
259 working directory is now at 0d972d6888e6 | 265 working directory is now at 0d972d6888e6 |
260 $ hg --hidden shortlog -G -r 4393e5877437:: | 266 $ hg --hidden shortlog -G -r 4393e5877437:: |
261 @ 23:0d972d6888e6 draft fix bug 67 | 267 @ 25:0d972d6888e6 draft fix bug 67 |
262 | | 268 | |
263 o 22:71bb83d674c5 draft fix bug 53 | 269 o 24:71bb83d674c5 draft fix bug 53 |
264 | | 270 | |
265 | x 21:4db2428c8ae3 draft fix bug 67 | 271 | x 23:4db2428c8ae3 draft fix bug 67 |
266 | | | 272 | | |
267 | x 20:f84357446753 draft fix bug 53 | 273 | x 22:f84357446753 draft fix bug 53 |
268 |/ | 274 |/ |
269 o 19:4393e5877437 draft more work | 275 o 21:4393e5877437 draft more work |
270 | | 276 | |
271 ~ | 277 ~ |
272 $ rm file2.c.orig | 278 $ rm file2.c.orig |
273 | 279 |
274 example 10: uncommit files from an older changeset (keep changes) | 280 example 10: uncommit files from an older changeset (keep changes) |
279 $ echo 'new feature' >> file1.c | 285 $ echo 'new feature' >> file1.c |
280 $ hg commit -u dan -d '12 0' -m 'new feature' | 286 $ hg commit -u dan -d '12 0' -m 'new feature' |
281 $ hg update 5b31a1239ab9 | 287 $ hg update 5b31a1239ab9 |
282 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 288 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
283 $ hg --hidden shortlog -G -r 0d972d6888e6:: | 289 $ hg --hidden shortlog -G -r 0d972d6888e6:: |
284 o 25:fbb3c6d50427 draft new feature | 290 o 27:fbb3c6d50427 draft new feature |
285 | | 291 | |
286 @ 24:5b31a1239ab9 draft fix a bug | 292 @ 26:5b31a1239ab9 draft fix a bug |
287 | | 293 | |
288 o 23:0d972d6888e6 draft fix bug 67 | 294 o 25:0d972d6888e6 draft fix bug 67 |
289 | | 295 | |
290 ~ | 296 ~ |
291 $ hg uncommit file2.c | 297 $ hg uncommit file2.c |
292 1 new orphan changesets | 298 1 new orphan changesets |
293 $ hg status | 299 $ hg status |
294 M file2.c | 300 M file2.c |
295 $ hg commit -m 'useful tweak' | 301 $ hg commit -m 'useful tweak' |
296 $ hg --hidden shortlog -G -r 0d972d6888e6:: | 302 $ hg --hidden shortlog -G -r 0d972d6888e6:: |
297 @ 27:51e0d8c0a922 draft useful tweak | 303 @ 29:51e0d8c0a922 draft useful tweak |
298 | | 304 | |
299 o 26:2594e98553a9 draft fix a bug | 305 o 28:2594e98553a9 draft fix a bug |
300 | | 306 | |
301 | o 25:fbb3c6d50427 draft new feature | 307 | o 27:fbb3c6d50427 draft new feature |
302 | | | 308 | | |
303 | x 24:5b31a1239ab9 draft fix a bug | 309 | x 26:5b31a1239ab9 draft fix a bug |
304 |/ | 310 |/ |
305 o 23:0d972d6888e6 draft fix bug 67 | 311 o 25:0d972d6888e6 draft fix bug 67 |
306 | | 312 | |
307 ~ | 313 ~ |
308 $ hg evolve --all --any | 314 $ hg evolve --all --any |
309 move:[25] new feature | 315 move:[27] new feature |
310 atop:[26] fix a bug | 316 atop:[28] fix a bug |
311 working directory is now at 166c1c368ab6 | 317 working directory is now at 166c1c368ab6 |
312 $ hg --hidden shortlog -G -r 0d972d6888e6:: | 318 $ hg --hidden shortlog -G -r 0d972d6888e6:: |
313 @ 28:166c1c368ab6 draft new feature | 319 @ 30:166c1c368ab6 draft new feature |
314 | | 320 | |
315 | o 27:51e0d8c0a922 draft useful tweak | 321 | o 29:51e0d8c0a922 draft useful tweak |
316 |/ | 322 |/ |
317 o 26:2594e98553a9 draft fix a bug | 323 o 28:2594e98553a9 draft fix a bug |
318 | | 324 | |
319 | x 25:fbb3c6d50427 draft new feature | 325 | x 27:fbb3c6d50427 draft new feature |
320 | | | 326 | | |
321 | x 24:5b31a1239ab9 draft fix a bug | 327 | x 26:5b31a1239ab9 draft fix a bug |
322 |/ | 328 |/ |
323 o 23:0d972d6888e6 draft fix bug 67 | 329 o 25:0d972d6888e6 draft fix bug 67 |
324 | | 330 | |
325 ~ | 331 ~ |