Mercurial > hg
annotate tests/test-push-warn.t @ 24127:4cb8002658d6
resolve: port to generic templater
Test output changes because color labels are applied separately.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 11 Feb 2015 13:59:13 +0900 |
parents | 4ab66de46a96 |
children | 8de8cd34f2e3 |
rev | line source |
---|---|
13956
ffb5c09ba822
tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents:
13550
diff
changeset
|
1 $ hg init a |
12279 | 2 $ cd a |
3 $ echo foo > t1 | |
4 $ hg add t1 | |
5 $ hg commit -m "1" | |
10875
a9702c47a19f
partial backout of 1e819576e926 and add tests (issue2131)
Sune Foldager <cryo@cyanite.org>
parents:
10771
diff
changeset
|
6 |
12279 | 7 $ cd .. |
8 $ hg clone a b | |
9 updating to branch default | |
10 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
11 | |
12 $ cd a | |
13 $ echo foo > t2 | |
14 $ hg add t2 | |
15 $ hg commit -m "2" | |
16 | |
17 $ cd ../b | |
18 $ echo foo > t3 | |
19 $ hg add t3 | |
20 $ hg commit -m "3" | |
816
8674b7803714
Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff
changeset
|
21 |
12279 | 22 $ hg push ../a |
23 pushing to ../a | |
24 searching for changes | |
20501
8a9e0b523d2d
discovery: improve "note: unsynced remote changes!" warning
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
25 remote has heads on branch 'default' that are not known locally: 1c9246a22a0a |
14525
826a13720fbc
prepush: print short hash of first new head in abort message
Adrian Buehlmann <adrian@cadifra.com>
parents:
14164
diff
changeset
|
26 abort: push creates new remote head 1e108cc5548c! |
19934
bfc6ed892349
push: hide description about "-f" in the hint to prevent from using it easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19840
diff
changeset
|
27 (pull and merge or see "hg help push" for details about pushing new heads) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
28 [255] |
816
8674b7803714
Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff
changeset
|
29 |
12998
91cb08a9e7fb
discovery: list new remote heads in prepush() on --debug
Adrian Buehlmann <adrian@cadifra.com>
parents:
12785
diff
changeset
|
30 $ hg push --debug ../a |
91cb08a9e7fb
discovery: list new remote heads in prepush() on --debug
Adrian Buehlmann <adrian@cadifra.com>
parents:
12785
diff
changeset
|
31 pushing to ../a |
14164
cb98fed52495
discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
14073
diff
changeset
|
32 query 1; heads |
12998
91cb08a9e7fb
discovery: list new remote heads in prepush() on --debug
Adrian Buehlmann <adrian@cadifra.com>
parents:
12785
diff
changeset
|
33 searching for changes |
14164
cb98fed52495
discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
14073
diff
changeset
|
34 taking quick initial sample |
cb98fed52495
discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
14073
diff
changeset
|
35 searching: 2 queries |
14624
f03c82d1f50a
setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
14526
diff
changeset
|
36 query 2; still undecided: 1, sample size is: 1 |
14164
cb98fed52495
discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
14073
diff
changeset
|
37 2 total queries |
22019
9fcf772f15ff
push: perform phases discovery before the push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21198
diff
changeset
|
38 listing keys for "phases" |
22239
0688010ee38f
push: move bookmark discovery with other discovery steps
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22019
diff
changeset
|
39 checking for updated bookmarks |
0688010ee38f
push: move bookmark discovery with other discovery steps
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22019
diff
changeset
|
40 listing keys for "bookmarks" |
17293
d3f84ccc5495
pushkey: add more verbose debug output regarding pushkey
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
16913
diff
changeset
|
41 listing keys for "bookmarks" |
20501
8a9e0b523d2d
discovery: improve "note: unsynced remote changes!" warning
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
42 remote has heads on branch 'default' that are not known locally: 1c9246a22a0a |
20051
b988b3b19303
discovery: make note messages for new heads more readable
Mads Kiilerich <madski@unity3d.com>
parents:
20050
diff
changeset
|
43 new remote heads on branch 'default': |
b988b3b19303
discovery: make note messages for new heads more readable
Mads Kiilerich <madski@unity3d.com>
parents:
20050
diff
changeset
|
44 1e108cc5548c |
14525
826a13720fbc
prepush: print short hash of first new head in abort message
Adrian Buehlmann <adrian@cadifra.com>
parents:
14164
diff
changeset
|
45 abort: push creates new remote head 1e108cc5548c! |
19934
bfc6ed892349
push: hide description about "-f" in the hint to prevent from using it easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19840
diff
changeset
|
46 (pull and merge or see "hg help push" for details about pushing new heads) |
12998
91cb08a9e7fb
discovery: list new remote heads in prepush() on --debug
Adrian Buehlmann <adrian@cadifra.com>
parents:
12785
diff
changeset
|
47 [255] |
91cb08a9e7fb
discovery: list new remote heads in prepush() on --debug
Adrian Buehlmann <adrian@cadifra.com>
parents:
12785
diff
changeset
|
48 |
12279 | 49 $ hg pull ../a |
50 pulling from ../a | |
51 searching for changes | |
52 adding changesets | |
53 adding manifests | |
54 adding file changes | |
55 added 1 changesets with 1 changes to 1 files (+1 heads) | |
56 (run 'hg heads' to see heads, 'hg merge' to merge) | |
816
8674b7803714
Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff
changeset
|
57 |
12279 | 58 $ hg push ../a |
59 pushing to ../a | |
60 searching for changes | |
14525
826a13720fbc
prepush: print short hash of first new head in abort message
Adrian Buehlmann <adrian@cadifra.com>
parents:
14164
diff
changeset
|
61 abort: push creates new remote head 1e108cc5548c! |
19934
bfc6ed892349
push: hide description about "-f" in the hint to prevent from using it easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19840
diff
changeset
|
62 (merge or see "hg help push" for details about pushing new heads) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
63 [255] |
12279 | 64 |
65 $ hg merge | |
66 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
67 (branch merge, don't forget to commit) | |
816
8674b7803714
Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff
changeset
|
68 |
12279 | 69 $ hg commit -m "4" |
70 $ hg push ../a | |
71 pushing to ../a | |
72 searching for changes | |
73 adding changesets | |
74 adding manifests | |
75 adding file changes | |
76 added 2 changesets with 1 changes to 1 files | |
77 | |
78 $ cd .. | |
79 | |
80 $ hg init c | |
81 $ cd c | |
82 $ for i in 0 1 2; do | |
83 > echo $i >> foo | |
84 > hg ci -Am $i | |
85 > done | |
86 adding foo | |
87 $ cd .. | |
88 | |
89 $ hg clone c d | |
90 updating to branch default | |
91 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
2021
fc22ed56afe3
Fix hg push and hg push -r sometimes creating new heads without --force.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1933
diff
changeset
|
92 |
12279 | 93 $ cd d |
94 $ for i in 0 1; do | |
95 > hg co -C $i | |
96 > echo d-$i >> foo | |
97 > hg ci -m d-$i | |
98 > done | |
99 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
100 created new head | |
101 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
102 created new head | |
103 | |
104 $ HGMERGE=true hg merge 3 | |
105 merging foo | |
106 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
107 (branch merge, don't forget to commit) | |
108 | |
109 $ hg ci -m c-d | |
2021
fc22ed56afe3
Fix hg push and hg push -r sometimes creating new heads without --force.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1933
diff
changeset
|
110 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
111 $ hg push ../c |
12279 | 112 pushing to ../c |
113 searching for changes | |
14525
826a13720fbc
prepush: print short hash of first new head in abort message
Adrian Buehlmann <adrian@cadifra.com>
parents:
14164
diff
changeset
|
114 abort: push creates new remote head 6346d66eb9f5! |
19934
bfc6ed892349
push: hide description about "-f" in the hint to prevent from using it easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19840
diff
changeset
|
115 (merge or see "hg help push" for details about pushing new heads) |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
116 [255] |
2021
fc22ed56afe3
Fix hg push and hg push -r sometimes creating new heads without --force.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1933
diff
changeset
|
117 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
118 $ hg push -r 2 ../c |
12279 | 119 pushing to ../c |
120 searching for changes | |
121 no changes found | |
16023
90f8b8dd0326
push: return 1 if no changes found (issue3228)
Matt Mackall <mpm@selenic.com>
parents:
15615
diff
changeset
|
122 [1] |
12279 | 123 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
124 $ hg push -r 3 ../c |
12279 | 125 pushing to ../c |
126 searching for changes | |
14525
826a13720fbc
prepush: print short hash of first new head in abort message
Adrian Buehlmann <adrian@cadifra.com>
parents:
14164
diff
changeset
|
127 abort: push creates new remote head a5dda829a167! |
19934
bfc6ed892349
push: hide description about "-f" in the hint to prevent from using it easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19840
diff
changeset
|
128 (merge or see "hg help push" for details about pushing new heads) |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
129 [255] |
2021
fc22ed56afe3
Fix hg push and hg push -r sometimes creating new heads without --force.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1933
diff
changeset
|
130 |
14526
4276e3202585
prepush: show details about new remote heads with --verbose
Adrian Buehlmann <adrian@cadifra.com>
parents:
14525
diff
changeset
|
131 $ hg push -v -r 3 -r 4 ../c |
12279 | 132 pushing to ../c |
133 searching for changes | |
20051
b988b3b19303
discovery: make note messages for new heads more readable
Mads Kiilerich <madski@unity3d.com>
parents:
20050
diff
changeset
|
134 new remote heads on branch 'default': |
b988b3b19303
discovery: make note messages for new heads more readable
Mads Kiilerich <madski@unity3d.com>
parents:
20050
diff
changeset
|
135 a5dda829a167 |
b988b3b19303
discovery: make note messages for new heads more readable
Mads Kiilerich <madski@unity3d.com>
parents:
20050
diff
changeset
|
136 ee8fbc7a0295 |
14525
826a13720fbc
prepush: print short hash of first new head in abort message
Adrian Buehlmann <adrian@cadifra.com>
parents:
14164
diff
changeset
|
137 abort: push creates new remote head a5dda829a167! |
19934
bfc6ed892349
push: hide description about "-f" in the hint to prevent from using it easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19840
diff
changeset
|
138 (merge or see "hg help push" for details about pushing new heads) |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
139 [255] |
12279 | 140 |
14526
4276e3202585
prepush: show details about new remote heads with --verbose
Adrian Buehlmann <adrian@cadifra.com>
parents:
14525
diff
changeset
|
141 $ hg push -v -f -r 3 -r 4 ../c |
12279 | 142 pushing to ../c |
143 searching for changes | |
14526
4276e3202585
prepush: show details about new remote heads with --verbose
Adrian Buehlmann <adrian@cadifra.com>
parents:
14525
diff
changeset
|
144 2 changesets found |
23748
4ab66de46a96
bundle: when verbose, show what takes up the space in the generated bundle
Mads Kiilerich <madski@unity3d.com>
parents:
22239
diff
changeset
|
145 uncompressed size of bundle content: |
4ab66de46a96
bundle: when verbose, show what takes up the space in the generated bundle
Mads Kiilerich <madski@unity3d.com>
parents:
22239
diff
changeset
|
146 308 (changelog) |
4ab66de46a96
bundle: when verbose, show what takes up the space in the generated bundle
Mads Kiilerich <madski@unity3d.com>
parents:
22239
diff
changeset
|
147 286 (manifests) |
4ab66de46a96
bundle: when verbose, show what takes up the space in the generated bundle
Mads Kiilerich <madski@unity3d.com>
parents:
22239
diff
changeset
|
148 213 foo |
12279 | 149 adding changesets |
150 adding manifests | |
151 adding file changes | |
152 added 2 changesets with 2 changes to 1 files (+2 heads) | |
153 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
154 $ hg push -r 5 ../c |
12279 | 155 pushing to ../c |
156 searching for changes | |
157 adding changesets | |
158 adding manifests | |
159 adding file changes | |
160 added 1 changesets with 1 changes to 1 files (-1 heads) | |
2021
fc22ed56afe3
Fix hg push and hg push -r sometimes creating new heads without --force.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1933
diff
changeset
|
161 |
12279 | 162 $ hg in ../c |
163 comparing with ../c | |
164 searching for changes | |
165 no changes found | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
166 [1] |
12279 | 167 |
168 | |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12365
diff
changeset
|
169 Issue450: push -r warns about remote head creation even if no heads |
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12365
diff
changeset
|
170 will be created |
3923
27230c29bfec
fix calculation of new heads added during push with -r
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3803
diff
changeset
|
171 |
12279 | 172 $ hg init ../e |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
173 $ hg push -r 0 ../e |
12279 | 174 pushing to ../e |
175 searching for changes | |
176 adding changesets | |
177 adding manifests | |
178 adding file changes | |
179 added 1 changesets with 1 changes to 1 files | |
180 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
181 $ hg push -r 1 ../e |
12279 | 182 pushing to ../e |
183 searching for changes | |
184 adding changesets | |
185 adding manifests | |
186 adding file changes | |
187 added 1 changesets with 1 changes to 1 files | |
188 | |
189 $ cd .. | |
190 | |
191 | |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12365
diff
changeset
|
192 Issue736: named branches are not considered for detection of |
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12365
diff
changeset
|
193 unmerged heads in "hg push" |
8565
268d16b2ec25
tests: add tests for new pre-push logic (issue736)
Sune Foldager <cryo@cyanite.org>
parents:
3923
diff
changeset
|
194 |
12279 | 195 $ hg init f |
196 $ cd f | |
197 $ hg -q branch a | |
198 $ echo 0 > foo | |
199 $ hg -q ci -Am 0 | |
200 $ echo 1 > foo | |
201 $ hg -q ci -m 1 | |
202 $ hg -q up 0 | |
203 $ echo 2 > foo | |
204 $ hg -q ci -m 2 | |
205 $ hg -q up 0 | |
206 $ hg -q branch b | |
207 $ echo 3 > foo | |
208 $ hg -q ci -m 3 | |
209 $ cd .. | |
210 | |
211 $ hg -q clone f g | |
212 $ cd g | |
213 | |
214 Push on existing branch and new branch: | |
8565
268d16b2ec25
tests: add tests for new pre-push logic (issue736)
Sune Foldager <cryo@cyanite.org>
parents:
3923
diff
changeset
|
215 |
12279 | 216 $ hg -q up 1 |
217 $ echo 4 > foo | |
218 $ hg -q ci -m 4 | |
219 $ hg -q up 0 | |
220 $ echo 5 > foo | |
221 $ hg -q branch c | |
222 $ hg -q ci -m 5 | |
223 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
224 $ hg push ../f |
12279 | 225 pushing to ../f |
226 searching for changes | |
227 abort: push creates new remote branches: c! | |
228 (use 'hg push --new-branch' to create new remote branches) | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
229 [255] |
8565
268d16b2ec25
tests: add tests for new pre-push logic (issue736)
Sune Foldager <cryo@cyanite.org>
parents:
3923
diff
changeset
|
230 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
231 $ hg push -r 4 -r 5 ../f |
12279 | 232 pushing to ../f |
233 searching for changes | |
234 abort: push creates new remote branches: c! | |
235 (use 'hg push --new-branch' to create new remote branches) | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
236 [255] |
12279 | 237 |
238 | |
239 Multiple new branches: | |
8565
268d16b2ec25
tests: add tests for new pre-push logic (issue736)
Sune Foldager <cryo@cyanite.org>
parents:
3923
diff
changeset
|
240 |
12279 | 241 $ hg -q branch d |
242 $ echo 6 > foo | |
243 $ hg -q ci -m 6 | |
244 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
245 $ hg push ../f |
12279 | 246 pushing to ../f |
247 searching for changes | |
248 abort: push creates new remote branches: c, d! | |
249 (use 'hg push --new-branch' to create new remote branches) | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
250 [255] |
10354
844d83da2da9
prepush: warn about every new outgoing named branch, not just the first
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
9954
diff
changeset
|
251 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
252 $ hg push -r 4 -r 6 ../f |
12279 | 253 pushing to ../f |
254 searching for changes | |
255 abort: push creates new remote branches: c, d! | |
256 (use 'hg push --new-branch' to create new remote branches) | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
257 [255] |
12279 | 258 |
259 $ cd ../g | |
260 | |
261 | |
262 Fail on multiple head push: | |
263 | |
264 $ hg -q up 1 | |
265 $ echo 7 > foo | |
266 $ hg -q ci -m 7 | |
267 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
268 $ hg push -r 4 -r 7 ../f |
12279 | 269 pushing to ../f |
270 searching for changes | |
14525
826a13720fbc
prepush: print short hash of first new head in abort message
Adrian Buehlmann <adrian@cadifra.com>
parents:
14164
diff
changeset
|
271 abort: push creates new remote head 0b715ef6ff8f on branch 'a'! |
19934
bfc6ed892349
push: hide description about "-f" in the hint to prevent from using it easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19840
diff
changeset
|
272 (merge or see "hg help push" for details about pushing new heads) |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
273 [255] |
12279 | 274 |
275 Push replacement head on existing branches: | |
276 | |
277 $ hg -q up 3 | |
278 $ echo 8 > foo | |
279 $ hg -q ci -m 8 | |
8565
268d16b2ec25
tests: add tests for new pre-push logic (issue736)
Sune Foldager <cryo@cyanite.org>
parents:
3923
diff
changeset
|
280 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
281 $ hg push -r 7 -r 8 ../f |
12279 | 282 pushing to ../f |
283 searching for changes | |
284 adding changesets | |
285 adding manifests | |
286 adding file changes | |
287 added 2 changesets with 2 changes to 1 files | |
288 | |
289 | |
290 Merge of branch a to other branch b followed by unrelated push | |
291 on branch a: | |
292 | |
293 $ hg -q up 7 | |
294 $ HGMERGE=true hg -q merge 8 | |
295 $ hg -q ci -m 9 | |
296 $ hg -q up 8 | |
297 $ echo 10 > foo | |
298 $ hg -q ci -m 10 | |
299 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
300 $ hg push -r 9 ../f |
12279 | 301 pushing to ../f |
302 searching for changes | |
303 adding changesets | |
304 adding manifests | |
305 adding file changes | |
306 added 1 changesets with 1 changes to 1 files (-1 heads) | |
8565
268d16b2ec25
tests: add tests for new pre-push logic (issue736)
Sune Foldager <cryo@cyanite.org>
parents:
3923
diff
changeset
|
307 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
308 $ hg push -r 10 ../f |
12279 | 309 pushing to ../f |
310 searching for changes | |
311 adding changesets | |
312 adding manifests | |
313 adding file changes | |
314 added 1 changesets with 1 changes to 1 files (+1 heads) | |
315 | |
316 | |
317 Cheating the counting algorithm: | |
318 | |
319 $ hg -q up 9 | |
320 $ HGMERGE=true hg -q merge 2 | |
321 $ hg -q ci -m 11 | |
322 $ hg -q up 1 | |
323 $ echo 12 > foo | |
324 $ hg -q ci -m 12 | |
325 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
326 $ hg push -r 11 -r 12 ../f |
12279 | 327 pushing to ../f |
328 searching for changes | |
329 adding changesets | |
330 adding manifests | |
331 adding file changes | |
332 added 2 changesets with 2 changes to 1 files | |
333 | |
8565
268d16b2ec25
tests: add tests for new pre-push logic (issue736)
Sune Foldager <cryo@cyanite.org>
parents:
3923
diff
changeset
|
334 |
12279 | 335 Failed push of new named branch: |
336 | |
337 $ echo 12 > foo | |
338 $ hg -q ci -m 12a | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
339 [1] |
12279 | 340 $ hg -q up 11 |
341 $ echo 13 > foo | |
342 $ hg -q branch e | |
343 $ hg -q ci -m 13d | |
8565
268d16b2ec25
tests: add tests for new pre-push logic (issue736)
Sune Foldager <cryo@cyanite.org>
parents:
3923
diff
changeset
|
344 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
345 $ hg push -r 12 -r 13 ../f |
12279 | 346 pushing to ../f |
347 searching for changes | |
348 abort: push creates new remote branches: e! | |
349 (use 'hg push --new-branch' to create new remote branches) | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
350 [255] |
12279 | 351 |
352 | |
353 Using --new-branch to push new named branch: | |
11211
e43c23d189a5
push: add --new-branch option to allow intial push of new branches
Sune Foldager <cryo@cyanite.org>
parents:
10925
diff
changeset
|
354 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
355 $ hg push --new-branch -r 12 -r 13 ../f |
12279 | 356 pushing to ../f |
357 searching for changes | |
358 adding changesets | |
359 adding manifests | |
360 adding file changes | |
361 added 1 changesets with 1 changes to 1 files | |
362 | |
21024
7731a2281cf0
spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents:
20501
diff
changeset
|
363 Pushing multi headed new branch: |
19840
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
364 |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
365 $ echo 14 > foo |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
366 $ hg -q branch f |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
367 $ hg -q ci -m 14 |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
368 $ echo 15 > foo |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
369 $ hg -q ci -m 15 |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
370 $ hg -q up 14 |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
371 $ echo 16 > foo |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
372 $ hg -q ci -m 16 |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
373 $ hg push --branch f --new-branch ../f |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
374 pushing to ../f |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
375 searching for changes |
20050
877e05b46509
discovery: tweak error message for multiple branch heads
Mads Kiilerich <madski@unity3d.com>
parents:
19936
diff
changeset
|
376 abort: push creates new branch 'f' with multiple heads |
19936
8179eb28983b
discovery: revise hint message introduced by changeset b00ba31313c3
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19934
diff
changeset
|
377 (merge or see "hg help push" for details about pushing new heads) |
19840
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
378 [255] |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
379 $ hg push --branch f --new-branch --force ../f |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
380 pushing to ../f |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
381 searching for changes |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
382 adding changesets |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
383 adding manifests |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
384 adding file changes |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
385 added 3 changesets with 3 changes to 1 files (+1 heads) |
11211
e43c23d189a5
push: add --new-branch option to allow intial push of new branches
Sune Foldager <cryo@cyanite.org>
parents:
10925
diff
changeset
|
386 |
12785
c7d23b4ca4ba
check-code: warning and fixes for whitespace in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12399
diff
changeset
|
387 Checking prepush logic does not allow silently pushing |
21198
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
388 multiple new heads but also doesn't report too many heads: |
12279 | 389 |
390 $ cd .. | |
391 $ hg init h | |
392 $ echo init > h/init | |
393 $ hg -R h ci -Am init | |
394 adding init | |
395 $ echo a > h/a | |
396 $ hg -R h ci -Am a | |
397 adding a | |
398 $ hg clone h i | |
399 updating to branch default | |
400 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
401 $ hg -R h up 0 | |
402 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
403 $ echo b > h/b | |
404 $ hg -R h ci -Am b | |
405 adding b | |
406 created new head | |
407 $ hg -R i up 0 | |
408 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
409 $ echo c > i/c | |
410 $ hg -R i ci -Am c | |
411 adding c | |
412 created new head | |
9479
f3569d95c2ab
push: fix subtle bug in prepush logic
Sune Foldager <cryo@cyanite.org>
parents:
8565
diff
changeset
|
413 |
21198
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
414 $ for i in `seq 3`; do hg -R h up -q 0; echo $i > h/b; hg -R h ci -qAm$i; done |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
415 |
12279 | 416 $ hg -R i push h |
417 pushing to h | |
418 searching for changes | |
21198
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
419 remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
420 abort: push creates new remote head 97bd0c84d346! |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
421 (pull and merge or see "hg help push" for details about pushing new heads) |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
422 [255] |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
423 $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
424 $ hg -R i push h |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
425 pushing to h |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
426 searching for changes |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
427 remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
428 abort: push creates new remote head 97bd0c84d346! |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
429 (pull and merge or see "hg help push" for details about pushing new heads) |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
430 [255] |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
431 $ hg -R i push h -v |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
432 pushing to h |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
433 searching for changes |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
434 remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
435 new remote heads on branch 'default': |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
436 97bd0c84d346 |
14525
826a13720fbc
prepush: print short hash of first new head in abort message
Adrian Buehlmann <adrian@cadifra.com>
parents:
14164
diff
changeset
|
437 abort: push creates new remote head 97bd0c84d346! |
19934
bfc6ed892349
push: hide description about "-f" in the hint to prevent from using it easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19840
diff
changeset
|
438 (pull and merge or see "hg help push" for details about pushing new heads) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
439 [255] |
12279 | 440 |
441 | |
442 Check prepush logic with merged branches: | |
443 | |
444 $ hg init j | |
445 $ hg -R j branch a | |
446 marked working directory as branch a | |
15615 | 447 (branches are permanent and global, did you want a bookmark?) |
12279 | 448 $ echo init > j/foo |
449 $ hg -R j ci -Am init | |
450 adding foo | |
451 $ hg clone j k | |
452 updating to branch a | |
453 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
454 $ echo a1 > j/foo | |
455 $ hg -R j ci -m a1 | |
456 $ hg -R k branch b | |
457 marked working directory as branch b | |
15615 | 458 (branches are permanent and global, did you want a bookmark?) |
12279 | 459 $ echo b > k/foo |
460 $ hg -R k ci -m b | |
461 $ hg -R k up 0 | |
462 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
463 | |
464 $ hg -R k merge b | |
465 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
466 (branch merge, don't forget to commit) | |
467 | |
468 $ hg -R k ci -m merge | |
9954
d6a307719ccb
fix bug in prepush logic involving merge changesets
Sune Foldager <cryo@cyanite.org>
parents:
9609
diff
changeset
|
469 |
12279 | 470 $ hg -R k push -r a j |
471 pushing to j | |
472 searching for changes | |
473 abort: push creates new remote branches: b! | |
474 (use 'hg push --new-branch' to create new remote branches) | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
475 [255] |
12279 | 476 |
477 | |
478 Prepush -r should not allow you to sneak in new heads: | |
10875
a9702c47a19f
partial backout of 1e819576e926 and add tests (issue2131)
Sune Foldager <cryo@cyanite.org>
parents:
10771
diff
changeset
|
479 |
12279 | 480 $ hg init l |
481 $ cd l | |
482 $ echo a >> foo | |
483 $ hg -q add foo | |
484 $ hg -q branch a | |
485 $ hg -q ci -ma | |
486 $ hg -q up null | |
487 $ echo a >> foo | |
488 $ hg -q add foo | |
489 $ hg -q branch b | |
490 $ hg -q ci -mb | |
491 $ cd .. | |
492 $ hg -q clone l m -u a | |
493 $ cd m | |
494 $ hg -q merge b | |
495 $ hg -q ci -mmb | |
496 $ hg -q up 0 | |
497 $ echo a >> foo | |
498 $ hg -q ci -ma2 | |
499 $ hg -q up 2 | |
500 $ echo a >> foo | |
501 $ hg -q branch -f b | |
502 $ hg -q ci -mb2 | |
503 $ hg -q merge 3 | |
504 $ hg -q ci -mma | |
505 | |
506 $ hg push ../l -b b | |
507 pushing to ../l | |
508 searching for changes | |
18361
06f075836010
discovery: process heads in sorted order
Mads Kiilerich <mads@kiilerich.com>
parents:
17293
diff
changeset
|
509 abort: push creates new remote head 451211cc22b0 on branch 'a'! |
19934
bfc6ed892349
push: hide description about "-f" in the hint to prevent from using it easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19840
diff
changeset
|
510 (merge or see "hg help push" for details about pushing new heads) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
511 [255] |
12279 | 512 |
513 $ cd .. | |
514 | |
515 | |
516 Check prepush with new branch head on former topo non-head: | |
517 | |
518 $ hg init n | |
519 $ cd n | |
520 $ hg branch A | |
521 marked working directory as branch A | |
15615 | 522 (branches are permanent and global, did you want a bookmark?) |
12279 | 523 $ echo a >a |
524 $ hg ci -Ama | |
525 adding a | |
526 $ hg branch B | |
527 marked working directory as branch B | |
15615 | 528 (branches are permanent and global, did you want a bookmark?) |
12279 | 529 $ echo b >b |
530 $ hg ci -Amb | |
531 adding b | |
532 | |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
533 b is now branch head of B, and a topological head |
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
534 a is now branch head of A, but not a topological head |
12279 | 535 |
536 $ hg clone . inner | |
537 updating to branch B | |
538 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
539 $ cd inner | |
540 $ hg up B | |
541 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
542 $ echo b1 >b1 | |
543 $ hg ci -Amb1 | |
544 adding b1 | |
545 | |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
546 in the clone b1 is now the head of B |
12279 | 547 |
548 $ cd .. | |
549 $ hg up 0 | |
550 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
551 $ echo a2 >a2 | |
552 $ hg ci -Ama2 | |
553 adding a2 | |
554 | |
12785
c7d23b4ca4ba
check-code: warning and fixes for whitespace in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12399
diff
changeset
|
555 a2 is now the new branch head of A, and a new topological head |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
556 it replaces a former inner branch head, so it should at most warn about |
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
557 A, not B |
12279 | 558 |
559 glog of local: | |
560 | |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20051
diff
changeset
|
561 $ hg log -G --template "{rev}: {branches} {desc}\n" |
12279 | 562 @ 2: A a2 |
563 | | |
564 | o 1: B b | |
565 |/ | |
566 o 0: A a | |
567 | |
568 glog of remote: | |
569 | |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20051
diff
changeset
|
570 $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
12279 | 571 @ 2: B b1 |
572 | | |
573 o 1: B b | |
574 | | |
575 o 0: A a | |
576 | |
577 outgoing: | |
578 | |
579 $ hg out inner --template "{rev}: {branches} {desc}\n" | |
580 comparing with inner | |
581 searching for changes | |
582 2: A a2 | |
583 | |
584 $ hg push inner | |
585 pushing to inner | |
586 searching for changes | |
587 adding changesets | |
588 adding manifests | |
589 adding file changes | |
590 added 1 changesets with 1 changes to 1 files (+1 heads) | |
591 | |
592 $ cd .. | |
593 | |
594 | |
595 Check prepush with new branch head on former topo head: | |
10875
a9702c47a19f
partial backout of 1e819576e926 and add tests (issue2131)
Sune Foldager <cryo@cyanite.org>
parents:
10771
diff
changeset
|
596 |
12279 | 597 $ hg init o |
598 $ cd o | |
599 $ hg branch A | |
600 marked working directory as branch A | |
15615 | 601 (branches are permanent and global, did you want a bookmark?) |
12279 | 602 $ echo a >a |
603 $ hg ci -Ama | |
604 adding a | |
605 $ hg branch B | |
606 marked working directory as branch B | |
15615 | 607 (branches are permanent and global, did you want a bookmark?) |
12279 | 608 $ echo b >b |
609 $ hg ci -Amb | |
610 adding b | |
611 | |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
612 b is now branch head of B, and a topological head |
12279 | 613 |
614 $ hg up 0 | |
615 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
616 $ echo a1 >a1 | |
617 $ hg ci -Ama1 | |
618 adding a1 | |
619 | |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
620 a1 is now branch head of A, and a topological head |
12279 | 621 |
622 $ hg clone . inner | |
623 updating to branch A | |
624 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
625 $ cd inner | |
626 $ hg up B | |
627 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
628 $ echo b1 >b1 | |
629 $ hg ci -Amb1 | |
630 adding b1 | |
631 | |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
632 in the clone b1 is now the head of B |
12279 | 633 |
634 $ cd .. | |
635 $ echo a2 >a2 | |
636 $ hg ci -Ama2 | |
637 adding a2 | |
638 | |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
639 a2 is now the new branch head of A, and a topological head |
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
640 it replaces a former topological and branch head, so this should not warn |
12279 | 641 |
642 glog of local: | |
643 | |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20051
diff
changeset
|
644 $ hg log -G --template "{rev}: {branches} {desc}\n" |
12279 | 645 @ 3: A a2 |
646 | | |
647 o 2: A a1 | |
648 | | |
649 | o 1: B b | |
650 |/ | |
651 o 0: A a | |
652 | |
653 glog of remote: | |
654 | |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20051
diff
changeset
|
655 $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
12279 | 656 @ 3: B b1 |
657 | | |
658 | o 2: A a1 | |
659 | | | |
660 o | 1: B b | |
661 |/ | |
662 o 0: A a | |
663 | |
664 outgoing: | |
665 | |
666 $ hg out inner --template "{rev}: {branches} {desc}\n" | |
667 comparing with inner | |
668 searching for changes | |
669 3: A a2 | |
670 | |
671 $ hg push inner | |
672 pushing to inner | |
673 searching for changes | |
674 adding changesets | |
675 adding manifests | |
676 adding file changes | |
677 added 1 changesets with 1 changes to 1 files | |
678 | |
679 $ cd .. | |
680 | |
681 | |
682 Check prepush with new branch head and new child of former branch head | |
683 but child is on different branch: | |
684 | |
685 $ hg init p | |
686 $ cd p | |
687 $ hg branch A | |
688 marked working directory as branch A | |
15615 | 689 (branches are permanent and global, did you want a bookmark?) |
12279 | 690 $ echo a0 >a |
691 $ hg ci -Ama0 | |
692 adding a | |
693 $ echo a1 >a | |
694 $ hg ci -ma1 | |
695 $ hg up null | |
696 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
697 $ hg branch B | |
698 marked working directory as branch B | |
15615 | 699 (branches are permanent and global, did you want a bookmark?) |
12279 | 700 $ echo b0 >b |
701 $ hg ci -Amb0 | |
702 adding b | |
703 $ echo b1 >b | |
704 $ hg ci -mb1 | |
705 | |
706 $ hg clone . inner | |
707 updating to branch B | |
708 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
10771
01f097c4ae66
push: fix bug in prepush logic and its tests
Sune Foldager <cryo@cyanite.org>
parents:
10354
diff
changeset
|
709 |
12279 | 710 $ hg up A |
711 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
712 $ hg branch -f B | |
713 marked working directory as branch B | |
15615 | 714 (branches are permanent and global, did you want a bookmark?) |
12279 | 715 $ echo a3 >a |
716 $ hg ci -ma3 | |
717 created new head | |
718 $ hg up 3 | |
719 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
720 $ hg branch -f A | |
721 marked working directory as branch A | |
15615 | 722 (branches are permanent and global, did you want a bookmark?) |
12279 | 723 $ echo b3 >b |
724 $ hg ci -mb3 | |
725 created new head | |
10909
29a83fb8c067
prepush: add more test cases
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
10908
diff
changeset
|
726 |
12279 | 727 glog of local: |
728 | |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20051
diff
changeset
|
729 $ hg log -G --template "{rev}: {branches} {desc}\n" |
12279 | 730 @ 5: A b3 |
731 | | |
732 | o 4: B a3 | |
733 | | | |
734 o | 3: B b1 | |
735 | | | |
736 o | 2: B b0 | |
737 / | |
738 o 1: A a1 | |
739 | | |
740 o 0: A a0 | |
741 | |
742 glog of remote: | |
10909
29a83fb8c067
prepush: add more test cases
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
10908
diff
changeset
|
743 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20051
diff
changeset
|
744 $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
12279 | 745 @ 3: B b1 |
746 | | |
747 o 2: B b0 | |
748 | |
749 o 1: A a1 | |
750 | | |
751 o 0: A a0 | |
752 | |
753 outgoing: | |
754 | |
755 $ hg out inner --template "{rev}: {branches} {desc}\n" | |
756 comparing with inner | |
757 searching for changes | |
758 4: B a3 | |
759 5: A b3 | |
10909
29a83fb8c067
prepush: add more test cases
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
10908
diff
changeset
|
760 |
12279 | 761 $ hg push inner |
762 pushing to inner | |
763 searching for changes | |
14525
826a13720fbc
prepush: print short hash of first new head in abort message
Adrian Buehlmann <adrian@cadifra.com>
parents:
14164
diff
changeset
|
764 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
19934
bfc6ed892349
push: hide description about "-f" in the hint to prevent from using it easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19840
diff
changeset
|
765 (merge or see "hg help push" for details about pushing new heads) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
766 [255] |
10909
29a83fb8c067
prepush: add more test cases
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
10908
diff
changeset
|
767 |
12279 | 768 $ hg push inner -r4 -r5 |
769 pushing to inner | |
770 searching for changes | |
14525
826a13720fbc
prepush: print short hash of first new head in abort message
Adrian Buehlmann <adrian@cadifra.com>
parents:
14164
diff
changeset
|
771 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
19934
bfc6ed892349
push: hide description about "-f" in the hint to prevent from using it easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19840
diff
changeset
|
772 (merge or see "hg help push" for details about pushing new heads) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
773 [255] |
12279 | 774 |
775 $ hg in inner | |
776 comparing with inner | |
777 searching for changes | |
778 no changes found | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
779 [1] |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16023
diff
changeset
|
780 |
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16023
diff
changeset
|
781 $ cd .. |