##// END OF EJS Templates
sshpeer: initial definition and implementation of new SSH protocol...
sshpeer: initial definition and implementation of new SSH protocol The existing SSH protocol has several design flaws. Future commits will elaborate on these flaws as new features are introduced to combat these flaws. For now, hopefully you can take me for my word that a ground up rewrite of the SSH protocol is needed. This commit lays the foundation for a new SSH protocol by defining a mechanism to upgrade the SSH transport channel away from the default (version 1) protocol to something modern (which we'll call "version 2" for now). This upgrade process is detailed in the internals documentation for the wire protocol. The gist of it is the client sends a request line preceding the "hello" command/line which basically says "I'm requesting an upgrade: here's what I support." If the server recognizes that line, it processes the upgrade request and the transport channel is switched to use the new version of the protocol. If not, it sends an empty response, which is how all Mercurial SSH servers from the beginning of time reacted to unknown commands. The upgrade request is effectively ignored and the client continues to use the existing version of the protocol as if nothing happened. The new version of the SSH protocol is completely identical to version 1 aside from the upgrade dance and the bytes that follow. The immediate bytes that follow the protocol switch are defined to be a length framed "capabilities: " line containing the remote's advertised capabilities. In reality, this looks very similar to what the "hello" response would look like. But it will evolve quickly. The methodology by which the protocol will evolve is important. I'm not going to introduce the new protocol all at once. That would likely lead to endless bike shedding and forward progress would stall. Instead, I intend to tricle out new features and diversions from the existing protocol in small, incremental changes. To support the gradual evolution of the protocol, the on-the-wire advertised protocol name contains an "exp" to denote "experimental" and a 4 digit field to capture the sub-version of the protocol. Whenever we make a BC change to the wire protocol, we can increment this version and lock out all older clients because it will appear as a completely different protocol version. This means we can incur as many breaking changes as we want. We don't have to commit to supporting any one feature or idea for a long period of time. We can even evolve the handshake mechanism, because that is defined as being an implementation detail of the negotiated protocol version! Hopefully this lowers the barrier to accepting changes to the protocol and for experimenting with "radical" ideas during its development. In core, sshpeer received most of the attention. We haven't even implemented the server bits for the new protocol in core yet. Instead, we add very primitive support to our test server, mainly just to exercise the added code paths in sshpeer. Differential Revision: https://phab.mercurial-scm.org/D2061 # no-check-commit because of required foo_bar naming

File last commit:

r35386:469b06b4 default
r35994:48a3a928 default
Show More
test-rebase-newancestor.t
426 lines | 10.5 KiB | text/troff | Tads3Lexer
/ tests / test-rebase-newancestor.t
Adrian Buehlmann
tests: unify test-rebase*
r12608 $ cat >> $HGRCPATH <<EOF
Pierre-Yves David
test: use generaldelta in 'test-rebase-newancestors.t'...
r26928 > [format]
> usegeneraldelta=yes
Adrian Buehlmann
tests: unify test-rebase*
r12608 > [extensions]
> rebase=
Jun Wu
rebase: rewrite core algorithm (issue5578) (issue5630)...
r33783 > drawdag=$TESTDIR/drawdag.py
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"
Adrian Buehlmann
tests: unify test-rebase*
r12608 > EOF
$ hg init repo
$ cd repo
$ echo A > a
$ echo >> a
$ hg ci -Am A
adding a
$ echo B > a
$ echo >> a
$ hg ci -m B
$ echo C > a
$ echo >> a
$ hg ci -m C
$ hg up -q -C 0
$ echo D >> a
$ hg ci -Am AD
created new head
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 3: 3878212183bd 'AD'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 2: 30ae917c0e4f 'C'
Adrian Buehlmann
tests: unify test-rebase*
r12608 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 0f4f7cb4f549 'B'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 1e635d440a73 'A'
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg rebase -s 1 -d 3
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 1:0f4f7cb4f549 "B"
Adrian Buehlmann
tests: unify test-rebase*
r12608 merging a
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 2:30ae917c0e4f "C"
Adrian Buehlmann
tests: unify test-rebase*
r12608 merging a
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0f4f7cb4f549-82b3b163-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 3: 25773bc4b4b0 'C'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 2: c09015405f75 'B'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 1: 3878212183bd 'AD'
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 1e635d440a73 'A'
Adrian Buehlmann
tests: unify test-rebase*
r12608
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913
$ cd ..
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406
Test rebasing of merges with ancestors of the rebase destination - a situation
that often happens when trying to recover from repeated merging with a mainline
branch.
The test case creates a dev branch that contains a couple of merges from the
default branch. When rebasing to the default branch, these merges would be
merges with ancestors on the same branch. The merges _could_ contain some
interesting conflict resolutions or additional changes in the merge commit, but
that is mixed up with the actual merge stuff and there is in general no way to
separate them.
Note: The dev branch contains _no_ changes to f-default. It might be unclear
how rebasing of ancestor merges should be handled, but the current behavior
with spurious prompts for conflicts in files that didn't change seems very
wrong.
$ hg init ancestor-merge
$ cd ancestor-merge
$ touch f-default
$ hg ci -Aqm 'default: create f-default'
$ hg branch -q dev
$ hg ci -qm 'dev: create branch'
$ echo stuff > f-dev
$ hg ci -Aqm 'dev: f-dev stuff'
$ hg up -q default
$ echo stuff > f-default
$ hg ci -m 'default: f-default stuff'
$ hg up -q dev
$ hg merge -q default
$ hg ci -m 'dev: merge default'
$ hg up -q default
$ hg rm f-default
$ hg ci -m 'default: remove f-default'
$ hg up -q dev
$ hg merge -q default
$ hg ci -m 'dev: merge default'
$ hg up -q default
$ echo stuff > f-other
$ hg ci -Aqm 'default: f-other stuff'
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 7: e08089805d82 'default: f-other stuff'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 6: 9455ee510502 'dev: merge default' dev
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |/|
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o | 5: 462860db70a1 'default: remove f-default'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 4: 4b019212aaf6 'dev: merge default' dev
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |/|
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o | 3: f157ecfd2b6b 'default: f-default stuff'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 2: ec2c14fb2984 'dev: f-dev stuff' dev
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 1d1a643d390e 'dev: create branch' dev
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: e90e8eb90b6f 'default: create f-default'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406
$ hg clone -qU . ../ancestor-merge-2
Full rebase all the way back from branching point:
Siddharth Agarwal
tests: explicitly request changed version in test-rebase-newancestor.t...
r27598 $ hg rebase -r 'only(dev,default)' -d default --config ui.interactive=True << EOF
> c
> EOF
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 1:1d1a643d390e "dev: create branch"
Mads Kiilerich
rebase: show warning when rebase creates no changes to commit...
r23518 note: rebase of 1:1d1a643d390e created no changes to commit
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 2:ec2c14fb2984 "dev: f-dev stuff"
rebasing 4:4b019212aaf6 "dev: merge default"
Simon Farnsworth
merge: always use other, not remote, in user prompts...
r29775 other [source] changed f-default which local [dest] deleted
Siddharth Agarwal
filemerge: add a 'leave unresolved' option to change/delete prompts...
r27163 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 6:9455ee510502 "dev: merge default"
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/ancestor-merge/.hg/strip-backup/1d1a643d390e-43e9e04b-rebase.hg
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 $ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 6: fbc098e72227 'dev: merge default'
Matt Mackall
merge with stable
r23426 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 5: eda7b7f46f5d 'dev: merge default'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 4: 3e075b1c0a40 'dev: f-dev stuff'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 3: e08089805d82 'default: f-other stuff'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 2: 462860db70a1 'default: remove f-default'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 1: f157ecfd2b6b 'default: f-default stuff'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: e90e8eb90b6f 'default: create f-default'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406
Grafty cherry picking rebasing:
$ cd ../ancestor-merge-2
$ hg phase -fdr0:
Siddharth Agarwal
tests: explicitly request changed version in test-rebase-newancestor.t...
r27598 $ hg rebase -r 'children(only(dev,default))' -d default --config ui.interactive=True << EOF
> c
> EOF
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 2:ec2c14fb2984 "dev: f-dev stuff"
rebasing 4:4b019212aaf6 "dev: merge default"
Simon Farnsworth
merge: always use other, not remote, in user prompts...
r29775 other [source] changed f-default which local [dest] deleted
Siddharth Agarwal
filemerge: add a 'leave unresolved' option to change/delete prompts...
r27163 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 6:9455ee510502 "dev: merge default"
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/ancestor-merge-2/.hg/strip-backup/ec2c14fb2984-62d0b222-rebase.hg
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 $ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 7: fbc098e72227 'dev: merge default'
Matt Mackall
merge with stable
r23426 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 6: eda7b7f46f5d 'dev: merge default'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 5: 3e075b1c0a40 'dev: f-dev stuff'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 4: e08089805d82 'default: f-other stuff'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 3: 462860db70a1 'default: remove f-default'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 2: f157ecfd2b6b 'default: f-default stuff'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 1: 1d1a643d390e 'dev: create branch' dev
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: e90e8eb90b6f 'default: create f-default'
Mads Kiilerich
tests: add test for rebasing merges with ancestors of the rebase destination...
r23406
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407 $ cd ..
Test order of parents of rebased merged with un-rebased changes as p1.
$ hg init parentorder
$ cd parentorder
$ touch f
$ hg ci -Aqm common
$ touch change
$ hg ci -Aqm change
$ touch target
$ hg ci -Aqm target
$ hg up -qr 0
$ touch outside
$ hg ci -Aqm outside
$ hg merge -qr 1
$ hg ci -m 'merge p1 3=outside p2 1=ancestor'
$ hg par
changeset: 4:6990226659be
tag: tip
parent: 3:f59da8fc0fcf
parent: 1:dd40c13f7a6f
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: merge p1 3=outside p2 1=ancestor
$ hg up -qr 1
$ hg merge -qr 3
$ hg ci -qm 'merge p1 1=ancestor p2 3=outside'
$ hg par
changeset: 5:a57575f79074
tag: tip
parent: 1:dd40c13f7a6f
parent: 3:f59da8fc0fcf
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: merge p1 1=ancestor p2 3=outside
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 5: a57575f79074 'merge p1 1=ancestor p2 3=outside'
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407 |\
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 +---o 4: 6990226659be 'merge p1 3=outside p2 1=ancestor'
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407 | |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 3: f59da8fc0fcf 'outside'
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 +---o 2: a60552eb93fb 'target'
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o | 1: dd40c13f7a6f 'change'
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 02f0f58d5300 'common'
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407
$ hg rebase -r 4 -d 2
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 4:6990226659be "merge p1 3=outside p2 1=ancestor"
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/6990226659be-4d67a0d3-rebase.hg
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407 $ hg tip
changeset: 5:cca50676b1c5
tag: tip
parent: 2:a60552eb93fb
parent: 3:f59da8fc0fcf
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: merge p1 3=outside p2 1=ancestor
$ hg rebase -r 4 -d 2
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 4:a57575f79074 "merge p1 1=ancestor p2 3=outside"
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/a57575f79074-385426e5-rebase.hg
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407 $ hg tip
changeset: 5:f9daf77ffe76
tag: tip
parent: 2:a60552eb93fb
parent: 3:f59da8fc0fcf
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: merge p1 1=ancestor p2 3=outside
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 5: f9daf77ffe76 'merge p1 1=ancestor p2 3=outside'
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407 |\
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 +---o 4: cca50676b1c5 'merge p1 3=outside p2 1=ancestor'
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407 | |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 3: f59da8fc0fcf 'outside'
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o | 2: a60552eb93fb 'target'
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o | 1: dd40c13f7a6f 'change'
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 02f0f58d5300 'common'
Mads Kiilerich
tests: test coverage of parent order with p1 outside rebase set
r23407
Mads Kiilerich
tests: test rebase of merge of target ancestors
r23408 rebase of merge of ancestors
$ hg up -qr 2
$ hg merge -qr 3
$ echo 'other change while merging future "rebase ancestors"' > other
$ hg ci -Aqm 'merge rebase ancestors'
$ hg rebase -d 5 -v
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 6:4c5f12f25ebe "merge rebase ancestors" (tip)
Mads Kiilerich
tests: test rebase of merge of target ancestors
r23408 resolving manifests
removing other
note: merging f9daf77ffe76+ and 4c5f12f25ebe using bids from ancestors a60552eb93fb and f59da8fc0fcf
calculating bids for ancestor a60552eb93fb
resolving manifests
calculating bids for ancestor f59da8fc0fcf
resolving manifests
auction for merging merge bids
other: consensus for g
end of auction
getting other
Mads Kiilerich
localrepo: show headline notes in commitctx before showing filenames...
r23749 committing files:
Mads Kiilerich
tests: test rebase of merge of target ancestors
r23408 other
Mads Kiilerich
localrepo: show headline notes in commitctx before showing filenames...
r23749 committing manifest
committing changelog
Mads Kiilerich
tests: test rebase of merge of target ancestors
r23408 rebase merging completed
1 changesets found
Mads Kiilerich
bundle: when verbose, show what takes up the space in the generated bundle...
r23748 uncompressed size of bundle content:
Pierre-Yves David
changegroup: skip delta when the underlying revlog do not use them...
r30211 199 (changelog)
Pierre-Yves David
test: use generaldelta in 'test-rebase-newancestors.t'...
r26928 216 (manifests)
182 other
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/4c5f12f25ebe-f46990e5-rebase.hg
Mads Kiilerich
tests: test rebase of merge of target ancestors
r23408 1 changesets found
Mads Kiilerich
bundle: when verbose, show what takes up the space in the generated bundle...
r23748 uncompressed size of bundle content:
Pierre-Yves David
changegroup: skip delta when the underlying revlog do not use them...
r30211 254 (changelog)
Pierre-Yves David
test: use generaldelta in 'test-rebase-newancestors.t'...
r26928 167 (manifests)
182 other
Mads Kiilerich
tests: test rebase of merge of target ancestors
r23408 adding branch
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
rebase completed
$ hg tglog
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 @ 6: 113755df812b 'merge rebase ancestors'
Mads Kiilerich
tests: test rebase of merge of target ancestors
r23408 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 5: f9daf77ffe76 'merge p1 1=ancestor p2 3=outside'
Mads Kiilerich
tests: test rebase of merge of target ancestors
r23408 |\
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 +---o 4: cca50676b1c5 'merge p1 3=outside p2 1=ancestor'
Mads Kiilerich
tests: test rebase of merge of target ancestors
r23408 | |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 3: f59da8fc0fcf 'outside'
Mads Kiilerich
tests: test rebase of merge of target ancestors
r23408 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o | 2: a60552eb93fb 'target'
Mads Kiilerich
tests: test rebase of merge of target ancestors
r23408 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o | 1: dd40c13f7a6f 'change'
Mads Kiilerich
tests: test rebase of merge of target ancestors
r23408 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 02f0f58d5300 'common'
Mads Kiilerich
tests: test rebase of merge of target ancestors
r23408
Jun Wu
rebase: rewrite core algorithm (issue5578) (issue5630)...
r33783 Due to the limitation of 3-way merge algorithm (1 merge base), rebasing a merge
may include unwanted content:
$ hg init $TESTTMP/dual-merge-base1
$ cd $TESTTMP/dual-merge-base1
$ hg debugdrawdag <<'EOS'
> F
> /|
> D E
> | |
> B C
> |/
> A Z
> |/
> R
> EOS
$ hg rebase -r D+E+F -d Z
rebasing 5:5f2c926dfecf "D" (D)
rebasing 6:b296604d9846 "E" (E)
rebasing 7:caa9781e507d "F" (F tip)
Jun Wu
rebase: choose merge base without unwanted revisions...
r33863 abort: rebasing 7:caa9781e507d will include unwanted changes from 4:d6003a550c2c or 3:c1e6b162678d
[255]
Jun Wu
rebase: rewrite core algorithm (issue5578) (issue5630)...
r33783
The warning does not get printed if there is no unwanted change detected:
$ hg init $TESTTMP/dual-merge-base2
$ cd $TESTTMP/dual-merge-base2
$ hg debugdrawdag <<'EOS'
> D
> /|
> B C
> |/
> A Z
> |/
> R
> EOS
$ hg rebase -r B+C+D -d Z
rebasing 3:c1e6b162678d "B" (B)
rebasing 4:d6003a550c2c "C" (C)
rebasing 5:c8f78076273e "D" (D tip)
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/dual-merge-base2/.hg/strip-backup/d6003a550c2c-6f1424b6-rebase.hg
Jun Wu
rebase: rewrite core algorithm (issue5578) (issue5630)...
r33783 $ hg manifest -r 'desc(D)'
B
C
R
Z
The merge base could be different from old p1 (changed parent becomes new p1):
$ hg init $TESTTMP/chosen-merge-base1
$ cd $TESTTMP/chosen-merge-base1
$ hg debugdrawdag <<'EOS'
> F
> /|
> D E
> | |
> B C Z
> EOS
$ hg rebase -r D+F -d Z
rebasing 3:004dc1679908 "D" (D)
rebasing 5:4be4cbf6f206 "F" (F tip)
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/chosen-merge-base1/.hg/strip-backup/004dc1679908-06a66a3c-rebase.hg
Jun Wu
rebase: rewrite core algorithm (issue5578) (issue5630)...
r33783 $ hg manifest -r 'desc(F)'
C
D
E
Z
$ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n'
D
$ hg init $TESTTMP/chosen-merge-base2
$ cd $TESTTMP/chosen-merge-base2
$ hg debugdrawdag <<'EOS'
> F
> /|
> D E
> | |
> B C Z
> EOS
$ hg rebase -r E+F -d Z
rebasing 4:974e4943c210 "E" (E)
rebasing 5:4be4cbf6f206 "F" (F tip)
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/chosen-merge-base2/.hg/strip-backup/974e4943c210-b2874da5-rebase.hg
Jun Wu
rebase: rewrite core algorithm (issue5578) (issue5630)...
r33783 $ hg manifest -r 'desc(F)'
B
D
E
Z
$ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n'
E