##// END OF EJS Templates
test: enable sparse-revlog for test-clonebundles.t...
test: enable sparse-revlog for test-clonebundles.t We are about to enable sparse-revlog globally. To help with reviewing the tests change, we isolate them in individual changesets. Differential Revision: https://phab.mercurial-scm.org/D5316

File last commit:

r31056:37ab9e20 default
r40925:abac9d18 default
Show More
test-histedit-fold-non-commute.t
344 lines | 8.7 KiB | text/troff | Tads3Lexer
/ tests / test-histedit-fold-non-commute.t
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 $ . "$TESTDIR/histedit-helpers.sh"
$ cat >> $HGRCPATH <<EOF
> [extensions]
> histedit=
> EOF
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 $ modwithdate ()
> {
> echo $1 > $1
> hg ci -m $1 -d "$2 0"
> }
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 $ initrepo ()
> {
> hg init $1
> cd $1
> for x in a b c d e f ; do
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 > echo $x$x$x$x$x > $x
> hg add $x
> done
> hg ci -m 'Initial commit'
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 > modwithdate a 1
> modwithdate b 2
> modwithdate c 3
> modwithdate d 4
> modwithdate e 5
> modwithdate f 6
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 > echo 'I can haz no commute' > e
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 > hg ci -m 'does not commute with e' -d '7 0'
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 > cd ..
> }
$ initrepo r
$ cd r
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 Initial generation of the command files
$ EDITED="$TESTTMP/editedhistory"
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 3 >> $EDITED
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 4 >> $EDITED
$ hg log --template 'fold {node|short} {rev} {desc}\n' -r 7 >> $EDITED
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 5 >> $EDITED
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 6 >> $EDITED
$ cat $EDITED
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 pick 092e4ce14829 3 c
pick ae78f4c9d74f 4 d
fold 42abbb61bede 7 does not commute with e
pick 7f3755409b00 5 e
pick dd184f2faeb0 6 f
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
log before edit
$ hg log --graph
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 @ changeset: 7:42abbb61bede
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | tag: tip
| user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:07 1970 +0000
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | summary: does not commute with e
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 6:dd184f2faeb0
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:06 1970 +0000
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | summary: f
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 5:7f3755409b00
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:05 1970 +0000
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | summary: e
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 4:ae78f4c9d74f
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:04 1970 +0000
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | summary: d
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 3:092e4ce14829
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:03 1970 +0000
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | summary: c
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 2:40ccdd8beb95
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:02 1970 +0000
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | summary: b
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 1:cd997a145b29
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:01 1970 +0000
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 | summary: a
|
o changeset: 0:1715188a53c7
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 user: test
date: Thu Jan 01 00:00:00 1970 +0000
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 summary: Initial commit
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
edit the history
Pierre-Yves David
histedit-test: generalise --commands "-" usage...
r19019 $ hg histedit 3 --commands $EDITED 2>&1 | fixbundle
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
Pierre-Yves David
histedit: replaces patching logic by merges...
r17647 merging e
Siddharth Agarwal
simplemerge: move conflict warning message to filemerge...
r26614 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 Fix up the change (fold 42abbb61bede)
timeless
histedit: list action when intervention is required
r27629 (hg histedit --continue to resume)
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
fix up
Pierre-Yves David
histedit: replaces patching logic by merges...
r17647 $ echo 'I can haz no commute' > e
$ hg resolve --mark e
Pierre-Yves David
resolve: add parenthesis around "no more unresolved files" message...
r21947 (no more unresolved files)
timeless
histedit: hook afterresolvedstates
r27627 continue: hg histedit --continue
timeless
tests: replace cat.py with cat in test-histedit-fold-non-commute.t
r28339 $ HGEDITOR=cat hg histedit --continue 2>&1 | fixbundle | grep -v '2 files removed'
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 d
***
does not commute with e
Patrick Mezard
histedit: end folding message with an LF...
r17241
Pierre-Yves David
histedit: fold in memory...
r17644 HG: Enter commit message. Lines beginning with 'HG:' are removed.
HG: Leave message empty to abort commit.
HG: --
HG: user: test
HG: branch 'default'
HG: changed d
HG: changed e
Pierre-Yves David
histedit: replaces patching logic by merges...
r17647 merging e
Siddharth Agarwal
simplemerge: move conflict warning message to filemerge...
r26614 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 Fix up the change (pick 7f3755409b00)
timeless
histedit: list action when intervention is required
r27629 (hg histedit --continue to resume)
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
just continue this time
timeless
histedit: reword message when a changeset produces no changes...
r28340 keep the non-commuting change, and thus the pending change will be dropped
Pierre-Yves David
histedit: replaces patching logic by merges...
r17647 $ hg revert -r 'p1()' e
$ hg resolve --mark e
Pierre-Yves David
resolve: add parenthesis around "no more unresolved files" message...
r21947 (no more unresolved files)
timeless
histedit: hook afterresolvedstates
r27627 continue: hg histedit --continue
timeless
histedit: reword message when a changeset produces no changes...
r28340 $ hg diff
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 $ hg histedit --continue 2>&1 | fixbundle
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 7f3755409b00: skipping changeset (no changes)
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
log after edit
$ hg log --graph
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 @ changeset: 5:1300355b1a54
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | tag: tip
| user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:06 1970 +0000
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | summary: f
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 4:e2ac33269083
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:07 1970 +0000
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | summary: d
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 3:092e4ce14829
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:03 1970 +0000
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | summary: c
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 2:40ccdd8beb95
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:02 1970 +0000
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | summary: b
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 1:cd997a145b29
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:01 1970 +0000
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 | summary: a
|
o changeset: 0:1715188a53c7
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 user: test
date: Thu Jan 01 00:00:00 1970 +0000
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 summary: Initial commit
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
contents of e
$ hg cat e
Pierre-Yves David
histedit: replaces patching logic by merges...
r17647 I can haz no commute
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
manifest
$ hg manifest
a
b
c
d
e
f
$ cd ..
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152
Ben Schmidt
histedit: modify rollup to discard date from the rollup commit (issue4820)...
r31056 Repeat test using "roll", not "fold". "roll" folds in changes but drops message and date
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152
$ initrepo r2
$ cd r2
Initial generation of the command files
$ EDITED="$TESTTMP/editedhistory.2"
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 3 >> $EDITED
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 4 >> $EDITED
$ hg log --template 'roll {node|short} {rev} {desc}\n' -r 7 >> $EDITED
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 5 >> $EDITED
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 6 >> $EDITED
$ cat $EDITED
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 pick 092e4ce14829 3 c
pick ae78f4c9d74f 4 d
roll 42abbb61bede 7 does not commute with e
pick 7f3755409b00 5 e
pick dd184f2faeb0 6 f
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152
log before edit
$ hg log --graph
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 @ changeset: 7:42abbb61bede
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | tag: tip
| user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:07 1970 +0000
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | summary: does not commute with e
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 6:dd184f2faeb0
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:06 1970 +0000
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | summary: f
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 5:7f3755409b00
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:05 1970 +0000
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | summary: e
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 4:ae78f4c9d74f
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:04 1970 +0000
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | summary: d
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 3:092e4ce14829
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:03 1970 +0000
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | summary: c
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 2:40ccdd8beb95
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:02 1970 +0000
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | summary: b
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 1:cd997a145b29
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:01 1970 +0000
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | summary: a
|
o changeset: 0:1715188a53c7
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: Initial commit
edit the history
$ hg histedit 3 --commands $EDITED 2>&1 | fixbundle
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
merging e
Siddharth Agarwal
simplemerge: move conflict warning message to filemerge...
r26614 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 Fix up the change (roll 42abbb61bede)
timeless
histedit: list action when intervention is required
r27629 (hg histedit --continue to resume)
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152
fix up
$ echo 'I can haz no commute' > e
$ hg resolve --mark e
(no more unresolved files)
timeless
histedit: hook afterresolvedstates
r27627 continue: hg histedit --continue
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 $ hg histedit --continue 2>&1 | fixbundle | grep -v '2 files removed'
merging e
Siddharth Agarwal
simplemerge: move conflict warning message to filemerge...
r26614 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 Fix up the change (pick 7f3755409b00)
timeless
histedit: list action when intervention is required
r27629 (hg histedit --continue to resume)
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152
just continue this time
$ hg revert -r 'p1()' e
$ hg resolve --mark e
(no more unresolved files)
timeless
histedit: hook afterresolvedstates
r27627 continue: hg histedit --continue
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 $ hg histedit --continue 2>&1 | fixbundle
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 7f3755409b00: skipping changeset (no changes)
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152
log after edit
$ hg log --graph
Ben Schmidt
histedit: modify rollup to discard date from the rollup commit (issue4820)...
r31056 @ changeset: 5:b538bcb461be
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | tag: tip
| user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:06 1970 +0000
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | summary: f
|
Ben Schmidt
histedit: modify rollup to discard date from the rollup commit (issue4820)...
r31056 o changeset: 4:317e37cb6d66
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | user: test
Ben Schmidt
histedit: modify rollup to discard date from the rollup commit (issue4820)...
r31056 | date: Thu Jan 01 00:00:04 1970 +0000
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | summary: d
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 3:092e4ce14829
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:03 1970 +0000
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | summary: c
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 2:40ccdd8beb95
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:02 1970 +0000
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | summary: b
|
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 o changeset: 1:cd997a145b29
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | user: test
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 | date: Thu Jan 01 00:00:01 1970 +0000
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 | summary: a
|
o changeset: 0:1715188a53c7
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: Initial commit
contents of e
$ hg cat e
I can haz no commute
manifest
$ hg manifest
a
b
c
d
e
f
description is taken from rollup target commit
$ hg log --debug --rev 4
Ben Schmidt
histedit: modify rollup to discard date from the rollup commit (issue4820)...
r31056 changeset: 4:317e37cb6d66c1c84628c00e5bf4c8c292831951
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 phase: draft
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 parent: 3:092e4ce14829f4974399ce4316d59f64ef0b6725
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 parent: -1:0000000000000000000000000000000000000000
manifest: 4:b068a323d969f22af1296ec6a5ea9384cef437ac
user: test
Ben Schmidt
histedit: modify rollup to discard date from the rollup commit (issue4820)...
r31056 date: Thu Jan 01 00:00:04 1970 +0000
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 files: d e
extra: branch=default
Ben Schmidt
histedit: improve documentation and behaviour of dates...
r31055 extra: histedit_source=ae78f4c9d74ffa4b6cb5045001c303fe9204e890,42abbb61bede6f4366fa1e74a664343e5d558a70
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 description:
d
done with repo r2
$ cd ..