##// END OF EJS Templates
tests: stabilize `test-merge-partial-tool.t` on Windows...
tests: stabilize `test-merge-partial-tool.t` on Windows The test was previously failing because it was opening the shell scripts being used as an executable in a text editor, and problems cascaded from there.

File last commit:

r49434:402a6b61 default
r52838:4ee2505f default
Show More
test-rebase-collapse.t
776 lines | 15.4 KiB | text/troff | Tads3Lexer
/ tests / test-rebase-collapse.t
Adrian Buehlmann
tests: unify test-rebase*
r12608 $ cat >> $HGRCPATH <<EOF
> [extensions]
> rebase=
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013 > mq=
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 > drawdag=$TESTDIR/drawdag.py
Adrian Buehlmann
tests: unify test-rebase*
r12608 >
Pierre-Yves David
phases: prevent rebase to rebase immutable changeset.
r15742 > [phases]
> publish=False
>
Adrian Buehlmann
tests: unify test-rebase*
r12608 > [alias]
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n"
> tglogp = log -G --template "{rev}: {node|short} {phase} '{desc}' {branches}\n"
Adrian Buehlmann
tests: unify test-rebase*
r12608 > EOF
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 Highest phase of source commits is used:
Adrian Buehlmann
tests: unify test-rebase*
r12608
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg init phase
$ cd phase
$ hg debugdrawdag << 'EOF'
> D
> |
> F C
> | |
> E B
> |/
> A
> EOF
Adrian Buehlmann
tests: unify test-rebase*
r12608
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg phase --force --secret D
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
rebase: fix phases movement...
r15917
FUJIWARA Katsunori
rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"...
r20766 $ cat > $TESTTMP/editor.sh <<EOF
> echo "==== before editing"
> cat \$1
> echo "===="
> echo "edited manually" >> \$1
> EOF
Boris Feld
test: explicit a rebase source in test-rebase-collapse.t...
r41231 $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e --source B --dest F
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 1:112478962961 B "B"
rebasing 3:26805aba1e60 C "C"
rebasing 5:f585351a92f8 D tip "D"
FUJIWARA Katsunori
rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"...
r20766 ==== before editing
Collapsed revision
* B
* C
* D
HG: Enter commit message. Lines beginning with 'HG:' are removed.
HG: Leave message empty to abort commit.
HG: --
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 HG: user: test
FUJIWARA Katsunori
rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"...
r20766 HG: branch 'default'
Matt Mackall
dirstate: properly clean-up some more merge state on setparents
r22895 HG: added B
HG: added C
HG: added D
FUJIWARA Katsunori
rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"...
r20766 ====
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 saved backup bundle to $TESTTMP/phase/.hg/strip-backup/112478962961-cb2a9b47-rebase.hg
Adrian Buehlmann
tests: unify test-rebase*
r12608
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
rebase: fix phases movement...
r15917 $ hg tglogp
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 3: 92fa5f5fe108 secret 'Collapsed revision
Adrian Buehlmann
tests: unify test-rebase*
r12608 | * B
| * C
FUJIWARA Katsunori
rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"...
r20766 | * D
|
|
| edited manually'
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 2: 64a8289d2492 draft 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 1: 7fb047a69f22 draft 'E'
|
o 0: 426bada5c675 draft 'A'
Adrian Buehlmann
tests: unify test-rebase*
r12608
Pierre-Yves David
tests: prepare rebase test for wc parent preservation...
r19924 $ hg manifest --rev tip
Adrian Buehlmann
tests: unify test-rebase*
r12608 A
B
C
D
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 E
Adrian Buehlmann
tests: unify test-rebase*
r12608 F
$ cd ..
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 Merge gets linearized:
Adrian Buehlmann
tests: unify test-rebase*
r12608
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg init linearized-merge
$ cd linearized-merge
Adrian Buehlmann
tests: unify test-rebase*
r12608
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg debugdrawdag << 'EOF'
> F D
> |/|
> C B
> |/
> A
> EOF
$ hg phase --force --secret D
$ hg rebase --source B --collapse --dest F
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 1:112478962961 B "B"
rebasing 3:4e4f9194f9f1 D "D"
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 saved backup bundle to $TESTTMP/linearized-merge/.hg/strip-backup/112478962961-e389075b-rebase.hg
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 3: 5bdc08b7da2b 'Collapsed revision
| * B
| * D'
o 2: afc707c82df0 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 1: dc0947a82db8 'C'
|
o 0: 426bada5c675 'A'
Adrian Buehlmann
tests: unify test-rebase*
r12608
Pierre-Yves David
tests: prepare rebase test for wc parent preservation...
r19924 $ hg manifest --rev tip
Adrian Buehlmann
tests: unify test-rebase*
r12608 A
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 B
C
Adrian Buehlmann
tests: unify test-rebase*
r12608 F
$ cd ..
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 Custom message:
$ hg init message
$ cd message
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg debugdrawdag << 'EOF'
> C
> |
> D B
> |/
> A
> EOF
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047
$ hg rebase --base B -m 'custom message'
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661 abort: message can only be specified with collapse
Martin von Zweigbergk
errors: use more specific errors in rebase extension...
r47377 [10]
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661
FUJIWARA Katsunori
rebase: use "rebase.collapse" as "editform" for "--collapse" always...
r22206 $ cat > $TESTTMP/checkeditform.sh <<EOF
> env | grep HGEDITFORM
> true
> EOF
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source B --collapse -m 'custom message' -e --dest D
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 1:112478962961 B "B"
rebasing 3:26805aba1e60 C tip "C"
FUJIWARA Katsunori
rebase: use "rebase.collapse" as "editform" for "--collapse" always...
r22206 HGEDITFORM=rebase.collapse
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 saved backup bundle to $TESTTMP/message/.hg/strip-backup/112478962961-f4131707-rebase.hg
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661
$ hg tglog
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 2: 2f197b9a08f3 'custom message'
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661 |
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 1: b18e25de2cf5 'D'
|
o 0: 426bada5c675 'A'
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661
Pierre-Yves David
tests: prepare rebase test for wc parent preservation...
r19924 $ hg manifest --rev tip
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661 A
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 B
C
D
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661
$ cd ..
Adrian Buehlmann
tests: unify test-rebase*
r12608
Rebase and collapse - more than one external (fail):
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg init multiple-external-parents
$ cd multiple-external-parents
Adrian Buehlmann
tests: unify test-rebase*
r12608
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg debugdrawdag << 'EOF'
> G
> |\
> | F
> | |
> D E
> |\|
> H C B
> \|/
> A
> EOF
$ hg rebase -s C --dest H --collapse
abort: unable to collapse on top of 3, there is more than one external parent: 1, 6
Martin von Zweigbergk
errors: use more specific errors in rebase extension...
r47377 [20]
Adrian Buehlmann
tests: unify test-rebase*
r12608
Rebase and collapse - E onto H:
Martin von Zweigbergk
tests: fix rebase test broken by earlier cleanup...
r45046 $ hg rebase -s E --dest H --collapse # root (E) is not a merge
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 5:49cb92066bfd E "E"
rebasing 6:11abe3fb10b8 F "F"
rebasing 7:64e264db77f0 G tip "G"
Martin von Zweigbergk
tests: fix rebase test broken by earlier cleanup...
r45046 saved backup bundle to $TESTTMP/multiple-external-parents/.hg/strip-backup/49cb92066bfd-ee8a8a79-rebase.hg
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Martin von Zweigbergk
tests: fix rebase test broken by earlier cleanup...
r45046 o 5: 8b2315790719 'Collapsed revision
|\ * E
| | * F
| | * G'
| o 4: 4e4f9194f9f1 'D'
| |\
o | | 3: 575c4b5ec114 'H'
| | |
+---o 2: dc0947a82db8 'C'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Martin von Zweigbergk
tests: fix rebase test broken by earlier cleanup...
r45046 | o 1: 112478962961 'B'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 0: 426bada5c675 'A'
Adrian Buehlmann
tests: unify test-rebase*
r12608
Pierre-Yves David
tests: prepare rebase test for wc parent preservation...
r19924 $ hg manifest --rev tip
Adrian Buehlmann
tests: unify test-rebase*
r12608 A
C
E
F
Martin von Zweigbergk
tests: fix rebase test broken by earlier cleanup...
r45046 H
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ cd ..
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
Test that branchheads cache is updated correctly when doing a strip in which
Pierre-Yves David
destroyed: drop complex branchcache rebuilt logic...
r18395 the parent of the ancestor node to be stripped does not become a head and also,
the parent of a node that is a child of the node stripped becomes a head (node
3). The code is now much simpler and we could just test a simpler scenario
We keep it the test this way in case new complexity is injected.
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 Create repo b:
$ hg init branch-heads
$ cd branch-heads
$ hg debugdrawdag << 'EOF'
> G
> |\
> | F
> | |
> D E
> |\|
> H C B
> \|/
> A
> EOF
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
$ hg heads --template="{rev}:{node} {branch}\n"
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 7:64e264db77f061f16d9132b70c5a58e2461fb630 default
3:575c4b5ec114d64b681d33f8792853568bfb2b2c default
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ cat $TESTTMP/branch-heads/.hg/cache/branch2-served
64e264db77f061f16d9132b70c5a58e2461fb630 7
575c4b5ec114d64b681d33f8792853568bfb2b2c o default
64e264db77f061f16d9132b70c5a58e2461fb630 o default
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
$ hg strip 4
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 saved backup bundle to $TESTTMP/branch-heads/.hg/strip-backup/4e4f9194f9f1-5ec4b5e6-backup.hg
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ cat $TESTTMP/branch-heads/.hg/cache/branch2-served
11abe3fb10b8689b560681094b17fe161871d043 5
dc0947a82db884575bb76ea10ac97b08536bfa03 o default
575c4b5ec114d64b681d33f8792853568bfb2b2c o default
11abe3fb10b8689b560681094b17fe161871d043 o default
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
$ hg heads --template="{rev}:{node} {branch}\n"
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 5:11abe3fb10b8689b560681094b17fe161871d043 default
3:575c4b5ec114d64b681d33f8792853568bfb2b2c default
2:dc0947a82db884575bb76ea10ac97b08536bfa03 default
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
$ cd ..
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 Preserves external parent
Adrian Buehlmann
tests: unify test-rebase*
r12608
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg init external-parent
$ cd external-parent
Adrian Buehlmann
tests: unify test-rebase*
r12608
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg debugdrawdag << 'EOF'
> H
> |\
> | G
> | |
> | F # F/E = F\n
> | |
> D E # D/D = D\n
> |\|
> I C B
> \|/
> A
> EOF
Adrian Buehlmann
tests: unify test-rebase*
r12608
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg rebase -s F --dest I --collapse # root (F) is not a merge
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 6:c82b08f646f1 F "F"
Martin von Zweigbergk
rebase: fix bug where `--collapse` would apply diff on missing file...
r44554 file 'E' was deleted in local [dest] but was modified in other [source].
You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
What do you want to do? u
Daniel Ploch
error: unify the error message formats for 'rebase' and 'unshelve'...
r45710 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
Martin von Zweigbergk
errors: add config that lets user get more detailed exit codes...
r46430 [240]
Martin von Zweigbergk
rebase: fix bug where `--collapse` would apply diff on missing file...
r44554
$ echo F > E
$ hg resolve -m
(no more unresolved files)
continue: hg rebase --continue
$ hg rebase -c
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 6:c82b08f646f1 F "F"
rebasing 7:a6db7fa104e1 G "G"
rebasing 8:e1d201b72d91 H tip "H"
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 saved backup bundle to $TESTTMP/external-parent/.hg/strip-backup/c82b08f646f1-f2721fbf-rebase.hg
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 6: 681daa3e686d 'Collapsed revision
|\ * F
Adrian Buehlmann
tests: unify test-rebase*
r12608 | | * G
| | * H'
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 | | o 5: 49cb92066bfd 'E'
| | |
| o | 4: 09143c0bf13e 'D'
| |\|
o | | 3: 08ebfeb61bac 'I'
| | |
| o | 2: dc0947a82db8 'C'
|/ /
| o 1: 112478962961 'B'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 0: 426bada5c675 'A'
Adrian Buehlmann
tests: unify test-rebase*
r12608
Pierre-Yves David
tests: prepare rebase test for wc parent preservation...
r19924 $ hg manifest --rev tip
Adrian Buehlmann
tests: unify test-rebase*
r12608 A
C
D
E
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 F
Adrian Buehlmann
tests: unify test-rebase*
r12608 G
I
Pierre-Yves David
tests: prepare rebase test for wc parent preservation...
r19924 $ hg up tip -q
Adrian Buehlmann
tests: unify test-rebase*
r12608 $ cat E
F
$ cd ..
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 Rebasing from multiple bases:
$ hg init multiple-bases
$ cd multiple-bases
$ hg debugdrawdag << 'EOF'
> C B
> D |/
> |/
> A
> EOF
$ hg rebase --collapse -r 'B+C' -d D
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 1:fc2b737bb2e5 B "B"
rebasing 2:dc0947a82db8 C "C"
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 saved backup bundle to $TESTTMP/multiple-bases/.hg/strip-backup/dc0947a82db8-b0c1a7ea-rebase.hg
$ hg tglog
o 2: 2127ae44d291 'Collapsed revision
| * B
| * C'
o 1: b18e25de2cf5 'D'
|
o 0: 426bada5c675 'A'
$ cd ..
With non-contiguous commits:
$ hg init non-contiguous
$ cd non-contiguous
$ cat >> .hg/hgrc <<EOF
> [experimental]
> evolution=all
> EOF
$ hg debugdrawdag << 'EOF'
> F
> |
> E
> |
> D
> |
> C
> |
> B G
> |/
> A
> EOF
BROKEN: should be allowed
$ hg rebase --collapse -r 'B+D+F' -d G
abort: unable to collapse on top of 2, there is more than one external parent: 3, 5
Martin von Zweigbergk
errors: use more specific errors in rebase extension...
r47377 [20]
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 $ cd ..
$ hg init multiple-external-parents-2
$ cd multiple-external-parents-2
$ hg debugdrawdag << 'EOF'
> D G
> |\ /|
> B C E F
> \| |/
> \ H /
> \|/
> A
> EOF
$ hg rebase --collapse -d H -s 'B+F'
abort: unable to collapse on top of 5, there is more than one external parent: 1, 3
Martin von Zweigbergk
errors: use more specific errors in rebase extension...
r47377 [20]
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 $ cd ..
Adrian Buehlmann
tests: unify test-rebase*
r12608
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 With internal merge:
Adrian Buehlmann
tests: unify test-rebase*
r12608
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg init internal-merge
$ cd internal-merge
Adrian Buehlmann
tests: unify test-rebase*
r12608
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg debugdrawdag << 'EOF'
> E
> |\
> C D
> |/
> F B
> |/
> A
> EOF
Adrian Buehlmann
tests: unify test-rebase*
r12608
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg rebase -s B --collapse --dest F
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 1:112478962961 B "B"
rebasing 3:26805aba1e60 C "C"
rebasing 4:be0ef73c17ad D "D"
rebasing 5:02c4367d6973 E tip "E"
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 saved backup bundle to $TESTTMP/internal-merge/.hg/strip-backup/112478962961-1dfb057b-rebase.hg
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 2: c0512a1797b0 'Collapsed revision
Adrian Buehlmann
tests: unify test-rebase*
r12608 | * B
| * C
| * D
| * E'
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 1: 8908a377a434 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 0: 426bada5c675 'A'
Adrian Buehlmann
tests: unify test-rebase*
r12608
Pierre-Yves David
tests: prepare rebase test for wc parent preservation...
r19924 $ hg manifest --rev tip
Adrian Buehlmann
tests: unify test-rebase*
r12608 A
B
C
D
F
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ cd ..
Adrian Buehlmann
tests: unify test-rebase*
r12608
Stefano Tortarolo
rebase: block collapse with keepbranches on multiple named branches (issue2112)...
r14897 Interactions between collapse and keepbranches
$ hg init e
$ cd e
$ echo 'a' > a
$ hg ci -Am 'A'
adding a
Durham Goode
bookmark: don't allow integers as bookmark/branch/tag names...
r18566 $ hg branch 'one'
marked working directory as branch one
Matt Mackall
branch: warn on branching
r15615 (branches are permanent and global, did you want a bookmark?)
Stefano Tortarolo
rebase: block collapse with keepbranches on multiple named branches (issue2112)...
r14897 $ echo 'b' > b
$ hg ci -Am 'B'
adding b
Durham Goode
bookmark: don't allow integers as bookmark/branch/tag names...
r18566 $ hg branch 'two'
marked working directory as branch two
Stefano Tortarolo
rebase: block collapse with keepbranches on multiple named branches (issue2112)...
r14897 $ echo 'c' > c
$ hg ci -Am 'C'
adding c
$ hg up -q 0
$ echo 'd' > d
$ hg ci -Am 'D'
adding d
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 3: 41acb9dca9eb 'D'
Stefano Tortarolo
rebase: block collapse with keepbranches on multiple named branches (issue2112)...
r14897 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 2: 8ac4a08debf1 'C' two
Stefano Tortarolo
rebase: block collapse with keepbranches on multiple named branches (issue2112)...
r14897 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 1ba175478953 'B' one
Stefano Tortarolo
rebase: block collapse with keepbranches on multiple named branches (issue2112)...
r14897 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 1994f17a630e 'A'
Stefano Tortarolo
rebase: block collapse with keepbranches on multiple named branches (issue2112)...
r14897
$ hg rebase --keepbranches --collapse -s 1 -d 3
abort: cannot collapse multiple named branches
Martin von Zweigbergk
errors: use more specific errors in rebase extension...
r47377 [10]
Stefano Tortarolo
rebase: block collapse with keepbranches on multiple named branches (issue2112)...
r14897
Patrick Mezard
localrepo: add setparents() to adjust dirstate copies (issue3407)...
r16551 $ cd ..
Rebase, collapse and copies
$ hg init copies
$ cd copies
$ hg unbundle "$TESTDIR/bundles/renames.hg"
adding changesets
adding manifests
adding file changes
added 4 changesets with 11 changes to 7 files (+1 heads)
Boris Feld
phase: report number of non-public changeset alongside the new range...
r39516 new changesets f447d5abf5ea:338e84e2e558 (4 drafts)
Patrick Mezard
localrepo: add setparents() to adjust dirstate copies (issue3407)...
r16551 (run 'hg heads' to see heads, 'hg merge' to merge)
$ hg up -q tip
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 3: 338e84e2e558 'move2'
Patrick Mezard
localrepo: add setparents() to adjust dirstate copies (issue3407)...
r16551 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 2: 6e7340ee38c0 'move1'
Patrick Mezard
localrepo: add setparents() to adjust dirstate copies (issue3407)...
r16551 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 1352765a01d4 'change'
Patrick Mezard
localrepo: add setparents() to adjust dirstate copies (issue3407)...
r16551 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: f447d5abf5ea 'add'
Patrick Mezard
localrepo: add setparents() to adjust dirstate copies (issue3407)...
r16551
$ hg rebase --collapse -d 1
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 2:6e7340ee38c0 "move1"
Patrick Mezard
localrepo: add setparents() to adjust dirstate copies (issue3407)...
r16551 merging a and d to d
merging b and e to e
merging c and f to f
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 3:338e84e2e558 tip "move2"
Mads Kiilerich
merge: keep destination filename as key in filemerge actions...
r20945 merging f and c to c
Patrick Mezard
localrepo: add setparents() to adjust dirstate copies (issue3407)...
r16551 merging e and g to g
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/copies/.hg/strip-backup/6e7340ee38c0-ef8ef003-rebase.hg
Patrick Mezard
localrepo: add setparents() to adjust dirstate copies (issue3407)...
r16551 $ hg st
Pierre-Yves David
tests: prepare rebase test for wc parent preservation...
r19924 $ hg st --copies --change tip
Patrick Mezard
localrepo: add setparents() to adjust dirstate copies (issue3407)...
r16551 A d
a
A g
b
R b
Pierre-Yves David
tests: prepare rebase test for wc parent preservation...
r19924 $ hg up tip -q
Patrick Mezard
localrepo: add setparents() to adjust dirstate copies (issue3407)...
r16551 $ cat c
c
c
$ cat d
a
a
$ cat g
b
b
$ hg log -r . --template "{file_copies}\n"
d (a)g (b)
Patrick Mezard
rebase: allow collapsing branches in place (issue3111)...
r16696
Test collapsing a middle revision in-place
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 2: 64b456429f67 'Collapsed revision
Patrick Mezard
rebase: allow collapsing branches in place (issue3111)...
r16696 | * move1
| * move2'
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 1: 1352765a01d4 'change'
Patrick Mezard
rebase: allow collapsing branches in place (issue3111)...
r16696 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: f447d5abf5ea 'add'
Patrick Mezard
rebase: allow collapsing branches in place (issue3111)...
r16696
$ hg rebase --collapse -r 1 -d 0
Martin von Zweigbergk
rewriteutil: say how many commits would become orphan if commit is rewritten...
r47836 abort: cannot rebase changeset, as that will orphan 1 descendants
Martin von Zweigbergk
rewriteutil: point to help about instability when rewriting creates orphan...
r47782 (see 'hg help evolution.instability')
Martin von Zweigbergk
errors: raise more specific errors from rewriteutil...
r46457 [10]
Patrick Mezard
rebase: allow collapsing branches in place (issue3111)...
r16696
Test collapsing in place
$ hg rebase --collapse -b . -d 0
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 1:1352765a01d4 "change"
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:64b456429f67 tip "Collapsed revision"
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/copies/.hg/strip-backup/1352765a01d4-45a352ea-rebase.hg
Pierre-Yves David
tests: prepare rebase test for wc parent preservation...
r19924 $ hg st --change tip --copies
Patrick Mezard
rebase: allow collapsing branches in place (issue3111)...
r16696 M a
M c
A d
a
A g
b
R b
Pierre-Yves David
tests: prepare rebase test for wc parent preservation...
r19924 $ hg up tip -q
Patrick Mezard
rebase: allow collapsing branches in place (issue3111)...
r16696 $ cat a
a
a
$ cat c
c
c
$ cat d
a
a
$ cat g
b
b
Patrick Mezard
localrepo: add setparents() to adjust dirstate copies (issue3407)...
r16551 $ cd ..
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
Test stripping a revision with another child
$ hg init f
$ cd f
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg debugdrawdag << 'EOF'
> C B
> |/
> A
> EOF
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg heads --template="{rev}:{node} {branch}: {desc}\n"
2:dc0947a82db884575bb76ea10ac97b08536bfa03 default: C
1:112478962961147124edd43549aedd1a335e44bf default: B
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg strip C
saved backup bundle to $TESTTMP/f/.hg/strip-backup/dc0947a82db8-d21b92a4-backup.hg
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
$ hg tglog
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 1: 112478962961 'B'
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013 |
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 o 0: 426bada5c675 'A'
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
$ hg heads --template="{rev}:{node} {branch}: {desc}\n"
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 1:112478962961147124edd43549aedd1a335e44bf default: B
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
$ cd ..
Durham Goode
rebase: fix --collapse when a file was added then removed...
r18778 Test collapsing changes that add then remove a file
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
Durham Goode
rebase: fix --collapse when a file was added then removed...
r18778 $ hg init collapseaddremove
$ cd collapseaddremove
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
Durham Goode
rebase: fix --collapse when a file was added then removed...
r18778 $ touch base
$ hg commit -Am base
adding base
$ touch a
$ hg commit -Am a
adding a
$ hg rm a
$ touch b
$ hg commit -Am b
adding b
Durham Goode
rebase: fix working copy location after a --collapse (issue4080)...
r19986 $ hg book foo
Durham Goode
rebase: fix --collapse when a file was added then removed...
r18778 $ hg rebase -d 0 -r "1::2" --collapse -m collapsed
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 1:6d8d9f24eec3 "a"
Martin von Zweigbergk
templates: include all non-branch namespaces in default one-line summary...
r46386 rebasing 2:1cc73eca5ecc foo tip "b"
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/collapseaddremove/.hg/strip-backup/6d8d9f24eec3-77d3b6e2-rebase.hg
Durham Goode
rebase: fix working copy location after a --collapse (issue4080)...
r19986 $ hg log -G --template "{rev}: '{desc}' {bookmarks}"
@ 1: 'collapsed' foo
Durham Goode
rebase: fix --collapse when a file was added then removed...
r18778 |
Durham Goode
rebase: fix working copy location after a --collapse (issue4080)...
r19986 o 0: 'base'
Durham Goode
rebase: fix --collapse when a file was added then removed...
r18778
Pierre-Yves David
tests: prepare rebase test for wc parent preservation...
r19924 $ hg manifest --rev tip
Durham Goode
rebase: fix --collapse when a file was added then removed...
r18778 b
base
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
Durham Goode
rebase: fix --collapse when a file was added then removed...
r18778 $ cd ..
liscju
rebase: adds storing collapse message (issue4792)...
r28185
Test that rebase --collapse will remember message after
running into merge conflict and invoking rebase --continue.
$ hg init collapse_remember_message
$ cd collapse_remember_message
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ hg debugdrawdag << 'EOF'
> C B # B/A = B\n
> |/ # C/A = C\n
> A
> EOF
$ hg rebase --collapse -m "new message" -b B -d C
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 1:81e5401e4d37 B "B"
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 merging A
warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
Daniel Ploch
error: unify the error message formats for 'rebase' and 'unshelve'...
r45710 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
Martin von Zweigbergk
errors: add config that lets user get more detailed exit codes...
r46430 [240]
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 $ rm A.orig
$ hg resolve --mark A
liscju
rebase: adds storing collapse message (issue4792)...
r28185 (no more unresolved files)
continue: hg rebase --continue
$ hg rebase --continue
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 1:81e5401e4d37 B "B"
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 saved backup bundle to $TESTTMP/collapse_remember_message/.hg/strip-backup/81e5401e4d37-96c3dd30-rebase.hg
liscju
rebase: adds storing collapse message (issue4792)...
r28185 $ hg log
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 changeset: 2:17186933e123
liscju
rebase: adds storing collapse message (issue4792)...
r28185 tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 summary: new message
liscju
rebase: adds storing collapse message (issue4792)...
r28185
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 changeset: 1:043039e9df84
tag: C
liscju
rebase: adds storing collapse message (issue4792)...
r28185 user: test
date: Thu Jan 01 00:00:00 1970 +0000
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 summary: C
liscju
rebase: adds storing collapse message (issue4792)...
r28185
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 changeset: 0:426bada5c675
tag: A
liscju
rebase: adds storing collapse message (issue4792)...
r28185 user: test
date: Thu Jan 01 00:00:00 1970 +0000
Martin von Zweigbergk
tests: use drawdag in test-rebase-collapse.t...
r37047 summary: A
liscju
rebase: adds storing collapse message (issue4792)...
r28185
$ cd ..
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048
Test aborted editor on final message
$ HGMERGE=:merge3
$ export HGMERGE
$ hg init aborted-editor
$ cd aborted-editor
$ hg debugdrawdag << 'EOF'
> C # D/A = D\n
> | # C/A = C\n
> B D # B/A = B\n
> |/ # A/A = A\n
> A
> EOF
$ hg rebase --collapse -t internal:merge3 -s B -d D
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 1:f899f3910ce7 B "B"
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 merging A
warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
Daniel Ploch
error: unify the error message formats for 'rebase' and 'unshelve'...
r45710 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
Martin von Zweigbergk
errors: add config that lets user get more detailed exit codes...
r46430 [240]
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 $ hg tglog
o 3: 63668d570d21 'C'
|
| @ 2: 82b8abf9c185 'D'
| |
Martin von Zweigbergk
rebase: don't use rebased node as dirstate p2 (BC)...
r44821 % | 1: f899f3910ce7 'B'
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 |/
o 0: 4a2df7238c3b 'A'
$ cat A
Martin von Zweigbergk
rebase: set custom conflict label for base commit...
r49434 <<<<<<< dest: 82b8abf9c185 D - test: D
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 D
Martin von Zweigbergk
rebase: set custom conflict label for base commit...
r49434 ||||||| parent of source: 4a2df7238c3b A - test: A
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 A
=======
B
Martin von Zweigbergk
rebase: set custom conflict label for base commit...
r49434 >>>>>>> source: f899f3910ce7 B - test: B
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 $ echo BC > A
$ hg resolve -m
(no more unresolved files)
continue: hg rebase --continue
$ hg rebase --continue
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 1:f899f3910ce7 B "B"
rebasing 3:63668d570d21 C tip "C"
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 merging A
warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
Daniel Ploch
error: unify the error message formats for 'rebase' and 'unshelve'...
r45710 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
Martin von Zweigbergk
errors: add config that lets user get more detailed exit codes...
r46430 [240]
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 $ hg tglog
Martin von Zweigbergk
rebase: don't use rebased node as dirstate p2 (BC)...
r44821 % 3: 63668d570d21 'C'
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 |
| @ 2: 82b8abf9c185 'D'
| |
o | 1: f899f3910ce7 'B'
|/
o 0: 4a2df7238c3b 'A'
$ cat A
Martin von Zweigbergk
rebase: set custom conflict label for base commit...
r49434 <<<<<<< dest: 82b8abf9c185 D - test: D
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 BC
Martin von Zweigbergk
rebase: set custom conflict label for base commit...
r49434 ||||||| parent of source: f899f3910ce7 B - test: B
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 B
=======
C
Martin von Zweigbergk
rebase: set custom conflict label for base commit...
r49434 >>>>>>> source: 63668d570d21 C tip - test: C
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 $ echo BD > A
$ hg resolve -m
(no more unresolved files)
continue: hg rebase --continue
$ HGEDITOR=false hg rebase --continue --config ui.interactive=1
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 already rebased 1:f899f3910ce7 B "B" as 82b8abf9c185
rebasing 3:63668d570d21 C tip "C"
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 abort: edit failed: false exited with status 1
Martin von Zweigbergk
errors: introduce CanceledError and use it in a few places...
r46489 [250]
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 $ hg tglog
Martin von Zweigbergk
graphlog: use '%' only if there are *unresolved* conflicts...
r46020 o 3: 63668d570d21 'C'
Martin von Zweigbergk
tests: add some more tests to test-rebase-collapse.t...
r37048 |
| @ 2: 82b8abf9c185 'D'
| |
o | 1: f899f3910ce7 'B'
|/
o 0: 4a2df7238c3b 'A'
$ hg rebase --continue
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 already rebased 1:f899f3910ce7 B "B" as 82b8abf9c185
already rebased 3:63668d570d21 C tip "C" as 82b8abf9c185
Martin von Zweigbergk
rebase: store rebase state after each commit...
r37050 saved backup bundle to $TESTTMP/aborted-editor/.hg/strip-backup/f899f3910ce7-7cab5e15-rebase.hg