comparison tests/test-histedit-fold-non-commute.t @ 31056:37ab9e20991c

histedit: modify rollup to discard date from the rollup commit (issue4820) This change adjusts and documents the new behaviour of 'roll'. It now fits nicely with the behaviour of 'commit --amend' and the 'edit' action, by discarding the date as well as the commit message of the second commit. Previously it used the later date, like 'fold', but this often wasn't desirable, for example, in the common use case of using 'roll' to add forgotten changes to a changeset (because 'hg add' was previously forgotten or not all changes were identified while using 'hg record').
author Ben Schmidt <insightfuls@users.noreply.github.com>
date Sat, 18 Feb 2017 21:30:28 +1100
parents f1b63ec4b987
children 15d2afa31e57
comparison
equal deleted inserted replaced
31055:f1b63ec4b987 31056:37ab9e20991c
181 e 181 e
182 f 182 f
183 183
184 $ cd .. 184 $ cd ..
185 185
186 Repeat test using "roll", not "fold". "roll" folds in changes but drops message 186 Repeat test using "roll", not "fold". "roll" folds in changes but drops message and date
187 187
188 $ initrepo r2 188 $ initrepo r2
189 $ cd r2 189 $ cd r2
190 190
191 Initial generation of the command files 191 Initial generation of the command files
274 $ hg histedit --continue 2>&1 | fixbundle 274 $ hg histedit --continue 2>&1 | fixbundle
275 7f3755409b00: skipping changeset (no changes) 275 7f3755409b00: skipping changeset (no changes)
276 276
277 log after edit 277 log after edit
278 $ hg log --graph 278 $ hg log --graph
279 @ changeset: 5:162978f027fb 279 @ changeset: 5:b538bcb461be
280 | tag: tip 280 | tag: tip
281 | user: test 281 | user: test
282 | date: Thu Jan 01 00:00:06 1970 +0000 282 | date: Thu Jan 01 00:00:06 1970 +0000
283 | summary: f 283 | summary: f
284 | 284 |
285 o changeset: 4:74e5e6c6c32f 285 o changeset: 4:317e37cb6d66
286 | user: test 286 | user: test
287 | date: Thu Jan 01 00:00:07 1970 +0000 287 | date: Thu Jan 01 00:00:04 1970 +0000
288 | summary: d 288 | summary: d
289 | 289 |
290 o changeset: 3:092e4ce14829 290 o changeset: 3:092e4ce14829
291 | user: test 291 | user: test
292 | date: Thu Jan 01 00:00:03 1970 +0000 292 | date: Thu Jan 01 00:00:03 1970 +0000
322 f 322 f
323 323
324 description is taken from rollup target commit 324 description is taken from rollup target commit
325 325
326 $ hg log --debug --rev 4 326 $ hg log --debug --rev 4
327 changeset: 4:74e5e6c6c32fa39f0eeed43302fd48633ea5926f 327 changeset: 4:317e37cb6d66c1c84628c00e5bf4c8c292831951
328 phase: draft 328 phase: draft
329 parent: 3:092e4ce14829f4974399ce4316d59f64ef0b6725 329 parent: 3:092e4ce14829f4974399ce4316d59f64ef0b6725
330 parent: -1:0000000000000000000000000000000000000000 330 parent: -1:0000000000000000000000000000000000000000
331 manifest: 4:b068a323d969f22af1296ec6a5ea9384cef437ac 331 manifest: 4:b068a323d969f22af1296ec6a5ea9384cef437ac
332 user: test 332 user: test
333 date: Thu Jan 01 00:00:07 1970 +0000 333 date: Thu Jan 01 00:00:04 1970 +0000
334 files: d e 334 files: d e
335 extra: branch=default 335 extra: branch=default
336 extra: histedit_source=ae78f4c9d74ffa4b6cb5045001c303fe9204e890,42abbb61bede6f4366fa1e74a664343e5d558a70 336 extra: histedit_source=ae78f4c9d74ffa4b6cb5045001c303fe9204e890,42abbb61bede6f4366fa1e74a664343e5d558a70
337 description: 337 description:
338 d 338 d