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