##// END OF EJS Templates
debian: switch to using debhelper and dh_python2 to build debs...
debian: switch to using debhelper and dh_python2 to build debs This is a much larger commit than I'd like, but I honestly don't see a good way to break it up and leave things working. Summary: We now use debian/rules with debhelper to build our debs. This is much more standard, and means we use dh_python2 to do things like handle leaving .pyc files out of the built debs. The resulting package is split into mercurial and mercurial-common, with the former being the hg stub and all the native .sos, and the latter being basically everything else. builddeb and dockerdeb are updated to use the new system. The old way (using dpkg by hand) breaks with the above changes because debian/control no longer contains a version string (that's now guessed from the phony changelog.) Tests are updated to assert that the right files end up in the right debs.

File last commit:

r25411:d298805f default
r26148:7f49efca default
Show More
test-rebase-scenario-global.t
745 lines | 13.0 KiB | text/troff | Tads3Lexer
/ tests / test-rebase-scenario-global.t
Adrian Buehlmann
tests: unify test-rebase*
r12608 $ cat >> $HGRCPATH <<EOF
> [extensions]
> rebase=
>
Pierre-Yves David
phases: prevent rebase to rebase immutable changeset.
r15742 > [phases]
> publish=False
>
Adrian Buehlmann
tests: unify test-rebase*
r12608 > [alias]
> tglog = log -G --template "{rev}: '{desc}' {branches}\n"
> EOF
$ hg init a
$ cd a
Thomas Arendsen Hein
tests: make tests work if directory contains special characters...
r16350 $ hg unbundle "$TESTDIR/bundles/rebase.hg"
Nicolas Dumazet
tests: introduce a rebase bundle to use with rebase tests...
r14118 adding changesets
adding manifests
adding file changes
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 added 8 changesets with 7 changes to 7 files (+2 heads)
Nicolas Dumazet
tests: introduce a rebase bundle to use with rebase tests...
r14118 (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
Adrian Buehlmann
tests: unify test-rebase*
r12608 $ cd ..
Rebasing
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 D onto H - simple rebase:
FUJIWARA Katsunori
rebase: use "getcommiteditor()" instead of explicit editor choice...
r21410 (this also tests that editor is invoked if '--edit' is specified)
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg clone -q -u . a a1
$ cd a1
$ hg tglog
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 @ 7: 'H'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 | o 6: 'G'
|/|
o | 5: 'F'
| |
Adrian Buehlmann
tests: unify test-rebase*
r12608 | o 4: 'E'
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 |/
| o 3: 'D'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
| o 2: 'C'
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 | |
Adrian Buehlmann
tests: unify test-rebase*
r12608 | o 1: 'B'
|/
o 0: 'A'
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119
FUJIWARA Katsunori
rebase: use "getcommiteditor()" instead of explicit editor choice...
r21410 $ hg status --rev "3^1" --rev 3
A D
$ HGEDITOR=cat hg rebase -s 3 -d 7 --edit
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 3:32af7686d403 "D"
FUJIWARA Katsunori
rebase: use "getcommiteditor()" instead of explicit editor choice...
r21410 D
HG: Enter commit message. Lines beginning with 'HG:' are removed.
HG: Leave message empty to abort commit.
HG: --
HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com>
HG: branch 'default'
Matt Mackall
dirstate: properly clean-up some more merge state on setparents
r22895 HG: added D
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/32af7686d403-6f7dface-backup.hg (glob)
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 o 7: 'D'
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 |
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 @ 6: 'H'
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 |
| o 5: 'G'
|/|
o | 4: 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 | o 3: 'E'
|/
| o 2: 'C'
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 | |
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 | o 1: 'B'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
o 0: 'A'
$ cd ..
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 D onto F - intermediate point:
FUJIWARA Katsunori
rebase: use "getcommiteditor()" instead of explicit editor choice...
r21410 (this also tests that editor is not invoked if '--edit' is not specified)
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg clone -q -u . a a2
$ cd a2
FUJIWARA Katsunori
rebase: use "getcommiteditor()" instead of explicit editor choice...
r21410 $ HGEDITOR=cat hg rebase -s 3 -d 5
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 3:32af7686d403 "D"
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/32af7686d403-6f7dface-backup.hg (glob)
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 o 7: 'D'
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 |
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 | @ 6: 'H'
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 |/
| o 5: 'G'
|/|
o | 4: 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 | o 3: 'E'
|/
| o 2: 'C'
| |
| o 1: 'B'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
o 0: 'A'
$ cd ..
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 E onto H - skip of G:
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg clone -q -u . a a3
$ cd a3
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 $ hg rebase -s 4 -d 7
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 4:9520eea781bc "E"
rebasing 6:eea13746799a "G"
Mads Kiilerich
rebase: show warning when rebase creates no changes to commit...
r23518 note: rebase of 6:eea13746799a created no changes to commit
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-backup.hg (glob)
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 o 6: 'E'
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 |
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 @ 5: 'H'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 o 4: 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 | o 3: 'D'
| |
| o 2: 'C'
| |
Adrian Buehlmann
tests: unify test-rebase*
r12608 | o 1: 'B'
|/
o 0: 'A'
$ cd ..
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 F onto E - rebase of a branching point (skip G):
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg clone -q -u . a a4
$ cd a4
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 $ hg rebase -s 5 -d 4
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 5:24b6387c8c8c "F"
rebasing 6:eea13746799a "G"
Mads Kiilerich
rebase: show warning when rebase creates no changes to commit...
r23518 note: rebase of 6:eea13746799a created no changes to commit
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 7:02de42196ebe "H" (tip)
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a4/.hg/strip-backup/24b6387c8c8c-c3fe765d-backup.hg (glob)
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 @ 6: 'H'
|
o 5: 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 o 4: 'E'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 | o 3: 'D'
| |
| o 2: 'C'
| |
Adrian Buehlmann
tests: unify test-rebase*
r12608 | o 1: 'B'
|/
o 0: 'A'
$ cd ..
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 G onto H - merged revision having a parent in ancestors of target:
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg clone -q -u . a a5
$ cd a5
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 $ hg rebase -s 6 -d 7
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 6:eea13746799a "G"
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a5/.hg/strip-backup/eea13746799a-883828ed-backup.hg (glob)
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 o 7: 'G'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |\
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 | @ 6: 'H'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 | o 5: 'F'
| |
o | 4: 'E'
|/
Adrian Buehlmann
tests: unify test-rebase*
r12608 | o 3: 'D'
| |
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 | o 2: 'C'
| |
Adrian Buehlmann
tests: unify test-rebase*
r12608 | o 1: 'B'
|/
o 0: 'A'
$ cd ..
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 F onto B - G maintains E as parent:
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg clone -q -u . a a6
$ cd a6
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 $ hg rebase -s 5 -d 1
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 5:24b6387c8c8c "F"
rebasing 6:eea13746799a "G"
rebasing 7:02de42196ebe "H" (tip)
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a6/.hg/strip-backup/24b6387c8c8c-c3fe765d-backup.hg (glob)
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 @ 7: 'H'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 | o 6: 'G'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/|
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 o | 5: 'F'
| |
| o 4: 'E'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 | | o 3: 'D'
| | |
+---o 2: 'C'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
o | 1: 'B'
|/
o 0: 'A'
$ cd ..
These will fail (using --source):
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 G onto F - rebase onto an ancestor:
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg clone -q -u . a a7
$ cd a7
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 $ hg rebase -s 6 -d 5
Pierre-Yves David
rebase: use revset as soon as possible in internal logic...
r15267 nothing to rebase
[1]
Adrian Buehlmann
tests: unify test-rebase*
r12608
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 F onto G - rebase onto a descendant:
Adrian Buehlmann
tests: unify test-rebase*
r12608
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 $ hg rebase -s 5 -d 6
Adrian Buehlmann
tests: unify test-rebase*
r12608 abort: source is ancestor of destination
[255]
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 G onto B - merge revision with both parents not in ancestors of target:
Adrian Buehlmann
tests: unify test-rebase*
r12608
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 $ hg rebase -s 6 -d 1
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 6:eea13746799a "G"
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 abort: cannot use revision 6 as base, result would have 3 parents
Adrian Buehlmann
tests: unify test-rebase*
r12608 [255]
These will abort gracefully (using --base):
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 G onto G - rebase onto same changeset:
Adrian Buehlmann
tests: unify test-rebase*
r12608
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 $ hg rebase -b 6 -d 6
Mads Kiilerich
rebase: improve error message for --base being empty or causing emptiness...
r20249 nothing to rebase - eea13746799a is both "base" and destination
Adrian Buehlmann
tests: unify test-rebase*
r12608 [1]
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 G onto F - rebase onto an ancestor:
Adrian Buehlmann
tests: unify test-rebase*
r12608
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 $ hg rebase -b 6 -d 5
Adrian Buehlmann
tests: unify test-rebase*
r12608 nothing to rebase
[1]
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 F onto G - rebase onto a descendant:
Adrian Buehlmann
tests: unify test-rebase*
r12608
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 $ hg rebase -b 5 -d 6
Mads Kiilerich
rebase: improve error message for --base being empty or causing emptiness...
r20249 nothing to rebase - "base" 24b6387c8c8c is already an ancestor of destination eea13746799a
Adrian Buehlmann
tests: unify test-rebase*
r12608 [1]
Pierre-Yves David
rebase: allow rebase to ancestor (issue3010)...
r15132 C onto A - rebase onto an ancestor:
$ hg rebase -d 0 -s 2
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 2:5fddd98957c8 "C"
rebasing 3:32af7686d403 "D"
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-f9244fa1-backup.hg (glob)
Pierre-Yves David
rebase: allow rebase to ancestor (issue3010)...
r15132 $ hg tglog
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 o 7: 'D'
Pierre-Yves David
rebase: allow rebase to ancestor (issue3010)...
r15132 |
o 6: 'C'
|
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 | @ 5: 'H'
Pierre-Yves David
rebase: allow rebase to ancestor (issue3010)...
r15132 | |
| | o 4: 'G'
| |/|
| o | 3: 'F'
|/ /
| o 2: 'E'
|/
| o 1: 'B'
|/
o 0: 'A'
Pierre-Yves David
phases: prevent rebase to rebase immutable changeset.
r15742
Check rebasing public changeset
$ hg pull --config phases.publish=True -q -r 6 . # update phase of 6
Siddharth Agarwal
rebase: check no-op before checking phase (issue3891)...
r19059 $ hg rebase -d 0 -b 6
nothing to rebase
[1]
Pierre-Yves David
phases: prevent rebase to rebase immutable changeset.
r15742 $ hg rebase -d 5 -b 6
Jordi GutiƩrrez Hermoso
phases: rewrite "immutable changeset" to "public changeset"...
r25411 abort: can't rebase public changeset e1c4361dd923
Wagner Bruna
messages: quote "hg help" hints consistently
r23917 (see "hg help phases" for details)
Pierre-Yves David
phases: prevent rebase to rebase immutable changeset.
r15742 [255]
$ hg rebase -d 5 -b 6 --keep
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 6:e1c4361dd923 "C"
rebasing 7:c9659aac0000 "D" (tip)
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
rebase: fix phases movement...
r15917
Check rebasing mutable changeset
Source phase greater or equal to destination phase: new changeset get the phase of source:
Pierre-Yves David
rebase: ignore negative state when updating back to original wc parent...
r23440 $ hg id -n
5
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
rebase: fix phases movement...
r15917 $ hg rebase -s9 -d0
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 9:2b23e52411f4 "D" (tip)
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2b23e52411f4-f942decf-backup.hg (glob)
Pierre-Yves David
rebase: ignore negative state when updating back to original wc parent...
r23440 $ hg id -n # check we updated back to parent
5
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
rebase: fix phases movement...
r15917 $ hg log --template "{phase}\n" -r 9
draft
$ hg rebase -s9 -d1
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 9:2cb10d0cfc6c "D" (tip)
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2cb10d0cfc6c-ddb0f256-backup.hg (glob)
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
rebase: fix phases movement...
r15917 $ hg log --template "{phase}\n" -r 9
draft
$ hg phase --force --secret 9
$ hg rebase -s9 -d0
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 9:c5b12b67163a "D" (tip)
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/c5b12b67163a-4e372053-backup.hg (glob)
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
rebase: fix phases movement...
r15917 $ hg log --template "{phase}\n" -r 9
secret
$ hg rebase -s9 -d1
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 9:2a0524f868ac "D" (tip)
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2a0524f868ac-cefd8574-backup.hg (glob)
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
rebase: fix phases movement...
r15917 $ hg log --template "{phase}\n" -r 9
secret
Source phase lower than destination phase: new changeset get the phase of destination:
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 $ hg rebase -s8 -d9
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 8:6d4f22462821 "C"
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6d4f22462821-3441f70b-backup.hg (glob)
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 $ hg log --template "{phase}\n" -r 'rev(9)'
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
rebase: fix phases movement...
r15917 secret
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 $ cd ..
Pierre-Yves David
rebase: allow rebase to ancestor (issue3010)...
r15132
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 Test for revset
We need a bit different graph
All destination are B
$ hg init ah
$ cd ah
Thomas Arendsen Hein
tests: make tests work if directory contains special characters...
r16350 $ hg unbundle "$TESTDIR/bundles/rebase-revset.hg"
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 adding changesets
adding manifests
adding file changes
added 9 changesets with 9 changes to 9 files (+2 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)
$ hg tglog
o 8: 'I'
|
o 7: 'H'
|
o 6: 'G'
|
| o 5: 'F'
| |
| o 4: 'E'
|/
o 3: 'D'
|
o 2: 'C'
|
| o 1: 'B'
|/
o 0: 'A'
$ cd ..
Simple case with keep:
Source on have two descendant heads but ask for one
$ hg clone -q -u . ah ah1
$ cd ah1
$ hg rebase -r '2::8' -d 1
abort: can't remove original changesets with unrebased descendants
(use --keep to keep original changesets)
[255]
Nat Mote
rebase: add short -k option for --keep...
r25025 $ hg rebase -r '2::8' -d 1 -k
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 2:c9e50f6cdc55 "C"
rebasing 3:ffd453c31098 "D"
rebasing 6:3d8a618087a7 "G"
rebasing 7:72434a4e60b0 "H"
rebasing 8:479ddb54a924 "I" (tip)
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 $ hg tglog
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 o 13: 'I'
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 |
o 12: 'H'
|
o 11: 'G'
|
o 10: 'D'
|
o 9: 'C'
|
| o 8: 'I'
| |
| o 7: 'H'
| |
| o 6: 'G'
| |
| | o 5: 'F'
| | |
| | o 4: 'E'
| |/
| o 3: 'D'
| |
| o 2: 'C'
| |
o | 1: 'B'
|/
o 0: 'A'
$ cd ..
Base on have one descendant heads we ask for but common ancestor have two
$ hg clone -q -u . ah ah2
$ cd ah2
$ hg rebase -r '3::8' -d 1
abort: can't remove original changesets with unrebased descendants
(use --keep to keep original changesets)
[255]
$ hg rebase -r '3::8' -d 1 --keep
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 3:ffd453c31098 "D"
rebasing 6:3d8a618087a7 "G"
rebasing 7:72434a4e60b0 "H"
rebasing 8:479ddb54a924 "I" (tip)
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 $ hg tglog
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 o 12: 'I'
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 |
o 11: 'H'
|
o 10: 'G'
|
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 o 9: 'D'
|
| o 8: 'I'
| |
| o 7: 'H'
| |
| o 6: 'G'
| |
| | o 5: 'F'
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 | | |
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 | | o 4: 'E'
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 | |/
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 | o 3: 'D'
| |
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 | o 2: 'C'
| |
o | 1: 'B'
|/
o 0: 'A'
$ cd ..
rebase subset
$ hg clone -q -u . ah ah3
$ cd ah3
$ hg rebase -r '3::7' -d 1
abort: can't remove original changesets with unrebased descendants
(use --keep to keep original changesets)
[255]
$ hg rebase -r '3::7' -d 1 --keep
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 3:ffd453c31098 "D"
rebasing 6:3d8a618087a7 "G"
rebasing 7:72434a4e60b0 "H"
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 $ hg tglog
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 o 11: 'H'
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 |
o 10: 'G'
|
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 o 9: 'D'
|
| o 8: 'I'
| |
| o 7: 'H'
| |
| o 6: 'G'
| |
| | o 5: 'F'
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 | | |
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 | | o 4: 'E'
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 | |/
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 | o 3: 'D'
| |
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 | o 2: 'C'
| |
o | 1: 'B'
|/
o 0: 'A'
$ cd ..
rebase subset with multiple head
$ hg clone -q -u . ah ah4
$ cd ah4
$ hg rebase -r '3::(7+5)' -d 1
abort: can't remove original changesets with unrebased descendants
(use --keep to keep original changesets)
[255]
$ hg rebase -r '3::(7+5)' -d 1 --keep
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 3:ffd453c31098 "D"
rebasing 4:c01897464e7f "E"
rebasing 5:41bfcc75ed73 "F"
rebasing 6:3d8a618087a7 "G"
rebasing 7:72434a4e60b0 "H"
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 $ hg tglog
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 o 13: 'H'
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 |
o 12: 'G'
|
| o 11: 'F'
| |
| o 10: 'E'
|/
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 o 9: 'D'
|
| o 8: 'I'
| |
| o 7: 'H'
| |
| o 6: 'G'
| |
| | o 5: 'F'
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 | | |
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 | | o 4: 'E'
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 | |/
Pierre-Yves David
rebase: do not add second parent to rebased changeset (drop detach option) (BC)...
r17005 | o 3: 'D'
| |
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 | o 2: 'C'
| |
o | 1: 'B'
|/
o 0: 'A'
$ cd ..
More advanced tests
rebase on ancestor with revset
$ hg clone -q -u . ah ah5
$ cd ah5
$ hg rebase -r '6::' -d 2
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 6:3d8a618087a7 "G"
rebasing 7:72434a4e60b0 "H"
rebasing 8:479ddb54a924 "I" (tip)
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/ah5/.hg/strip-backup/3d8a618087a7-b4f73f31-backup.hg (glob)
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 $ hg tglog
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 o 8: 'I'
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 |
o 7: 'H'
|
o 6: 'G'
|
| o 5: 'F'
| |
| o 4: 'E'
| |
| o 3: 'D'
|/
o 2: 'C'
|
| o 1: 'B'
|/
o 0: 'A'
$ cd ..
rebase with multiple root.
We rebase E and G on B
We would expect heads are I, F if it was supported
$ hg clone -q -u . ah ah6
$ cd ah6
$ hg rebase -r '(4+6)::' -d 1
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 4:c01897464e7f "E"
rebasing 5:41bfcc75ed73 "F"
rebasing 6:3d8a618087a7 "G"
rebasing 7:72434a4e60b0 "H"
rebasing 8:479ddb54a924 "I" (tip)
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/ah6/.hg/strip-backup/3d8a618087a7-aae93a24-backup.hg (glob)
Pierre-Yves David
rebase: support multiple roots for rebaseset...
r18424 $ hg tglog
Pierre-Yves David
rebase: preserve working directory parent (BC)...
r19925 o 8: 'I'
Pierre-Yves David
rebase: support multiple roots for rebaseset...
r18424 |
o 7: 'H'
|
o 6: 'G'
|
| o 5: 'F'
| |
| o 4: 'E'
|/
| o 3: 'D'
| |
| o 2: 'C'
| |
o | 1: 'B'
|/
o 0: 'A'
Pierre-Yves David
rebase: add --rev option to rebase...
r15270 $ cd ..
Pierre-Yves David
rebase: support multiple roots for rebaseset...
r18424
Mads Kiilerich
spelling: fix some minor issues found by spell checker
r18644 More complex rebase with multiple roots
Pierre-Yves David
rebase: support multiple roots for rebaseset...
r18424 each root have a different common ancestor with the destination and this is a detach
(setup)
$ hg clone -q -u . a a8
$ cd a8
$ echo I > I
$ hg add I
$ hg commit -m I
$ hg up 4
1 files updated, 0 files merged, 3 files removed, 0 files unresolved
$ echo I > J
$ hg add J
$ hg commit -m J
created new head
$ echo I > K
$ hg add K
$ hg commit -m K
$ hg tglog
@ 10: 'K'
|
o 9: 'J'
|
| o 8: 'I'
| |
| o 7: 'H'
| |
+---o 6: 'G'
| |/
| o 5: 'F'
| |
o | 4: 'E'
|/
| o 3: 'D'
| |
| o 2: 'C'
| |
| o 1: 'B'
|/
o 0: 'A'
(actual test)
$ hg rebase --dest 'desc(G)' --rev 'desc(K) + desc(I)'
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 8:e7ec4e813ba6 "I"
rebasing 10:23a4ace37988 "K" (tip)
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a8/.hg/strip-backup/23a4ace37988-b06984b3-backup.hg (glob)
Pierre-Yves David
rebase: support multiple roots for rebaseset...
r18424 $ hg log --rev 'children(desc(G))'
changeset: 9:adb617877056
parent: 6:eea13746799a
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: I
changeset: 10:882431a34a0e
tag: tip
parent: 6:eea13746799a
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: K
$ hg tglog
@ 10: 'K'
|
| o 9: 'I'
|/
| o 8: 'J'
| |
| | o 7: 'H'
| | |
o---+ 6: 'G'
|/ /
| o 5: 'F'
| |
o | 4: 'E'
|/
| o 3: 'D'
| |
| o 2: 'C'
| |
| o 1: 'B'
|/
o 0: 'A'
Pierre-Yves David
rebase: do not crash in panic when cwd disapear in the process (issue4121)...
r20335
Matt Mackall
tests: fixup issue markers to make check-commit happy
r22183 Test that rebase is not confused by $CWD disappearing during rebase (issue4121)
Pierre-Yves David
rebase: do not crash in panic when cwd disapear in the process (issue4121)...
r20335
$ cd ..
$ hg init cwd-vanish
$ cd cwd-vanish
$ touch initial-file
$ hg add initial-file
$ hg commit -m 'initial commit'
$ touch dest-file
$ hg add dest-file
$ hg commit -m 'dest commit'
$ hg up 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ touch other-file
$ hg add other-file
$ hg commit -m 'first source commit'
created new head
$ mkdir subdir
$ cd subdir
$ touch subfile
$ hg add subfile
$ hg commit -m 'second source with subdir'
$ hg rebase -b . -d 1 --traceback
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 2:779a07b1b7a0 "first source commit"
rebasing 3:a7d6f3a00bf3 "second source with subdir" (tip)
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-853e0073-backup.hg (glob)