##// END OF EJS Templates
rebase: choose default destination the same way as 'hg merge' (BC)...
rebase: choose default destination the same way as 'hg merge' (BC) This changeset finally make 'hg rebase' choose its default destination using the same logic as 'hg merge'. The previous default was "tipmost changeset on the current branch", the new default is "the other head if there is only one". This change has multiple consequences: - Multiple tests which were not rebasing anything (rebasing from tipmost head) are now rebasing on the other "lower" branch. This is the expected new behavior. - A test is now explicitly aborting when there is too many heads on the branch. This is the expected behavior. - We gained a better detection of the "nothing to rebase" case while performing 'hg pull --rebase' so the message have been updated. Making clearer than an update was performed and why. This is beneficial side-effect. - Rebasing from an active bookmark will behave the same as 'hg merge' from a bookmark.

File last commit:

r27629:e7ff83b2 default
r28189:fac3a24b default
Show More
test-histedit-non-commute.t
298 lines | 8.1 KiB | text/troff | Tads3Lexer
/ tests / test-histedit-non-commute.t
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 $ . "$TESTDIR/histedit-helpers.sh"
$ cat >> $HGRCPATH <<EOF
> [extensions]
> histedit=
> EOF
$ 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'
> for x in a b c d e f ; do
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 > echo $x > $x
> hg ci -m $x
> done
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 > echo 'I can haz no commute' > e
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 > hg ci -m 'does not commute with e'
> cd ..
> }
$ initrepo r1
$ cd r1
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 'pick {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
pick 65a9a84f33fd 3 c
pick 00f1c5383965 4 d
pick 39522b764e3d 7 does not commute with e
pick 7b4e2f4b7bcd 5 e
pick 500cac37a696 6 f
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 log before edit
$ hg log --graph
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 @ changeset: 7:39522b764e3d
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | tag: tip
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: does not commute with e
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 6:500cac37a696
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: f
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 5:7b4e2f4b7bcd
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: e
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 4:00f1c5383965
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: d
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 3:65a9a84f33fd
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: c
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 2:da6535b52e45
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: b
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 1:c1f09da44841
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| 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')
timeless
histedit: list action when intervention is required
r27629 Fix up the change (pick 39522b764e3d)
(hg histedit --continue to resume)
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
abort the edit
$ hg histedit --abort 2>&1 | fixbundle
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
second edit set
$ hg log --graph
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 @ changeset: 7:39522b764e3d
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | tag: tip
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: does not commute with e
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 6:500cac37a696
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: f
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 5:7b4e2f4b7bcd
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: e
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 4:00f1c5383965
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: d
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 3:65a9a84f33fd
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: c
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 2:da6535b52e45
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: b
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 1:c1f09da44841
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| 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')
timeless
histedit: list action when intervention is required
r27629 Fix up the change (pick 39522b764e3d)
(hg histedit --continue to resume)
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
fix up
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 $ echo 'I can haz no commute' > e
Pierre-Yves David
histedit: replaces patching logic by merges...
r17647 $ 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
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 $ hg histedit --continue 2>&1 | fixbundle
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')
timeless
histedit: list action when intervention is required
r27629 Fix up the change (pick 7b4e2f4b7bcd)
(hg histedit --continue to resume)
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
Pierre-Yves David
histedit-test: clarify the reason of a failure...
r17688 This failure is caused by 7b4e2f4b7bcd "e" not rebasing the non commutative
former children.
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 just continue this time
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
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 $ hg histedit --continue 2>&1 | fixbundle
Durham Goode
histedit: convert pick action into a class...
r24767 7b4e2f4b7bcd: empty changeset
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
log after edit
$ hg log --graph
Pierre-Yves David
histedit: record histedit source (issue3681)...
r18437 @ changeset: 6:7efe1373e4bc
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | tag: tip
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: f
|
Pierre-Yves David
histedit: record histedit source (issue3681)...
r18437 o changeset: 5:e334d87a1e55
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: does not commute with e
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 4:00f1c5383965
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: d
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 3:65a9a84f33fd
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: c
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 2:da6535b52e45
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: b
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 1:c1f09da44841
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| 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
start over
$ cd ..
$ initrepo r2
$ cd r2
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 $ rm $EDITED
$ 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 'mess {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
pick 65a9a84f33fd 3 c
pick 00f1c5383965 4 d
mess 39522b764e3d 7 does not commute with e
pick 7b4e2f4b7bcd 5 e
pick 500cac37a696 6 f
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
edit the history, this time with a fold action
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')
timeless
histedit: list action when intervention is required
r27629 Fix up the change (mess 39522b764e3d)
(hg histedit --continue to resume)
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 $ echo 'I can haz no commute' > e
Pierre-Yves David
histedit: replaces patching logic by merges...
r17647 $ 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
Pierre-Yves David
histedit: move all arguments checks to the beginning of the command...
r19020 $ hg histedit --continue 2>&1 | fixbundle
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')
timeless
histedit: list action when intervention is required
r27629 Fix up the change (pick 7b4e2f4b7bcd)
(hg histedit --continue to resume)
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 second edit also fails, but just continue
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
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 $ hg histedit --continue 2>&1 | fixbundle
Durham Goode
histedit: convert pick action into a class...
r24767 7b4e2f4b7bcd: empty changeset
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
post message fix
$ hg log --graph
Pierre-Yves David
histedit-test: generalise --commands "-" usage...
r19019 @ changeset: 6:7efe1373e4bc
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | tag: tip
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: f
|
Pierre-Yves David
histedit-test: generalise --commands "-" usage...
r19019 o changeset: 5:e334d87a1e55
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: generalise --commands "-" usage...
r19019 | summary: does not commute with e
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 |
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 4:00f1c5383965
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: d
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 3:65a9a84f33fd
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: c
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 2:da6535b52e45
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: b
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 1:c1f09da44841
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| 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
$ cd ..