##// END OF EJS Templates
httppeer: expose API descriptor on httpv2peer...
httppeer: expose API descriptor on httpv2peer The API descriptor in wireprotov2 is much more expressive than space-delimited tokens and it will be difficult to define methods to query it in all of the ways we'll want to query it. So let's just declare defeat and expose the API descriptor on the peer instance. As part of this, we define a new interface for version 2 peers, fulfilling a TODO in the process. Differential Revision: https://phab.mercurial-scm.org/D4974

File last commit:

r38268:d0abd794 @34 default
r40207:dac438b7 default
Show More
test-pull-branch.t
227 lines | 5.6 KiB | text/troff | Tads3Lexer
/ tests / test-pull-branch.t
Adrian Buehlmann
combine tests
r12279 $ hg init t
$ cd t
$ echo 1 > foo
$ hg ci -Am1 # 0
adding foo
$ hg branch branchA
marked working directory as branch branchA
Matt Mackall
branch: warn on branching
r15615 (branches are permanent and global, did you want a bookmark?)
Adrian Buehlmann
combine tests
r12279 $ echo a1 > foo
$ hg ci -ma1 # 1
$ cd ..
$ hg init tt
$ cd tt
$ hg pull ../t
pulling from ../t
requesting all changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 1 files
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets 495a0ec48aaf:50e089d141b7
Adrian Buehlmann
combine tests
r12279 (run 'hg update' to get a working copy)
$ hg up branchA
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd ../t
$ echo a2 > foo
$ hg ci -ma2 # 2
Create branch B:
$ hg up 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch branchB
marked working directory as branch branchB
$ echo b1 > foo
$ hg ci -mb1 # 3
$ cd ../tt
A new branch is there
$ hg pull -u ../t
pulling from ../t
searching for changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 1 files (+1 heads)
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets 9f878dea0b96:5be59ce5067b
Adrian Buehlmann
combine tests
r12279 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Develop both branches:
$ cd ../t
$ hg up branchA
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo a3 > foo
$ hg ci -ma3 # 4
$ hg up branchB
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo b2 > foo
$ hg ci -mb2 # 5
$ cd ../tt
Should succeed, no new heads:
$ hg pull -u ../t
pulling from ../t
searching for changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 1 files
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets 7c8fe7e20c32:453e93fa00a5
Adrian Buehlmann
combine tests
r12279 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Add a head on other branch:
$ cd ../t
$ hg up branchA
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo a4 > foo
$ hg ci -ma4 # 6
$ hg up branchB
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo b3.1 > foo
$ hg ci -m b3.1 # 7
$ hg up 5
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo b3.2 > foo
$ hg ci -m b3.2 # 8
created new head
$ cd ../tt
Should succeed because there is only one head on our branch:
$ hg pull -u ../t
pulling from ../t
searching for changes
adding changesets
adding manifests
adding file changes
added 3 changesets with 3 changes to 1 files (+1 heads)
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets da3a8a0161c6:b61cab8fe4e8
Adrian Buehlmann
combine tests
r12279 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd ../t
$ hg up -C branchA
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo a5.1 > foo
$ hg ci -ma5.1 # 9
$ hg up 6
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo a5.2 > foo
$ hg ci -ma5.2 # 10
created new head
$ hg up 7
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo b4.1 > foo
$ hg ci -m b4.1 # 11
$ hg up -C 8
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo b4.2 > foo
$ hg ci -m b4.2 # 12
$ cd ../tt
$ hg pull -u ../t
pulling from ../t
searching for changes
adding changesets
adding manifests
adding file changes
added 4 changesets with 4 changes to 1 files (+1 heads)
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets 0c4d148ae29e:ecfc3f4a6fd9
Brendan Cully
Make pull -u behave like pull && update...
r14485 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Pulkit Goyal
update: show the commit to which we updated in case of multiple heads (BC)...
r32698 updated to "d740e1a584e7: a5.2"
Pierre-Yves David
update: warn about other topological head in pull and unbundle...
r28030 1 other heads for branch "branchA"
Adrian Buehlmann
combine tests
r12279
Kevin Berridge
pull: don't suggest running hg merge when new heads are on different branches...
r13803 Make changes on new branch on tt
Brendan Cully
Make pull -u behave like pull && update...
r14485 $ hg up 6
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Kevin Berridge
pull: don't suggest running hg merge when new heads are on different branches...
r13803 $ hg branch branchC
marked working directory as branch branchC
Mads Kiilerich
check-code: fix check for trailing whitespace on sh command lines...
r17345 $ echo b1 > bar
Kevin Berridge
pull: new output message when there are multiple branches...
r13804 $ hg ci -Am "commit on branchC on tt"
Kevin Berridge
pull: don't suggest running hg merge when new heads are on different branches...
r13803 adding bar
Make changes on default branch on t
$ cd ../t
$ hg up -C default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Mads Kiilerich
check-code: fix check for trailing whitespace on sh command lines...
r17345 $ echo a1 > bar
Kevin Berridge
pull: new output message when there are multiple branches...
r13804 $ hg ci -Am "commit on default on t"
Kevin Berridge
pull: don't suggest running hg merge when new heads are on different branches...
r13803 adding bar
Pull branchC from tt
$ hg pull ../tt
pulling from ../tt
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets 7d8ffa4c0b22
Boris Feld
phases: use "published" in the phase movement message...
r38268 13 local changesets published
Kevin Berridge
pull: don't suggest running hg merge when new heads are on different branches...
r13803 (run 'hg heads' to see heads)
Kevin Berridge
pull: new output message when there are multiple branches...
r13804
Make changes on default and branchC on tt
$ cd ../tt
$ hg pull ../t
pulling from ../t
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets 2b94b54b6b5f
Boris Feld
phases: use "published" in the phase movement message...
r38268 1 local changesets published
Kevin Berridge
pull: new output message when there are multiple branches...
r13804 (run 'hg heads' to see heads)
$ hg up -C default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo a1 > bar1
$ hg ci -Am "commit on default on tt"
adding bar1
$ hg up branchC
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo a1 > bar2
$ hg ci -Am "commit on branchC on tt"
adding bar2
Make changes on default and branchC on t
$ cd ../t
$ hg up default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo a1 > bar3
$ hg ci -Am "commit on default on t"
adding bar3
$ hg up branchC
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo a1 > bar4
$ hg ci -Am "commit on branchC on tt"
adding bar4
Pull from tt
$ hg pull ../tt
pulling from ../tt
searching for changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 2 files (+2 heads)
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets eed40c14b407:e634733b0309
Boris Feld
phases: use "published" in the phase movement message...
r38268 1 local changesets published
Kevin Berridge
pull: new output message when there are multiple branches...
r13804 (run 'hg heads .' to see heads, 'hg merge' to merge)
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913
$ cd ..