##// END OF EJS Templates
hgweb: support constructing URLs from an alternate base URL...
hgweb: support constructing URLs from an alternate base URL The web.baseurl config option allows server operators to define a custom URL for hosted content. The way it works today is that hgwebdir parses this config option into URL components then updates the appropriate WSGI environment variables so the request "lies" about its details. For example, SERVER_NAME is updated to reflect the alternate base URL's hostname. The WSGI environment should not be modified because WSGI applications may want to know the original request details (for debugging, etc). This commit teaches our request parser about the existence of an alternate base URL. If defined, the advertised URL and other self-reflected paths will take the alternate base URL into account. The hgweb WSGI application didn't use web.baseurl. But hgwebdir did. We update hgwebdir to alter the environment parsing accordingly. The old code around environment manipulation has been removed. With this change, parserequestfromenv() has grown to a bit unwieldy. Now that practically everyone is using it, it is obvious that there is some unused features that can be trimmed. So look for this in follow-up commits. Differential Revision: https://phab.mercurial-scm.org/D2822

File last commit:

r35386:469b06b4 default
r36916:219b2335 default
Show More
test-rebase-collapse.t
857 lines | 16.1 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=
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
Create repo a:
$ 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: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 adding changesets
adding manifests
adding file changes
added 8 changesets with 7 changes to 7 files (+2 heads)
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets cd010b8cd998:02de42196ebe
Nicolas Dumazet
tests: upgrade bundles/rebase.hg to support test-rebase-collapse...
r14119 (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
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 7: 02de42196ebe 'H'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 6: eea13746799a 'G'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/|
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o | 5: 24b6387c8c8c 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 4: 9520eea781bc 'E'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 3: 32af7686d403 'D'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 2: 5fddd98957c8 'C'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 42ccdea3bb16 'B'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: cd010b8cd998 'A'
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ cd ..
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
rebase: fix phases movement...
r15917 Rebasing B onto H and collapsing changesets with different phases:
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg clone -q -u 3 a a1
$ cd a1
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
rebase: fix phases movement...
r15917 $ hg phase --force --secret 3
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
Pierre-Yves David
tests: add an explicit destination in some rebase tests...
r28101 $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e --dest 7
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 1:42ccdea3bb16 "B"
rebasing 2:5fddd98957c8 "C"
rebasing 3:32af7686d403 "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: --
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 B
HG: added C
HG: added D
FUJIWARA Katsunori
rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"...
r20766 ====
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg
Adrian Buehlmann
tests: unify test-rebase*
r12608
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
rebase: fix phases movement...
r15917 $ hg tglogp
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 5: 30882080ba93 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'
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 4: 02de42196ebe draft 'H'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 3: eea13746799a draft 'G'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/|
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o | 2: 24b6387c8c8c draft 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 9520eea781bc draft 'E'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: cd010b8cd998 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
F
H
$ cd ..
Pierre-Yves David
rebase: use revset as soon as possible in internal logic...
r15267 Rebasing E onto H:
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg clone -q -u . a a2
$ cd a2
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
rebase: fix phases movement...
r15917 $ hg phase --force --secret 6
Pierre-Yves David
tests: add an explicit destination in some rebase tests...
r28101 $ hg rebase --source 4 --collapse --dest 7
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 4:9520eea781bc "E"
rebasing 6:eea13746799a "G"
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 6: 7dd333a2d1e4 'Collapsed revision
Adrian Buehlmann
tests: unify test-rebase*
r12608 | * E
| * G'
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 5: 02de42196ebe 'H'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 4: 24b6387c8c8c 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 3: 32af7686d403 'D'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 2: 5fddd98957c8 'C'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 42ccdea3bb16 'B'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: cd010b8cd998 '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
E
F
H
$ cd ..
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661 Rebasing G onto H with custom message:
$ hg clone -q -u . a a3
$ cd a3
$ hg rebase --base 6 -m 'custom message'
abort: message can only be specified with collapse
[255]
FUJIWARA Katsunori
rebase: use "rebase.collapse" as "editform" for "--collapse" always...
r22206 $ cat > $TESTTMP/checkeditform.sh <<EOF
> env | grep HGEDITFORM
> true
> EOF
Pierre-Yves David
tests: add an explicit destination in some rebase tests...
r28101 $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source 4 --collapse -m 'custom message' -e --dest 7
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 4:9520eea781bc "E"
rebasing 6:eea13746799a "G"
FUJIWARA Katsunori
rebase: use "rebase.collapse" as "editform" for "--collapse" always...
r22206 HGEDITFORM=rebase.collapse
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 6: 38ed6a6b026b 'custom message'
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 5: 02de42196ebe 'H'
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 4: 24b6387c8c8c 'F'
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 3: 32af7686d403 'D'
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 2: 5fddd98957c8 'C'
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 42ccdea3bb16 'B'
Radomir Dopieralski
rebase: add -m/--message to rebase --collapse (issue2389)...
r13661 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: cd010b8cd998 '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
E
F
H
$ cd ..
Adrian Buehlmann
tests: unify test-rebase*
r12608
Create repo b:
$ hg init b
$ cd b
$ echo A > A
$ hg ci -Am A
adding A
$ echo B > B
$ hg ci -Am B
adding B
$ hg up -q 0
$ echo C > C
$ hg ci -Am C
adding C
created new head
$ hg merge
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ echo D > D
$ hg ci -Am D
adding D
$ hg up -q 1
$ echo E > E
$ hg ci -Am E
adding E
created new head
$ echo F > F
$ hg ci -Am F
adding F
$ hg merge
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg ci -m G
$ hg up -q 0
$ echo H > H
$ hg ci -Am H
adding H
created new head
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 7: c65502d41787 'H'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 6: c772a8b2dc17 'G'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |\
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | | o 5: 7f219660301f 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | | o 4: 8a5212ebc852 'E'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o | 3: 2870ad076e54 'D'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |\|
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o | 2: c5cefa58fd55 'C'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/ /
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 27547f69f254 'B'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 4a2df7238c3b 'A'
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ cd ..
Rebase and collapse - more than one external (fail):
$ hg clone -q -u . b b1
$ cd b1
Pierre-Yves David
tests: add an explicit destination in some rebase tests...
r28101 $ hg rebase -s 2 --dest 7 --collapse
Mads Kiilerich
rebase: improve error message for more than one external parent
r19956 abort: unable to collapse on top of 7, there is more than one external parent: 1, 5
Adrian Buehlmann
tests: unify test-rebase*
r12608 [255]
Rebase and collapse - E onto H:
Pierre-Yves David
tests: add an explicit destination in some rebase tests...
r28101 $ hg rebase -s 4 --dest 7 --collapse # root (4) is not a merge
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 4:8a5212ebc852 "E"
rebasing 5:7f219660301f "F"
rebasing 6:c772a8b2dc17 "G"
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/b1/.hg/strip-backup/8a5212ebc852-75046b61-rebase.hg
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 5: f97c4725bd99 'Collapsed revision
Adrian Buehlmann
tests: unify test-rebase*
r12608 |\ * E
| | * F
| | * G'
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | @ 4: c65502d41787 'H'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o | 3: 2870ad076e54 'D'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |\ \
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o | 2: c5cefa58fd55 'C'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o / 1: 27547f69f254 'B'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 4a2df7238c3b '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
F
H
$ 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
$ hg clone -q -u . b b2
$ cd b2
$ hg heads --template="{rev}:{node} {branch}\n"
7:c65502d4178782309ce0574c5ae6ee9485a9bafa default
6:c772a8b2dc17629cec88a19d09c926c4814b12c7 default
Brodie Rao
branchmap: cache open/closed branch head information...
r20185 $ cat $TESTTMP/b2/.hg/cache/branch2-served
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013 c65502d4178782309ce0574c5ae6ee9485a9bafa 7
Brodie Rao
branchmap: cache open/closed branch head information...
r20185 c772a8b2dc17629cec88a19d09c926c4814b12c7 o default
c65502d4178782309ce0574c5ae6ee9485a9bafa o default
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
$ hg strip 4
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/b2/.hg/strip-backup/8a5212ebc852-75046b61-backup.hg
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
Brodie Rao
branchmap: cache open/closed branch head information...
r20185 $ cat $TESTTMP/b2/.hg/cache/branch2-served
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013 c65502d4178782309ce0574c5ae6ee9485a9bafa 4
Brodie Rao
branchmap: cache open/closed branch head information...
r20185 2870ad076e541e714f3c2bc32826b5c6a6e5b040 o default
c65502d4178782309ce0574c5ae6ee9485a9bafa o default
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
$ hg heads --template="{rev}:{node} {branch}\n"
4:c65502d4178782309ce0574c5ae6ee9485a9bafa default
3:2870ad076e541e714f3c2bc32826b5c6a6e5b040 default
$ cd ..
Adrian Buehlmann
tests: unify test-rebase*
r12608 Create repo c:
$ hg init c
$ cd c
$ echo A > A
$ hg ci -Am A
adding A
$ echo B > B
$ hg ci -Am B
adding B
$ hg up -q 0
$ echo C > C
$ hg ci -Am C
adding C
created new head
$ hg merge
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ echo D > D
$ hg ci -Am D
adding D
$ hg up -q 1
$ echo E > E
$ hg ci -Am E
adding E
created new head
$ echo F > E
$ hg ci -m 'F'
$ echo G > G
$ hg ci -Am G
adding G
$ hg merge
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg ci -m H
$ hg up -q 0
$ echo I > I
$ hg ci -Am I
adding I
created new head
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 8: 46d6f0e29c20 'I'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 7: 417d3b648079 'H'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |\
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | | o 6: 55a44ad28289 'G'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | | o 5: dca5924bb570 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | | o 4: 8a5212ebc852 'E'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o | 3: 2870ad076e54 'D'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |\|
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o | 2: c5cefa58fd55 'C'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/ /
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 27547f69f254 'B'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 4a2df7238c3b 'A'
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ cd ..
Rebase and collapse - E onto I:
$ hg clone -q -u . c c1
$ cd c1
Pierre-Yves David
tests: add an explicit destination in some rebase tests...
r28101 $ hg rebase -s 4 --dest 8 --collapse # root (4) is not a merge
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 4:8a5212ebc852 "E"
rebasing 5:dca5924bb570 "F"
Adrian Buehlmann
tests: unify test-rebase*
r12608 merging E
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 6:55a44ad28289 "G"
rebasing 7:417d3b648079 "H"
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/c1/.hg/strip-backup/8a5212ebc852-f95d0879-rebase.hg
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 5: 340b34a63b39 'Collapsed revision
Adrian Buehlmann
tests: unify test-rebase*
r12608 |\ * E
| | * F
| | * G
| | * H'
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | @ 4: 46d6f0e29c20 'I'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o | 3: 2870ad076e54 'D'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |\ \
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o | 2: c5cefa58fd55 'C'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o / 1: 27547f69f254 'B'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 4a2df7238c3b '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
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 ..
Create repo d:
$ hg init d
$ cd d
$ echo A > A
$ hg ci -Am A
adding A
$ echo B > B
$ hg ci -Am B
adding B
$ echo C > C
$ hg ci -Am C
adding C
$ hg up -q 1
$ echo D > D
$ hg ci -Am D
adding D
created new head
$ hg merge
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg ci -m E
$ hg up -q 0
$ echo F > F
$ hg ci -Am F
adding F
created new head
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 5: c137c2b8081f 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 4: 0a42590ed746 'E'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |\
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | | o 3: 7bbcd6078bcc 'D'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o | 2: f838bfaca5c7 'C'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 27547f69f254 'B'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 4a2df7238c3b 'A'
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ cd ..
Rebase and collapse - B onto F:
$ hg clone -q -u . d d1
$ cd d1
Pierre-Yves David
tests: add an explicit destination in some rebase tests...
r28101 $ hg rebase -s 1 --collapse --dest 5
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 1:27547f69f254 "B"
rebasing 2:f838bfaca5c7 "C"
rebasing 3:7bbcd6078bcc "D"
rebasing 4:0a42590ed746 "E"
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/d1/.hg/strip-backup/27547f69f254-9a3f7d92-rebase.hg
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 2: b72eaccb283f 'Collapsed revision
Adrian Buehlmann
tests: unify test-rebase*
r12608 | * B
| * C
| * D
| * E'
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 1: c137c2b8081f 'F'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 4a2df7238c3b '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
Stefano Tortarolo
rebase: block collapse with keepbranches on multiple named branches (issue2112)...
r14897 Interactions between collapse and keepbranches
$ cd ..
$ 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
[255]
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990 $ repeatchange() {
> hg checkout $1
> hg cp d z
> echo blah >> z
> hg commit -Am "$2" --user "$3"
> }
$ repeatchange 3 "E" "user1"
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ repeatchange 3 "E" "user2"
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
created new head
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 5: fbfb97b1089a 'E'
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 4: f338eb3c2c7c 'E'
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 3: 41acb9dca9eb 'D'
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 2: 8ac4a08debf1 'C' two
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 1ba175478953 'B' one
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 1994f17a630e 'A'
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990
$ hg rebase -s 5 -d 4
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 5:fbfb97b1089a "E" (tip)
Mads Kiilerich
rebase: show warning when rebase creates no changes to commit...
r23518 note: rebase of 5:fbfb97b1089a created no changes to commit
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/e/.hg/strip-backup/fbfb97b1089a-553e1d85-rebase.hg
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990 $ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 4: f338eb3c2c7c 'E'
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 3: 41acb9dca9eb 'D'
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 2: 8ac4a08debf1 'C' two
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 1ba175478953 'B' one
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 1994f17a630e 'A'
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990
$ hg export tip
# HG changeset patch
# User user1
# Date 0 0
Mads Kiilerich
export: show 'Date' header in a format that also is readable for humans...
r18648 # Thu Jan 01 00:00:00 1970 +0000
Augie Fackler
test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
r15990 # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213
# Parent 41acb9dca9eb976e84cd21fcb756b4afa5a35c09
E
diff -r 41acb9dca9eb -r f338eb3c2c7c z
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/z Thu Jan 01 00:00:00 1970 +0000
@@ -0,0 +1,2 @@
+d
+blah
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)
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets f447d5abf5ea:338e84e2e558
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
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 3:338e84e2e558 "move2" (tip)
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
abort: can't remove original changesets with unrebased descendants
(use --keep to keep original changesets)
[255]
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"
rebasing 2:64b456429f67 "Collapsed revision" (tip)
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
$ echo A > A
$ hg ci -Am A
adding A
$ echo B > B
$ hg ci -Am B
adding B
$ hg up -q 0
$ echo C > C
$ hg ci -Am C
adding C
created new head
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 2: c5cefa58fd55 'C'
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 27547f69f254 'B'
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 4a2df7238c3b 'A'
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
$ hg heads --template="{rev}:{node} {branch}: {desc}\n"
2:c5cefa58fd557f84b72b87f970135984337acbc5 default: C
1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B
$ hg strip 2
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/f/.hg/strip-backup/c5cefa58fd55-629429f4-backup.hg
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 1: 27547f69f254 'B'
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 0: 4a2df7238c3b 'A'
Joshua Redstone
strip: incrementally update the branchheads cache after a strip...
r17013
$ hg heads --template="{rev}:{node} {branch}: {desc}\n"
1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B
$ 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
rebase: also include other namespaces in changeset description...
r34291 rebasing 2:1cc73eca5ecc "b" (foo tip)
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
$ touch a
$ hg add a
$ hg commit -m "a"
$ echo "a-default" > a
$ hg commit -m "a-default"
$ hg update -r 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch dev
marked working directory as branch dev
(branches are permanent and global, did you want a bookmark?)
$ echo "a-dev" > a
$ hg commit -m "a-dev"
$ hg rebase --collapse -m "a-default-dev" -d 1
rebasing 2:b8d8db2b242d "a-dev" (tip)
merging a
warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
[1]
$ rm a.orig
$ hg resolve --mark a
(no more unresolved files)
continue: hg rebase --continue
$ hg rebase --continue
rebasing 2:b8d8db2b242d "a-dev" (tip)
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/collapse_remember_message/.hg/strip-backup/b8d8db2b242d-f474c19a-rebase.hg
liscju
rebase: adds storing collapse message (issue4792)...
r28185 $ hg log
Kostia Balytskyi
conflicts: make spacing consistent in conflict markers...
r30460 changeset: 2:45ba1d1a8665
liscju
rebase: adds storing collapse message (issue4792)...
r28185 tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: a-default-dev
changeset: 1:3c8db56a44bc
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: a-default
changeset: 0:3903775176ed
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: a
$ cd ..