annotate tests/test-topic-push.t @ 2982:fef934b7ed86

topic: add a --topic option to "push" command This is symmetrical with --bookmark or --branch; it selects changesets in specified topic as revisions to push.
author Denis Laxalde <denis.laxalde@logilab.fr>
date Fri, 22 Sep 2017 13:43:38 +0200
parents 06844693bb21
children c0de0010ec30
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2045
db617700d318 tests: move "test setup" script into a 'testlib' directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2018
diff changeset
1 $ . "$TESTDIR/testlib/topic_setup.sh"
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
2
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
3 $ cat << EOF >> $HGRCPATH
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
4 > [ui]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
5 > logtemplate = {rev} {branch} {get(namespaces, "topics")} {phase} {desc|firstline}\n
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
6 > ssh =python "$RUNTESTDIR/dummyssh"
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
7 > EOF
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
8
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
9 $ hg init main
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
10 $ hg init draft
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
11 $ cat << EOF >> draft/.hg/hgrc
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
12 > [phases]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
13 > publish=False
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
14 > EOF
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
15 $ hg clone main client
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
16 updating to branch default
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
17 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
18 $ cat << EOF >> client/.hg/hgrc
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
19 > [paths]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
20 > draft=../draft
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
21 > EOF
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
22
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
23
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
24 Testing core behavior to make sure we did not break anything
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
25 ============================================================
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
26
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
27 Pushing a first changeset
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
28
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
29 $ cd client
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
30 $ echo aaa > aaa
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
31 $ hg add aaa
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
32 $ hg commit -m 'CA'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
33 $ hg outgoing -G
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
34 comparing with $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
35 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
36 @ 0 default draft CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
37
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
38 $ hg push
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
39 pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
40 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
41 adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
42 adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
43 adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
44 added 1 changesets with 1 changes to 1 files
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
45
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
46 Pushing two heads
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
47
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
48 $ echo aaa > bbb
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
49 $ hg add bbb
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
50 $ hg commit -m 'CB'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
51 $ echo aaa > ccc
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
52 $ hg up 'desc(CA)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
53 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
54 $ hg add ccc
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
55 $ hg commit -m 'CC'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
56 created new head
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
57 $ hg outgoing -G
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
58 comparing with $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
59 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
60 @ 2 default draft CC
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
61
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
62 o 1 default draft CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
63
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
64 $ hg push
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
65 pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
66 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
67 abort: push creates new remote head 9fe81b7f425d!
2018
de3304f76fa6 test: adapt to change in mercurial output
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
68 (merge or see 'hg help push' for details about pushing new heads)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
69 [255]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
70 $ hg outgoing -r 'desc(CB)' -G
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
71 comparing with $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
72 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
73 o 1 default draft CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
74
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
75 $ hg push -r 'desc(CB)'
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
76 pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
77 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
78 adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
79 adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
80 adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
81 added 1 changesets with 1 changes to 1 files
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
82
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
83 Pushing a new branch
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
84
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
85 $ hg branch mountain
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
86 marked working directory as branch mountain
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
87 (branches are permanent and global, did you want a bookmark?)
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
88 $ hg commit --amend
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
89 $ hg outgoing -G
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
90 comparing with $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
91 searching for changes
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
92 @ 3 mountain draft CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
93
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
94 $ hg push
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
95 pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
96 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
97 abort: push creates new remote branches: mountain!
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
98 (use 'hg push --new-branch' to create new remote branches)
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
99 [255]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
100 $ hg push --new-branch
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
101 pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
102 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
103 adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
104 adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
105 adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
106 added 1 changesets with 1 changes to 1 files (+1 heads)
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
107 1 new obsolescence markers
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
108
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
109 Including on non-publishing
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
110
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
111 $ hg push --new-branch draft
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
112 pushing to $TESTTMP/draft (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
113 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
114 adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
115 adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
116 adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
117 added 3 changesets with 3 changes to 3 files (+1 heads)
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
118 1 new obsolescence markers
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
119
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
120 Testing topic behavior
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
121 ======================
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
122
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
123 Local peer tests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
124 ----------------
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
125
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
126 $ hg up -r 'desc(CA)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
127 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
128 $ hg topic babar
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
129 $ echo aaa > ddd
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
130 $ hg add ddd
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
131 $ hg commit -m 'CD'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
132 $ hg log -G # keep track of phase because I saw some strange bug during developement
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
133 @ 4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
134 |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
135 | o 3 mountain public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
136 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
137 | o 1 default public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
138 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
139 o 0 default public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
140
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
141
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
142 Pushing a new topic to a non publishing server should not be seen as a new head
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
143
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
144 $ hg push draft
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
145 pushing to $TESTTMP/draft (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
146 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
147 adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
148 adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
149 adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
150 added 1 changesets with 1 changes to 1 files (+1 heads)
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
151 $ hg log -G
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
152 @ 4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
153 |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
154 | o 3 mountain public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
155 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
156 | o 1 default public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
157 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
158 o 0 default public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
159
2982
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
160 push --topic
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
161
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
162 $ hg log -G -R $TESTTMP/draft
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
163 o 3 default babar draft CD
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
164 |
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
165 | o 2 mountain public CC
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
166 |/
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
167 | o 1 default public CB
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
168 |/
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
169 o 0 default public CA
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
170
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
171 $ echo bbb >> aaa
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
172 $ hg commit -m "C'A"
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
173 $ hg up 1
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
174 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
175 $ hg topic --clear
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
176 $ echo bbb >> bbb
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
177 $ hg commit -m "C'B"
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
178 $ hg log -G
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
179 @ 6 default draft C'B
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
180 |
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
181 | o 5 default babar draft C'A
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
182 | |
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
183 | o 4 default babar draft CD
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
184 | |
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
185 | | o 3 mountain public CC
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
186 | |/
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
187 o | 1 default public CB
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
188 |/
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
189 o 0 default public CA
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
190
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
191 $ hg push draft --topic babar
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
192 pushing to $TESTTMP/draft
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
193 searching for changes
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
194 adding changesets
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
195 adding manifests
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
196 adding file changes
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
197 added 1 changesets with 1 changes to 1 files
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
198 $ hg log -G -R $TESTTMP/draft
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
199 o 4 default babar draft C'A
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
200 |
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
201 o 3 default babar draft CD
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
202 |
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
203 | o 2 mountain public CC
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
204 |/
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
205 | o 1 default public CB
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
206 |/
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
207 o 0 default public CA
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
208
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
209 $ hg strip --config extensions.strip= --no-backup -r 5: --quiet
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
210 $ hg strip --config extensions.strip= -R $TESTTMP/draft --no-backup -r 4: --quiet
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
211
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
212 Pushing a new topic to a publishing server should be seen as a new head
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
213
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
214 $ hg push
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
215 pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
216 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
217 abort: push creates new remote head 67f579af159d!
2018
de3304f76fa6 test: adapt to change in mercurial output
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
218 (merge or see 'hg help push' for details about pushing new heads)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
219 [255]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
220 $ hg log -G
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
221 @ 4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
222 |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
223 | o 3 mountain public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
224 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
225 | o 1 default public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
226 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
227 o 0 default public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
228
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
229
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
230 wireprotocol tests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
231 ------------------
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
232
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
233 $ hg up -r 'desc(CA)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
234 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
235 $ hg topic celeste
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
236 $ echo aaa > eee
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
237 $ hg add eee
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
238 $ hg commit -m 'CE'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
239 $ hg log -G # keep track of phase because I saw some strange bug during developement
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
240 @ 5 default celeste draft CE
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
241 |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
242 | o 4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
243 |/
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
244 | o 3 mountain public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
245 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
246 | o 1 default public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
247 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
248 o 0 default public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
249
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
250
1903
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
251 Pushing a new topic to a non publishing server without topic -> new head
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
252
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
253 $ cat << EOF >> ../draft/.hg/hgrc
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
254 > [extensions]
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
255 > topic=!
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
256 > EOF
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
257 $ hg push ssh://user@dummy/draft
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
258 pushing to ssh://user@dummy/draft
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
259 searching for changes
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
260 abort: push creates new remote head 84eaf32db6c3!
2018
de3304f76fa6 test: adapt to change in mercurial output
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
261 (merge or see 'hg help push' for details about pushing new heads)
1903
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
262 [255]
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
263 $ hg log -G
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
264 @ 5 default celeste draft CE
1903
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
265 |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
266 | o 4 default babar draft CD
1903
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
267 |/
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
268 | o 3 mountain public CC
1903
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
269 |/
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
270 | o 1 default public CB
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
271 |/
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
272 o 0 default public CA
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
273
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
274
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
275 Pushing a new topic to a non publishing server should not be seen as a new head
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
276
1903
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
277 $ printf "topic=" >> ../draft/.hg/hgrc
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
278 $ hg config extensions.topic >> ../draft/.hg/hgrc
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
279 $ hg push ssh://user@dummy/draft
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
280 pushing to ssh://user@dummy/draft
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
281 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
282 remote: adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
283 remote: adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
284 remote: adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
285 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
286 $ hg log -G
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
287 @ 5 default celeste draft CE
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
288 |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
289 | o 4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
290 |/
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
291 | o 3 mountain public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
292 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
293 | o 1 default public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
294 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
295 o 0 default public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
296
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
297
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
298 Pushing a new topic to a publishing server should be seen as a new head
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
299
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
300 $ hg push ssh://user@dummy/main
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
301 pushing to ssh://user@dummy/main
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
302 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
303 abort: push creates new remote head 67f579af159d!
2018
de3304f76fa6 test: adapt to change in mercurial output
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
304 (merge or see 'hg help push' for details about pushing new heads)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
305 [255]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
306 $ hg log -G
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
307 @ 5 default celeste draft CE
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
308 |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
309 | o 4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
310 |/
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
311 | o 3 mountain public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
312 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
313 | o 1 default public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
314 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
315 o 0 default public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
316
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
317
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
318 Check that we reject multiple head on the same topic
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
319 ----------------------------------------------------
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
320
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
321 $ hg up 'desc(CB)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
322 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
323 $ hg topic babar
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
324 $ echo aaa > fff
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
325 $ hg add fff
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
326 $ hg commit -m 'CF'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
327 $ hg log -G
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
328 @ 6 default babar draft CF
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
329 |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
330 | o 5 default celeste draft CE
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
331 | |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
332 | | o 4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
333 | |/
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
334 | | o 3 mountain public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
335 | |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
336 o | 1 default public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
337 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
338 o 0 default public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
339
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
340
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
341 $ hg push draft
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
342 pushing to $TESTTMP/draft (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
343 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
344 abort: push creates new remote head f0bc62a661be on branch 'default:babar'!
2018
de3304f76fa6 test: adapt to change in mercurial output
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
345 (merge or see 'hg help push' for details about pushing new heads)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
346 [255]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
347
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
348 Multiple head on a branch merged in a topic changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
349 ------------------------------------------------------------------------
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
350
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
351
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
352 $ hg up 'desc(CA)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
353 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
354 $ echo aaa > ggg
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
355 $ hg add ggg
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
356 $ hg commit -m 'CG'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
357 created new head
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
358 $ hg up 'desc(CF)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
359 switching to topic babar
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
360 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
361 $ hg merge 'desc(CG)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
362 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
363 (branch merge, don't forget to commit)
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
364 $ hg commit -m 'CM'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
365 $ hg log -G
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
366 @ 8 default babar draft CM
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
367 |\
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
368 | o 7 default draft CG
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
369 | |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
370 o | 6 default babar draft CF
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
371 | |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
372 | | o 5 default celeste draft CE
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
373 | |/
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
374 | | o 4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
375 | |/
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2671
diff changeset
376 | | o 3 mountain public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
377 | |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
378 o | 1 default public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
379 |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
380 o 0 default public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
381
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
382
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
383 Reject when pushing to draft
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
384
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
385 $ hg push draft -r .
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
386 pushing to $TESTTMP/draft (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
387 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
388 abort: push creates new remote head 4937c4cad39e!
2018
de3304f76fa6 test: adapt to change in mercurial output
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
389 (merge or see 'hg help push' for details about pushing new heads)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
390 [255]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
391
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
392
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
393 Reject when pushing to publishing
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
394
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
395 $ hg push -r .
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
396 pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
397 searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
398 adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
399 adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
400 adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
401 added 3 changesets with 2 changes to 2 files
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
402
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
403 $ cd ..
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
404
1887
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
405 Test phase move
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
406 ==================================
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
407
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
408 setup, two repo knowns about two small topic branch
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
409
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
410 $ hg init repoA
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
411 $ hg clone repoA repoB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
412 updating to branch default
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
413 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
414 $ cat << EOF >> repoA/.hg/hgrc
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
415 > [phases]
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
416 > publish=False
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
417 > EOF
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
418 $ cat << EOF >> repoB/.hg/hgrc
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
419 > [phases]
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
420 > publish=False
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
421 > EOF
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
422 $ cd repoA
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
423 $ echo aaa > base
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
424 $ hg add base
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
425 $ hg commit -m 'CBASE'
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
426 $ echo aaa > aaa
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
427 $ hg add aaa
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
428 $ hg topic topicA
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
429 $ hg commit -m 'CA'
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
430 $ hg up 'desc(CBASE)'
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
431 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
432 $ echo aaa > bbb
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
433 $ hg add bbb
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
434 $ hg topic topicB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
435 $ hg commit -m 'CB'
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
436 $ cd ..
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
437 $ hg push -R repoA repoB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
438 pushing to repoB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
439 searching for changes
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
440 adding changesets
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
441 adding manifests
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
442 adding file changes
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
443 added 3 changesets with 3 changes to 3 files (+1 heads)
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
444 $ hg log -G -R repoA
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
445 @ 2 default topicB draft CB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
446 |
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
447 | o 1 default topicA draft CA
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
448 |/
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
449 o 0 default draft CBASE
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
450
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
451
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
452 We turn different topic to public on each side,
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
453
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
454 $ hg -R repoA phase --public topicA
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
455 $ hg -R repoB phase --public topicB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
456
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
457 Pushing should complain because it create to heads on default
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
458
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
459 $ hg push -R repoA repoB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
460 pushing to repoB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
461 searching for changes
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
462 no changes found
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
463 abort: push create a new head on branch "default"
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
464 [255]