test-rebase-obsolete.t
746 lines
| 19.4 KiB
| text/troff
|
Tads3Lexer
/ tests / test-rebase-obsolete.t
Pierre-Yves David
|
r17612 | ========================== | ||
Test rebase with obsolete | ||||
========================== | ||||
Enable obsolete | ||||
$ cat >> $HGRCPATH << EOF | ||||
Martin von Zweigbergk
|
r46350 | > [command-templates] | ||
> log= {rev}:{node|short} {desc|firstline}{if(obsolete,' ({obsfate})')} | ||||
Durham Goode
|
r22955 | > [experimental] | ||
Boris Feld
|
r34867 | > evolution.createmarkers=True | ||
Boris Feld
|
r34868 | > evolution.allowunstable=True | ||
Pierre-Yves David
|
r17612 | > [phases] | ||
> publish=False | ||||
Laurent Charignon
|
r27011 | > [extensions] | ||
Pierre-Yves David
|
r17612 | > rebase= | ||
Martin von Zweigbergk
|
r33640 | > drawdag=$TESTDIR/drawdag.py | ||
Sushil khanchi
|
r39128 | > strip= | ||
Pierre-Yves David
|
r17612 | > EOF | ||
Setup rebase canonical repo | ||||
$ hg init base | ||||
$ cd base | ||||
$ hg unbundle "$TESTDIR/bundles/rebase.hg" | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 8 changesets with 7 changes to 7 files (+2 heads) | ||||
Boris Feld
|
r39516 | new changesets cd010b8cd998:02de42196ebe (8 drafts) | ||
Pierre-Yves David
|
r17612 | (run 'hg heads' to see heads, 'hg merge' to merge) | ||
$ hg up tip | ||||
3 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg log -G | ||||
@ 7:02de42196ebe H | ||||
| | ||||
| o 6:eea13746799a G | ||||
|/| | ||||
o | 5:24b6387c8c8c F | ||||
| | | ||||
| o 4:9520eea781bc E | ||||
|/ | ||||
| o 3:32af7686d403 D | ||||
| | | ||||
| o 2:5fddd98957c8 C | ||||
| | | ||||
| o 1:42ccdea3bb16 B | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
$ cd .. | ||||
simple rebase | ||||
--------------------------------- | ||||
$ hg clone base simple | ||||
updating to branch default | ||||
3 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ cd simple | ||||
$ hg up 32af7686d403 | ||||
3 files updated, 0 files merged, 2 files removed, 0 files unresolved | ||||
$ hg rebase -d eea13746799a | ||||
Mads Kiilerich
|
r23517 | rebasing 1:42ccdea3bb16 "B" | ||
rebasing 2:5fddd98957c8 "C" | ||||
rebasing 3:32af7686d403 "D" | ||||
Pierre-Yves David
|
r17612 | $ hg log -G | ||
@ 10:8eeb3c33ad33 D | ||||
| | ||||
o 9:2327fea05063 C | ||||
| | ||||
o 8:e4e5be0395b2 B | ||||
| | ||||
| o 7:02de42196ebe H | ||||
| | | ||||
o | 6:eea13746799a G | ||||
|\| | ||||
| o 5:24b6387c8c8c F | ||||
| | | ||||
o | 4:9520eea781bc E | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
$ hg log --hidden -G | ||||
@ 10:8eeb3c33ad33 D | ||||
| | ||||
o 9:2327fea05063 C | ||||
| | ||||
o 8:e4e5be0395b2 B | ||||
| | ||||
| o 7:02de42196ebe H | ||||
| | | ||||
o | 6:eea13746799a G | ||||
|\| | ||||
| o 5:24b6387c8c8c F | ||||
| | | ||||
o | 4:9520eea781bc E | ||||
|/ | ||||
Denis Laxalde
|
r35047 | | x 3:32af7686d403 D (rewritten using rebase as 10:8eeb3c33ad33) | ||
Pierre-Yves David
|
r17612 | | | | ||
Denis Laxalde
|
r35047 | | x 2:5fddd98957c8 C (rewritten using rebase as 9:2327fea05063) | ||
Pierre-Yves David
|
r17612 | | | | ||
Denis Laxalde
|
r35047 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:e4e5be0395b2) | ||
Pierre-Yves David
|
r17612 | |/ | ||
o 0:cd010b8cd998 A | ||||
$ hg debugobsolete | ||||
Boris Feld
|
r34962 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 e4e5be0395b2cbd471ed22a26b1b6a1a0658a794 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | ||
5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 2327fea05063f39961b14cb69435a9898dc9a245 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | ||||
32af7686d403cf45b5d95f2d70cebea587ac806a 8eeb3c33ad33d452c89e5dcf611c347f978fb42b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | ||||
Pierre-Yves David
|
r17612 | |||
$ cd .. | ||||
empty changeset | ||||
--------------------------------- | ||||
$ hg clone base empty | ||||
updating to branch default | ||||
3 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ cd empty | ||||
$ hg up eea13746799a | ||||
1 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
We make a copy of both the first changeset in the rebased and some other in the | ||||
set. | ||||
$ hg graft 42ccdea3bb16 32af7686d403 | ||||
Mads Kiilerich
|
r23505 | grafting 1:42ccdea3bb16 "B" | ||
grafting 3:32af7686d403 "D" | ||||
Pierre-Yves David
|
r17612 | $ hg rebase -s 42ccdea3bb16 -d . | ||
Mads Kiilerich
|
r23517 | rebasing 1:42ccdea3bb16 "B" | ||
Martin von Zweigbergk
|
r40900 | note: not rebasing 1:42ccdea3bb16 "B", its destination already has all its changes | ||
Mads Kiilerich
|
r23517 | rebasing 2:5fddd98957c8 "C" | ||
rebasing 3:32af7686d403 "D" | ||||
Martin von Zweigbergk
|
r40900 | note: not rebasing 3:32af7686d403 "D", its destination already has all its changes | ||
Pierre-Yves David
|
r17612 | $ hg log -G | ||
Pierre-Yves David
|
r19925 | o 10:5ae4c968c6ac C | ||
Pierre-Yves David
|
r17612 | | | ||
Pierre-Yves David
|
r19925 | @ 9:08483444fef9 D | ||
Pierre-Yves David
|
r17612 | | | ||
o 8:8877864f1edb B | ||||
| | ||||
| o 7:02de42196ebe H | ||||
| | | ||||
o | 6:eea13746799a G | ||||
|\| | ||||
| o 5:24b6387c8c8c F | ||||
| | | ||||
o | 4:9520eea781bc E | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
$ hg log --hidden -G | ||||
Pierre-Yves David
|
r19925 | o 10:5ae4c968c6ac C | ||
Pierre-Yves David
|
r17612 | | | ||
Pierre-Yves David
|
r19925 | @ 9:08483444fef9 D | ||
Pierre-Yves David
|
r17612 | | | ||
o 8:8877864f1edb B | ||||
| | ||||
| o 7:02de42196ebe H | ||||
| | | ||||
o | 6:eea13746799a G | ||||
|\| | ||||
| o 5:24b6387c8c8c F | ||||
| | | ||||
o | 4:9520eea781bc E | ||||
|/ | ||||
Denis Laxalde
|
r35047 | | x 3:32af7686d403 D (pruned using rebase) | ||
Pierre-Yves David
|
r17612 | | | | ||
Denis Laxalde
|
r35047 | | x 2:5fddd98957c8 C (rewritten using rebase as 10:5ae4c968c6ac) | ||
Pierre-Yves David
|
r17612 | | | | ||
Denis Laxalde
|
r35047 | | x 1:42ccdea3bb16 B (pruned using rebase) | ||
Pierre-Yves David
|
r17612 | |/ | ||
o 0:cd010b8cd998 A | ||||
$ hg debugobsolete | ||||
Boris Feld
|
r34962 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | ||
5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | ||||
32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | ||||
Pierre-Yves David
|
r18444 | |||
Martin von Zweigbergk
|
r31295 | More complex case where part of the rebase set were already rebased | ||
Pierre-Yves David
|
r18444 | |||
$ hg rebase --rev 'desc(D)' --dest 'desc(H)' | ||||
Mads Kiilerich
|
r23517 | rebasing 9:08483444fef9 "D" | ||
Martin von Zweigbergk
|
r35727 | 1 new orphan changesets | ||
Pierre-Yves David
|
r18444 | $ hg debugobsolete | ||
Boris Feld
|
r34962 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | ||
5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | ||||
32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | ||||
08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | ||||
Pierre-Yves David
|
r18444 | $ hg log -G | ||
Augie Fackler
|
r19861 | @ 11:4596109a6a43 D | ||
Pierre-Yves David
|
r18444 | | | ||
r35524 | | * 10:5ae4c968c6ac C | |||
Pierre-Yves David
|
r18444 | | | | ||
Denis Laxalde
|
r35047 | | x 9:08483444fef9 D (rewritten using rebase as 11:4596109a6a43) | ||
Pierre-Yves David
|
r18444 | | | | ||
| o 8:8877864f1edb B | ||||
| | | ||||
o | 7:02de42196ebe H | ||||
| | | ||||
| o 6:eea13746799a G | ||||
|/| | ||||
o | 5:24b6387c8c8c F | ||||
| | | ||||
| o 4:9520eea781bc E | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
Laurent Charignon
|
r26349 | $ hg rebase --source 'desc(B)' --dest 'tip' --config experimental.rebaseskipobsolete=True | ||
Jun Wu
|
r34010 | rebasing 8:8877864f1edb "B" | ||
Martin von Zweigbergk
|
r46356 | note: not rebasing 9:08483444fef9 "D", already in destination as 11:4596109a6a43 tip "D" | ||
Mads Kiilerich
|
r23517 | rebasing 10:5ae4c968c6ac "C" | ||
Pierre-Yves David
|
r18444 | $ hg debugobsolete | ||
Boris Feld
|
r34962 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | ||
5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | ||||
32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | ||||
08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | ||||
8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | ||||
5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | ||||
Boris Feld
|
r33770 | $ hg log --rev 'contentdivergent()' | ||
Pierre-Yves David
|
r18444 | $ hg log -G | ||
Pierre-Yves David
|
r19925 | o 13:98f6af4ee953 C | ||
Pierre-Yves David
|
r18444 | | | ||
Augie Fackler
|
r19861 | o 12:462a34d07e59 B | ||
Pierre-Yves David
|
r18444 | | | ||
Pierre-Yves David
|
r19925 | @ 11:4596109a6a43 D | ||
Pierre-Yves David
|
r18444 | | | ||
o 7:02de42196ebe H | ||||
| | ||||
| o 6:eea13746799a G | ||||
|/| | ||||
o | 5:24b6387c8c8c F | ||||
| | | ||||
| o 4:9520eea781bc E | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
Augie Fackler
|
r19861 | $ hg log --style default --debug -r 4596109a6a4328c398bde3a4a3b6737cfade3003 | ||
changeset: 11:4596109a6a4328c398bde3a4a3b6737cfade3003 | ||||
phase: draft | ||||
parent: 7:02de42196ebee42ef284b6780a87cdc96e8eaab6 | ||||
parent: -1:0000000000000000000000000000000000000000 | ||||
manifest: 11:a91006e3a02f1edf631f7018e6e5684cf27dd905 | ||||
user: Nicolas Dumazet <nicdumz.commits@gmail.com> | ||||
date: Sat Apr 30 15:24:48 2011 +0200 | ||||
files+: D | ||||
extra: branch=default | ||||
extra: rebase_source=08483444fef91d6224f6655ee586a65d263ad34c | ||||
extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a | ||||
description: | ||||
D | ||||
Matt Harbison
|
r26902 | $ hg up -qr 'desc(G)' | ||
$ hg graft 4596109a6a4328c398bde3a4a3b6737cfade3003 | ||||
grafting 11:4596109a6a43 "D" | ||||
$ hg up -qr 'desc(E)' | ||||
$ hg rebase -s tip -d . | ||||
Martin von Zweigbergk
|
r46356 | rebasing 14:9e36056a46e3 tip "D" | ||
Matt Harbison
|
r26902 | $ hg log --style default --debug -r tip | ||
Siddharth Agarwal
|
r27974 | changeset: 15:627d4614809036ba22b9e7cb31638ddc06ab99ab | ||
Matt Harbison
|
r26902 | tag: tip | ||
phase: draft | ||||
parent: 4:9520eea781bcca16c1e15acc0ba14335a0e8e5ba | ||||
parent: -1:0000000000000000000000000000000000000000 | ||||
manifest: 15:648e8ede73ae3e497d093d3a4c8fcc2daa864f42 | ||||
user: Nicolas Dumazet <nicdumz.commits@gmail.com> | ||||
date: Sat Apr 30 15:24:48 2011 +0200 | ||||
files+: D | ||||
extra: branch=default | ||||
extra: intermediate-source=4596109a6a4328c398bde3a4a3b6737cfade3003 | ||||
Siddharth Agarwal
|
r27974 | extra: rebase_source=9e36056a46e37c9776168c7375734eebc70e294f | ||
Matt Harbison
|
r26902 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a | ||
description: | ||||
D | ||||
Martin von Zweigbergk
|
r31295 | Start rebase from a commit that is obsolete but not hidden only because it's | ||
a working copy parent. We should be moved back to the starting commit as usual | ||||
even though it is hidden (until we're moved there). | ||||
$ hg --hidden up -qr 'first(hidden())' | ||||
Martin von Zweigbergk
|
r37939 | updated to hidden changeset 42ccdea3bb16 | ||
Boris Feld
|
r35729 | (hidden revision '42ccdea3bb16' is pruned) | ||
Martin von Zweigbergk
|
r31295 | $ hg rebase --rev 13 --dest 15 | ||
rebasing 13:98f6af4ee953 "C" | ||||
Martin von Zweigbergk
|
r31297 | $ hg log -G | ||
o 16:294a2b93eb4d C | ||||
| | ||||
o 15:627d46148090 D | ||||
| | ||||
| o 12:462a34d07e59 B | ||||
| | | ||||
| o 11:4596109a6a43 D | ||||
| | | ||||
| o 7:02de42196ebe H | ||||
| | | ||||
+---o 6:eea13746799a G | ||||
| |/ | ||||
| o 5:24b6387c8c8c F | ||||
| | | ||||
o | 4:9520eea781bc E | ||||
|/ | ||||
Denis Laxalde
|
r35047 | | @ 1:42ccdea3bb16 B (pruned using rebase) | ||
Martin von Zweigbergk
|
r31297 | |/ | ||
o 0:cd010b8cd998 A | ||||
Martin von Zweigbergk
|
r31295 | |||
Pierre-Yves David
|
r17612 | $ cd .. | ||
Pierre-Yves David
|
r17613 | collapse rebase | ||
--------------------------------- | ||||
$ hg clone base collapse | ||||
updating to branch default | ||||
3 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ cd collapse | ||||
$ hg rebase -s 42ccdea3bb16 -d eea13746799a --collapse | ||||
Mads Kiilerich
|
r23517 | rebasing 1:42ccdea3bb16 "B" | ||
rebasing 2:5fddd98957c8 "C" | ||||
rebasing 3:32af7686d403 "D" | ||||
Pierre-Yves David
|
r17613 | $ hg log -G | ||
Pierre-Yves David
|
r19925 | o 8:4dc2197e807b Collapsed revision | ||
Pierre-Yves David
|
r17613 | | | ||
Pierre-Yves David
|
r19925 | | @ 7:02de42196ebe H | ||
Pierre-Yves David
|
r17613 | | | | ||
o | 6:eea13746799a G | ||||
|\| | ||||
| o 5:24b6387c8c8c F | ||||
| | | ||||
o | 4:9520eea781bc E | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
$ hg log --hidden -G | ||||
Pierre-Yves David
|
r19925 | o 8:4dc2197e807b Collapsed revision | ||
Pierre-Yves David
|
r17613 | | | ||
Pierre-Yves David
|
r19925 | | @ 7:02de42196ebe H | ||
Pierre-Yves David
|
r17613 | | | | ||
o | 6:eea13746799a G | ||||
|\| | ||||
| o 5:24b6387c8c8c F | ||||
| | | ||||
o | 4:9520eea781bc E | ||||
|/ | ||||
Denis Laxalde
|
r35047 | | x 3:32af7686d403 D (rewritten using rebase as 8:4dc2197e807b) | ||
Pierre-Yves David
|
r17613 | | | | ||
Denis Laxalde
|
r35047 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:4dc2197e807b) | ||
Pierre-Yves David
|
r17613 | | | | ||
Denis Laxalde
|
r35047 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:4dc2197e807b) | ||
Pierre-Yves David
|
r17613 | |/ | ||
o 0:cd010b8cd998 A | ||||
Pierre-Yves David
|
r19924 | $ hg id --debug -r tip | ||
Pierre-Yves David
|
r17613 | 4dc2197e807bae9817f09905b50ab288be2dbbcf tip | ||
$ hg debugobsolete | ||||
Boris Feld
|
r40078 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'fold-id': '6fb65cdc', 'fold-idx': '1', 'fold-size': '3', 'operation': 'rebase', 'user': 'test'} | ||
5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'fold-id': '6fb65cdc', 'fold-idx': '2', 'fold-size': '3', 'operation': 'rebase', 'user': 'test'} | ||||
32af7686d403cf45b5d95f2d70cebea587ac806a 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'fold-id': '6fb65cdc', 'fold-idx': '3', 'fold-size': '3', 'operation': 'rebase', 'user': 'test'} | ||||
Pierre-Yves David
|
r17613 | |||
$ cd .. | ||||
Pierre-Yves David
|
r17615 | Rebase set has hidden descendants | ||
--------------------------------- | ||||
Denis Laxalde
|
r35046 | We rebase a changeset which has hidden descendants. Hidden changesets must not | ||
be rebased. | ||||
Pierre-Yves David
|
r17615 | |||
$ hg clone base hidden | ||||
updating to branch default | ||||
3 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ cd hidden | ||||
Denis Laxalde
|
r35048 | $ hg log -G | ||
@ 7:02de42196ebe H | ||||
| | ||||
| o 6:eea13746799a G | ||||
|/| | ||||
o | 5:24b6387c8c8c F | ||||
| | | ||||
| o 4:9520eea781bc E | ||||
|/ | ||||
| o 3:32af7686d403 D | ||||
| | | ||||
| o 2:5fddd98957c8 C | ||||
| | | ||||
| o 1:42ccdea3bb16 B | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
Pierre-Yves David
|
r17615 | $ hg rebase -s 5fddd98957c8 -d eea13746799a | ||
Mads Kiilerich
|
r23517 | rebasing 2:5fddd98957c8 "C" | ||
rebasing 3:32af7686d403 "D" | ||||
Denis Laxalde
|
r35048 | $ hg log -G | ||
o 9:cf44d2f5a9f4 D | ||||
| | ||||
o 8:e273c5e7d2d2 C | ||||
| | ||||
| @ 7:02de42196ebe H | ||||
| | | ||||
o | 6:eea13746799a G | ||||
|\| | ||||
| o 5:24b6387c8c8c F | ||||
| | | ||||
o | 4:9520eea781bc E | ||||
|/ | ||||
| o 1:42ccdea3bb16 B | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
Pierre-Yves David
|
r17615 | $ hg rebase -s 42ccdea3bb16 -d 02de42196ebe | ||
Mads Kiilerich
|
r23517 | rebasing 1:42ccdea3bb16 "B" | ||
Pierre-Yves David
|
r17615 | $ hg log -G | ||
Pierre-Yves David
|
r19925 | o 10:7c6027df6a99 B | ||
Pierre-Yves David
|
r17615 | | | ||
| o 9:cf44d2f5a9f4 D | ||||
| | | ||||
| o 8:e273c5e7d2d2 C | ||||
| | | ||||
Pierre-Yves David
|
r19925 | @ | 7:02de42196ebe H | ||
Pierre-Yves David
|
r17615 | | | | ||
| o 6:eea13746799a G | ||||
|/| | ||||
o | 5:24b6387c8c8c F | ||||
| | | ||||
| o 4:9520eea781bc E | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
$ hg log --hidden -G | ||||
Pierre-Yves David
|
r19925 | o 10:7c6027df6a99 B | ||
Pierre-Yves David
|
r17615 | | | ||
| o 9:cf44d2f5a9f4 D | ||||
| | | ||||
| o 8:e273c5e7d2d2 C | ||||
| | | ||||
Pierre-Yves David
|
r19925 | @ | 7:02de42196ebe H | ||
Pierre-Yves David
|
r17615 | | | | ||
| o 6:eea13746799a G | ||||
|/| | ||||
o | 5:24b6387c8c8c F | ||||
| | | ||||
| o 4:9520eea781bc E | ||||
|/ | ||||
Denis Laxalde
|
r35047 | | x 3:32af7686d403 D (rewritten using rebase as 9:cf44d2f5a9f4) | ||
Pierre-Yves David
|
r17615 | | | | ||
Denis Laxalde
|
r35047 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:e273c5e7d2d2) | ||
Pierre-Yves David
|
r17615 | | | | ||
Denis Laxalde
|
r35047 | | x 1:42ccdea3bb16 B (rewritten using rebase as 10:7c6027df6a99) | ||
Pierre-Yves David
|
r17615 | |/ | ||
o 0:cd010b8cd998 A | ||||
$ hg debugobsolete | ||||
Boris Feld
|
r34962 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b e273c5e7d2d29df783dce9f9eaa3ac4adc69c15d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | ||
32af7686d403cf45b5d95f2d70cebea587ac806a cf44d2f5a9f4297a62be94cbdd3dff7c7dc54258 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | ||||
42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 7c6027df6a99d93f461868e5433f63bde20b6dfb 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | ||||
Pierre-Yves David
|
r17615 | |||
Pierre-Yves David
|
r18398 | Test that rewriting leaving instability behind is allowed | ||
--------------------------------------------------------------------- | ||||
Pierre-Yves David
|
r18164 | |||
$ hg log -r 'children(8)' | ||||
9:cf44d2f5a9f4 D (no-eol) | ||||
$ hg rebase -r 8 | ||||
Mads Kiilerich
|
r23517 | rebasing 8:e273c5e7d2d2 "C" | ||
Martin von Zweigbergk
|
r35727 | 1 new orphan changesets | ||
Pierre-Yves David
|
r18164 | $ hg log -G | ||
Pierre-Yves David
|
r19925 | o 11:0d8f238b634c C | ||
Pierre-Yves David
|
r18164 | | | ||
o 10:7c6027df6a99 B | ||||
| | ||||
r35524 | | * 9:cf44d2f5a9f4 D | |||
Pierre-Yves David
|
r18164 | | | | ||
Denis Laxalde
|
r35047 | | x 8:e273c5e7d2d2 C (rewritten using rebase as 11:0d8f238b634c) | ||
Pierre-Yves David
|
r18164 | | | | ||
Pierre-Yves David
|
r19925 | @ | 7:02de42196ebe H | ||
Pierre-Yves David
|
r18164 | | | | ||
| o 6:eea13746799a G | ||||
|/| | ||||
o | 5:24b6387c8c8c F | ||||
| | | ||||
| o 4:9520eea781bc E | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
Augie Fackler
|
r37805 | $ cd .. | ||
$ cp -R hidden stabilize | ||||
$ cd stabilize | ||||
$ hg rebase --auto-orphans '0::' -d 10 | ||||
Martin von Zweigbergk
|
r44382 | abort: cannot specify both --auto-orphans and --dest | ||
Martin von Zweigbergk
|
r46431 | [10] | ||
Augie Fackler
|
r37805 | $ hg rebase --auto-orphans '0::' | ||
rebasing 9:cf44d2f5a9f4 "D" | ||||
$ hg log -G | ||||
o 12:7e3935feaa68 D | ||||
| | ||||
o 11:0d8f238b634c C | ||||
| | ||||
o 10:7c6027df6a99 B | ||||
| | ||||
@ 7:02de42196ebe H | ||||
| | ||||
| o 6:eea13746799a G | ||||
|/| | ||||
o | 5:24b6387c8c8c F | ||||
| | | ||||
| o 4:9520eea781bc E | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
Pierre-Yves David
|
r18164 | |||
Augie Fackler
|
r37805 | $ cd ../hidden | ||
$ rm -r ../stabilize | ||||
Pierre-Yves David
|
r18164 | |||
Pierre-Yves David
|
r18424 | Test multiple root handling | ||
------------------------------------ | ||||
$ hg rebase --dest 4 --rev '7+11+9' | ||||
Xidorn Quan
|
r30007 | rebasing 9:cf44d2f5a9f4 "D" | ||
Mads Kiilerich
|
r23517 | rebasing 7:02de42196ebe "H" | ||
Martin von Zweigbergk
|
r46356 | rebasing 11:0d8f238b634c tip "C" | ||
Pierre-Yves David
|
r18424 | $ hg log -G | ||
Pierre-Yves David
|
r19925 | o 14:1e8370e38cca C | ||
Pierre-Yves David
|
r18424 | | | ||
Xidorn Quan
|
r30007 | @ 13:bfe264faf697 H | ||
| | ||||
| o 12:102b4c1d889b D | ||||
Pierre-Yves David
|
r18424 | |/ | ||
r35524 | | * 10:7c6027df6a99 B | |||
Pierre-Yves David
|
r18424 | | | | ||
Denis Laxalde
|
r35047 | | x 7:02de42196ebe H (rewritten using rebase as 13:bfe264faf697) | ||
Pierre-Yves David
|
r18424 | | | | ||
+---o 6:eea13746799a G | ||||
| |/ | ||||
| o 5:24b6387c8c8c F | ||||
| | | ||||
o | 4:9520eea781bc E | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
Pierre-Yves David
|
r18444 | $ cd .. | ||
Pierre-Yves David
|
r18472 | |||
Martin von Zweigbergk
|
r33641 | Detach both parents | ||
$ hg init double-detach | ||||
$ cd double-detach | ||||
$ hg debugdrawdag <<EOF | ||||
> F | ||||
> /| | ||||
> C E | ||||
> | | | ||||
> B D G | ||||
> \|/ | ||||
> A | ||||
> EOF | ||||
Jun Wu
|
r33783 | $ hg rebase -d G -r 'B + D + F' | ||
Martin von Zweigbergk
|
r46356 | rebasing 1:112478962961 B "B" | ||
rebasing 2:b18e25de2cf5 D "D" | ||||
rebasing 6:f15c3adaf214 F tip "F" | ||||
Jun Wu
|
r33786 | abort: cannot rebase 6:f15c3adaf214 without moving at least one of its parents | ||
Martin von Zweigbergk
|
r47377 | [10] | ||
Martin von Zweigbergk
|
r33641 | |||
$ cd .. | ||||
Pierre-Yves David
|
r18472 | test on rebase dropping a merge | ||
(setup) | ||||
$ hg init dropmerge | ||||
$ cd dropmerge | ||||
$ hg unbundle "$TESTDIR/bundles/rebase.hg" | ||||
adding changesets | ||||
adding manifests | ||||
adding file changes | ||||
added 8 changesets with 7 changes to 7 files (+2 heads) | ||||
Boris Feld
|
r39516 | new changesets cd010b8cd998:02de42196ebe (8 drafts) | ||
Pierre-Yves David
|
r18472 | (run 'hg heads' to see heads, 'hg merge' to merge) | ||
$ hg up 3 | ||||
4 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg merge 7 | ||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
(branch merge, don't forget to commit) | ||||
$ hg ci -m 'M' | ||||
$ echo I > I | ||||
$ hg add I | ||||
$ hg ci -m I | ||||
$ hg log -G | ||||
@ 9:4bde274eefcf I | ||||
| | ||||
o 8:53a6a128b2b7 M | ||||
|\ | ||||
| o 7:02de42196ebe H | ||||
| | | ||||
| | o 6:eea13746799a G | ||||
| |/| | ||||
| o | 5:24b6387c8c8c F | ||||
| | | | ||||
| | o 4:9520eea781bc E | ||||
| |/ | ||||
o | 3:32af7686d403 D | ||||
| | | ||||
o | 2:5fddd98957c8 C | ||||
| | | ||||
o | 1:42ccdea3bb16 B | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
(actual test) | ||||
$ hg rebase --dest 6 --rev '((desc(H) + desc(D))::) - desc(M)' | ||||
Mads Kiilerich
|
r23517 | rebasing 3:32af7686d403 "D" | ||
rebasing 7:02de42196ebe "H" | ||||
Martin von Zweigbergk
|
r46356 | rebasing 9:4bde274eefcf tip "I" | ||
Martin von Zweigbergk
|
r35727 | 1 new orphan changesets | ||
Pierre-Yves David
|
r18472 | $ hg log -G | ||
@ 12:acd174b7ab39 I | ||||
| | ||||
o 11:6c11a6218c97 H | ||||
| | ||||
| o 10:b5313c85b22e D | ||||
|/ | ||||
r35524 | | * 8:53a6a128b2b7 M | |||
Pierre-Yves David
|
r18472 | | |\ | ||
Denis Laxalde
|
r35047 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) | ||
Pierre-Yves David
|
r18472 | | | | | ||
o---+ 6:eea13746799a G | ||||
| | | | ||||
| | o 5:24b6387c8c8c F | ||||
| | | | ||||
o---+ 4:9520eea781bc E | ||||
/ / | ||||
Denis Laxalde
|
r35047 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) | ||
Pierre-Yves David
|
r18472 | | | | ||
o | 2:5fddd98957c8 C | ||||
| | | ||||
o | 1:42ccdea3bb16 B | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
Pierre-Yves David
|
r23970 | |||
Test hidden changesets in the rebase set (issue4504) | ||||
$ hg up --hidden 9 | ||||
Martin von Zweigbergk
|
r37939 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||
updated to hidden changeset 4bde274eefcf | ||||
Boris Feld
|
r35729 | (hidden revision '4bde274eefcf' was rewritten as: acd174b7ab39) | ||
Pierre-Yves David
|
r23970 | $ echo J > J | ||
$ hg add J | ||||
$ hg commit -m J | ||||
Martin von Zweigbergk
|
r35727 | 1 new orphan changesets | ||
r49536 | created new head | |||
Pierre-Yves David
|
r23970 | $ hg debugobsolete `hg log --rev . -T '{node}'` | ||
r43163 | 1 new obsolescence markers | |||
Boris Feld
|
r33542 | obsoleted 1 changesets | ||
Pierre-Yves David
|
r23970 | |||
Kostia Balytskyi
|
r28429 | $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off | ||
Pierre-Yves David
|
r23970 | rebasing 9:4bde274eefcf "I" | ||
Martin von Zweigbergk
|
r46356 | rebasing 13:06edfc82198f tip "J" | ||
Martin von Zweigbergk
|
r35727 | 2 new content-divergent changesets | ||
Pierre-Yves David
|
r23970 | $ hg log -G | ||
@ 15:5ae8a643467b J | ||||
| | ||||
r35524 | * 14:9ad579b4a5de I | |||
Pierre-Yves David
|
r23970 | | | ||
r35524 | | * 12:acd174b7ab39 I | |||
Pierre-Yves David
|
r23970 | | | | ||
| o 11:6c11a6218c97 H | ||||
| | | ||||
o | 10:b5313c85b22e D | ||||
|/ | ||||
r35524 | | * 8:53a6a128b2b7 M | |||
Pierre-Yves David
|
r23970 | | |\ | ||
Denis Laxalde
|
r35047 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) | ||
Pierre-Yves David
|
r23970 | | | | | ||
o---+ 6:eea13746799a G | ||||
| | | | ||||
| | o 5:24b6387c8c8c F | ||||
| | | | ||||
o---+ 4:9520eea781bc E | ||||
/ / | ||||
Denis Laxalde
|
r35047 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) | ||
Pierre-Yves David
|
r23970 | | | | ||
o | 2:5fddd98957c8 C | ||||
| | | ||||
o | 1:42ccdea3bb16 B | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
Laurent Charignon
|
r26349 | $ hg up 14 -C | ||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ echo "K" > K | ||||
$ hg add K | ||||
$ hg commit --amend -m "K" | ||||
Martin von Zweigbergk
|
r35727 | 1 new orphan changesets | ||
Laurent Charignon
|
r26349 | $ echo "L" > L | ||
$ hg add L | ||||
$ hg commit -m "L" | ||||
$ hg up '.^' | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ echo "M" > M | ||||
$ hg add M | ||||
$ hg commit --amend -m "M" | ||||
Martin von Zweigbergk
|
r35727 | 1 new orphan changesets | ||
Laurent Charignon
|
r26349 | $ hg log -G | ||
Saurabh Singh
|
r34087 | @ 18:bfaedf8eb73b M | ||
Laurent Charignon
|
r26349 | | | ||
r35524 | | * 17:97219452e4bd L | |||
Laurent Charignon
|
r26349 | | | | ||
Denis Laxalde
|
r35047 | | x 16:fc37a630c901 K (rewritten using amend as 18:bfaedf8eb73b) | ||
Laurent Charignon
|
r26349 | |/ | ||
r35524 | | * 15:5ae8a643467b J | |||
Laurent Charignon
|
r26349 | | | | ||
Denis Laxalde
|
r35047 | | x 14:9ad579b4a5de I (rewritten using amend as 16:fc37a630c901) | ||
Laurent Charignon
|
r26349 | |/ | ||
r35524 | | * 12:acd174b7ab39 I | |||
Laurent Charignon
|
r26349 | | | | ||
| o 11:6c11a6218c97 H | ||||
| | | ||||
o | 10:b5313c85b22e D | ||||
|/ | ||||
r35524 | | * 8:53a6a128b2b7 M | |||
Laurent Charignon
|
r26349 | | |\ | ||
Denis Laxalde
|
r35047 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) | ||
Laurent Charignon
|
r26349 | | | | | ||
o---+ 6:eea13746799a G | ||||
| | | | ||||
| | o 5:24b6387c8c8c F | ||||
| | | | ||||
o---+ 4:9520eea781bc E | ||||
/ / | ||||
Denis Laxalde
|
r35047 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) | ||
Laurent Charignon
|
r26349 | | | | ||
o | 2:5fddd98957c8 C | ||||
| | | ||||
o | 1:42ccdea3bb16 B | ||||
|/ | ||||
o 0:cd010b8cd998 A | ||||
Saurabh Singh
|
r34087 | $ hg rebase -s 14 -d 17 --config experimental.rebaseskipobsolete=True | ||
note: not rebasing 14:9ad579b4a5de "I", already in destination as 16:fc37a630c901 "K" | ||||
Laurent Charignon
|
r26349 | rebasing 15:5ae8a643467b "J" | ||
Martin von Zweigbergk
|
r35727 | 1 new orphan changesets | ||
Laurent Charignon
|
r26349 | |||
Pierre-Yves David
|
r26675 | $ cd .. | ||