Mercurial > hg-stable
annotate tests/test-push-warn.t @ 22627:808df84fba83
bookmark: make the search for divergent names more robust
We translate the "url we update from" and "the url in the config" into their
canonical representation. This is useful for urls that have multiple equivalent
forms:
/foo/bar/ == file:/foo/bar/ == file:///foo/bar
eg: hg pull --config path.bar=/foo/bar/ file:/foo/bar
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 26 Sep 2014 11:31:15 -0700 |
parents | 0688010ee38f |
children | 4ab66de46a96 |
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 |
12279 | 145 adding changesets |
146 adding manifests | |
147 adding file changes | |
148 added 2 changesets with 2 changes to 1 files (+2 heads) | |
149 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
150 $ hg push -r 5 ../c |
12279 | 151 pushing to ../c |
152 searching for changes | |
153 adding changesets | |
154 adding manifests | |
155 adding file changes | |
156 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
|
157 |
12279 | 158 $ hg in ../c |
159 comparing with ../c | |
160 searching for changes | |
161 no changes found | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
162 [1] |
12279 | 163 |
164 | |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12365
diff
changeset
|
165 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
|
166 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
|
167 |
12279 | 168 $ hg init ../e |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
169 $ hg push -r 0 ../e |
12279 | 170 pushing to ../e |
171 searching for changes | |
172 adding changesets | |
173 adding manifests | |
174 adding file changes | |
175 added 1 changesets with 1 changes to 1 files | |
176 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
177 $ hg push -r 1 ../e |
12279 | 178 pushing to ../e |
179 searching for changes | |
180 adding changesets | |
181 adding manifests | |
182 adding file changes | |
183 added 1 changesets with 1 changes to 1 files | |
184 | |
185 $ cd .. | |
186 | |
187 | |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12365
diff
changeset
|
188 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
|
189 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
|
190 |
12279 | 191 $ hg init f |
192 $ cd f | |
193 $ hg -q branch a | |
194 $ echo 0 > foo | |
195 $ hg -q ci -Am 0 | |
196 $ echo 1 > foo | |
197 $ hg -q ci -m 1 | |
198 $ hg -q up 0 | |
199 $ echo 2 > foo | |
200 $ hg -q ci -m 2 | |
201 $ hg -q up 0 | |
202 $ hg -q branch b | |
203 $ echo 3 > foo | |
204 $ hg -q ci -m 3 | |
205 $ cd .. | |
206 | |
207 $ hg -q clone f g | |
208 $ cd g | |
209 | |
210 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
|
211 |
12279 | 212 $ hg -q up 1 |
213 $ echo 4 > foo | |
214 $ hg -q ci -m 4 | |
215 $ hg -q up 0 | |
216 $ echo 5 > foo | |
217 $ hg -q branch c | |
218 $ hg -q ci -m 5 | |
219 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
220 $ hg push ../f |
12279 | 221 pushing to ../f |
222 searching for changes | |
223 abort: push creates new remote branches: c! | |
224 (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
|
225 [255] |
8565
268d16b2ec25
tests: add tests for new pre-push logic (issue736)
Sune Foldager <cryo@cyanite.org>
parents:
3923
diff
changeset
|
226 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
227 $ hg push -r 4 -r 5 ../f |
12279 | 228 pushing to ../f |
229 searching for changes | |
230 abort: push creates new remote branches: c! | |
231 (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
|
232 [255] |
12279 | 233 |
234 | |
235 Multiple new branches: | |
8565
268d16b2ec25
tests: add tests for new pre-push logic (issue736)
Sune Foldager <cryo@cyanite.org>
parents:
3923
diff
changeset
|
236 |
12279 | 237 $ hg -q branch d |
238 $ echo 6 > foo | |
239 $ hg -q ci -m 6 | |
240 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
241 $ hg push ../f |
12279 | 242 pushing to ../f |
243 searching for changes | |
244 abort: push creates new remote branches: c, d! | |
245 (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
|
246 [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
|
247 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
248 $ hg push -r 4 -r 6 ../f |
12279 | 249 pushing to ../f |
250 searching for changes | |
251 abort: push creates new remote branches: c, d! | |
252 (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
|
253 [255] |
12279 | 254 |
255 $ cd ../g | |
256 | |
257 | |
258 Fail on multiple head push: | |
259 | |
260 $ hg -q up 1 | |
261 $ echo 7 > foo | |
262 $ hg -q ci -m 7 | |
263 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
264 $ hg push -r 4 -r 7 ../f |
12279 | 265 pushing to ../f |
266 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
|
267 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
|
268 (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
|
269 [255] |
12279 | 270 |
271 Push replacement head on existing branches: | |
272 | |
273 $ hg -q up 3 | |
274 $ echo 8 > foo | |
275 $ 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
|
276 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
277 $ hg push -r 7 -r 8 ../f |
12279 | 278 pushing to ../f |
279 searching for changes | |
280 adding changesets | |
281 adding manifests | |
282 adding file changes | |
283 added 2 changesets with 2 changes to 1 files | |
284 | |
285 | |
286 Merge of branch a to other branch b followed by unrelated push | |
287 on branch a: | |
288 | |
289 $ hg -q up 7 | |
290 $ HGMERGE=true hg -q merge 8 | |
291 $ hg -q ci -m 9 | |
292 $ hg -q up 8 | |
293 $ echo 10 > foo | |
294 $ hg -q ci -m 10 | |
295 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
296 $ hg push -r 9 ../f |
12279 | 297 pushing to ../f |
298 searching for changes | |
299 adding changesets | |
300 adding manifests | |
301 adding file changes | |
302 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
|
303 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
304 $ hg push -r 10 ../f |
12279 | 305 pushing to ../f |
306 searching for changes | |
307 adding changesets | |
308 adding manifests | |
309 adding file changes | |
310 added 1 changesets with 1 changes to 1 files (+1 heads) | |
311 | |
312 | |
313 Cheating the counting algorithm: | |
314 | |
315 $ hg -q up 9 | |
316 $ HGMERGE=true hg -q merge 2 | |
317 $ hg -q ci -m 11 | |
318 $ hg -q up 1 | |
319 $ echo 12 > foo | |
320 $ hg -q ci -m 12 | |
321 | |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
322 $ hg push -r 11 -r 12 ../f |
12279 | 323 pushing to ../f |
324 searching for changes | |
325 adding changesets | |
326 adding manifests | |
327 adding file changes | |
328 added 2 changesets with 2 changes to 1 files | |
329 | |
8565
268d16b2ec25
tests: add tests for new pre-push logic (issue736)
Sune Foldager <cryo@cyanite.org>
parents:
3923
diff
changeset
|
330 |
12279 | 331 Failed push of new named branch: |
332 | |
333 $ echo 12 > foo | |
334 $ hg -q ci -m 12a | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
335 [1] |
12279 | 336 $ hg -q up 11 |
337 $ echo 13 > foo | |
338 $ hg -q branch e | |
339 $ 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
|
340 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
341 $ hg push -r 12 -r 13 ../f |
12279 | 342 pushing to ../f |
343 searching for changes | |
344 abort: push creates new remote branches: e! | |
345 (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
|
346 [255] |
12279 | 347 |
348 | |
349 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
|
350 |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12328
diff
changeset
|
351 $ hg push --new-branch -r 12 -r 13 ../f |
12279 | 352 pushing to ../f |
353 searching for changes | |
354 adding changesets | |
355 adding manifests | |
356 adding file changes | |
357 added 1 changesets with 1 changes to 1 files | |
358 | |
21024
7731a2281cf0
spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents:
20501
diff
changeset
|
359 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
|
360 |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
361 $ echo 14 > foo |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
362 $ 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
|
363 $ 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
|
364 $ echo 15 > foo |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
365 $ 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
|
366 $ 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
|
367 $ echo 16 > foo |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
368 $ 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
|
369 $ 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
|
370 pushing to ../f |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
371 searching for changes |
20050
877e05b46509
discovery: tweak error message for multiple branch heads
Mads Kiilerich <madski@unity3d.com>
parents:
19936
diff
changeset
|
372 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
|
373 (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
|
374 [255] |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
375 $ 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
|
376 pushing to ../f |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
377 searching for changes |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
378 adding changesets |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
379 adding manifests |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
380 adding file changes |
b00ba31313c3
discovery: abort also when pushing multiple headed new branch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18361
diff
changeset
|
381 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
|
382 |
12785
c7d23b4ca4ba
check-code: warning and fixes for whitespace in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12399
diff
changeset
|
383 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
|
384 multiple new heads but also doesn't report too many heads: |
12279 | 385 |
386 $ cd .. | |
387 $ hg init h | |
388 $ echo init > h/init | |
389 $ hg -R h ci -Am init | |
390 adding init | |
391 $ echo a > h/a | |
392 $ hg -R h ci -Am a | |
393 adding a | |
394 $ hg clone h i | |
395 updating to branch default | |
396 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
397 $ hg -R h up 0 | |
398 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
399 $ echo b > h/b | |
400 $ hg -R h ci -Am b | |
401 adding b | |
402 created new head | |
403 $ hg -R i up 0 | |
404 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
405 $ echo c > i/c | |
406 $ hg -R i ci -Am c | |
407 adding c | |
408 created new head | |
9479
f3569d95c2ab
push: fix subtle bug in prepush logic
Sune Foldager <cryo@cyanite.org>
parents:
8565
diff
changeset
|
409 |
21198
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
410 $ 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
|
411 |
12279 | 412 $ hg -R i push h |
413 pushing to h | |
414 searching for changes | |
21198
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
415 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
|
416 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
|
417 (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
|
418 [255] |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
419 $ 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
|
420 $ hg -R i push h |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
421 pushing to h |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
422 searching for changes |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
423 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
|
424 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
|
425 (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
|
426 [255] |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
427 $ 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
|
428 pushing to h |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
429 searching for changes |
56a04085c23c
discovery: don't report all "unsynced" remote heads (issue4230)
Mads Kiilerich <madski@unity3d.com>
parents:
21024
diff
changeset
|
430 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
|
431 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
|
432 97bd0c84d346 |
14525
826a13720fbc
prepush: print short hash of first new head in abort message
Adrian Buehlmann <adrian@cadifra.com>
parents:
14164
diff
changeset
|
433 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
|
434 (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
|
435 [255] |
12279 | 436 |
437 | |
438 Check prepush logic with merged branches: | |
439 | |
440 $ hg init j | |
441 $ hg -R j branch a | |
442 marked working directory as branch a | |
15615 | 443 (branches are permanent and global, did you want a bookmark?) |
12279 | 444 $ echo init > j/foo |
445 $ hg -R j ci -Am init | |
446 adding foo | |
447 $ hg clone j k | |
448 updating to branch a | |
449 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
450 $ echo a1 > j/foo | |
451 $ hg -R j ci -m a1 | |
452 $ hg -R k branch b | |
453 marked working directory as branch b | |
15615 | 454 (branches are permanent and global, did you want a bookmark?) |
12279 | 455 $ echo b > k/foo |
456 $ hg -R k ci -m b | |
457 $ hg -R k up 0 | |
458 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
459 | |
460 $ hg -R k merge b | |
461 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
462 (branch merge, don't forget to commit) | |
463 | |
464 $ 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
|
465 |
12279 | 466 $ hg -R k push -r a j |
467 pushing to j | |
468 searching for changes | |
469 abort: push creates new remote branches: b! | |
470 (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
|
471 [255] |
12279 | 472 |
473 | |
474 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
|
475 |
12279 | 476 $ hg init l |
477 $ cd l | |
478 $ echo a >> foo | |
479 $ hg -q add foo | |
480 $ hg -q branch a | |
481 $ hg -q ci -ma | |
482 $ hg -q up null | |
483 $ echo a >> foo | |
484 $ hg -q add foo | |
485 $ hg -q branch b | |
486 $ hg -q ci -mb | |
487 $ cd .. | |
488 $ hg -q clone l m -u a | |
489 $ cd m | |
490 $ hg -q merge b | |
491 $ hg -q ci -mmb | |
492 $ hg -q up 0 | |
493 $ echo a >> foo | |
494 $ hg -q ci -ma2 | |
495 $ hg -q up 2 | |
496 $ echo a >> foo | |
497 $ hg -q branch -f b | |
498 $ hg -q ci -mb2 | |
499 $ hg -q merge 3 | |
500 $ hg -q ci -mma | |
501 | |
502 $ hg push ../l -b b | |
503 pushing to ../l | |
504 searching for changes | |
18361
06f075836010
discovery: process heads in sorted order
Mads Kiilerich <mads@kiilerich.com>
parents:
17293
diff
changeset
|
505 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
|
506 (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
|
507 [255] |
12279 | 508 |
509 $ cd .. | |
510 | |
511 | |
512 Check prepush with new branch head on former topo non-head: | |
513 | |
514 $ hg init n | |
515 $ cd n | |
516 $ hg branch A | |
517 marked working directory as branch A | |
15615 | 518 (branches are permanent and global, did you want a bookmark?) |
12279 | 519 $ echo a >a |
520 $ hg ci -Ama | |
521 adding a | |
522 $ hg branch B | |
523 marked working directory as branch B | |
15615 | 524 (branches are permanent and global, did you want a bookmark?) |
12279 | 525 $ echo b >b |
526 $ hg ci -Amb | |
527 adding b | |
528 | |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
529 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
|
530 a is now branch head of A, but not a topological head |
12279 | 531 |
532 $ hg clone . inner | |
533 updating to branch B | |
534 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
535 $ cd inner | |
536 $ hg up B | |
537 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
538 $ echo b1 >b1 | |
539 $ hg ci -Amb1 | |
540 adding b1 | |
541 | |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
542 in the clone b1 is now the head of B |
12279 | 543 |
544 $ cd .. | |
545 $ hg up 0 | |
546 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
547 $ echo a2 >a2 | |
548 $ hg ci -Ama2 | |
549 adding a2 | |
550 | |
12785
c7d23b4ca4ba
check-code: warning and fixes for whitespace in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12399
diff
changeset
|
551 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
|
552 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
|
553 A, not B |
12279 | 554 |
555 glog of local: | |
556 | |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20051
diff
changeset
|
557 $ hg log -G --template "{rev}: {branches} {desc}\n" |
12279 | 558 @ 2: A a2 |
559 | | |
560 | o 1: B b | |
561 |/ | |
562 o 0: A a | |
563 | |
564 glog of remote: | |
565 | |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20051
diff
changeset
|
566 $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
12279 | 567 @ 2: B b1 |
568 | | |
569 o 1: B b | |
570 | | |
571 o 0: A a | |
572 | |
573 outgoing: | |
574 | |
575 $ hg out inner --template "{rev}: {branches} {desc}\n" | |
576 comparing with inner | |
577 searching for changes | |
578 2: A a2 | |
579 | |
580 $ hg push inner | |
581 pushing to inner | |
582 searching for changes | |
583 adding changesets | |
584 adding manifests | |
585 adding file changes | |
586 added 1 changesets with 1 changes to 1 files (+1 heads) | |
587 | |
588 $ cd .. | |
589 | |
590 | |
591 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
|
592 |
12279 | 593 $ hg init o |
594 $ cd o | |
595 $ hg branch A | |
596 marked working directory as branch A | |
15615 | 597 (branches are permanent and global, did you want a bookmark?) |
12279 | 598 $ echo a >a |
599 $ hg ci -Ama | |
600 adding a | |
601 $ hg branch B | |
602 marked working directory as branch B | |
15615 | 603 (branches are permanent and global, did you want a bookmark?) |
12279 | 604 $ echo b >b |
605 $ hg ci -Amb | |
606 adding b | |
607 | |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
608 b is now branch head of B, and a topological head |
12279 | 609 |
610 $ hg up 0 | |
611 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
612 $ echo a1 >a1 | |
613 $ hg ci -Ama1 | |
614 adding a1 | |
615 | |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
616 a1 is now branch head of A, and a topological head |
12279 | 617 |
618 $ hg clone . inner | |
619 updating to branch A | |
620 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
621 $ cd inner | |
622 $ hg up B | |
623 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
624 $ echo b1 >b1 | |
625 $ hg ci -Amb1 | |
626 adding b1 | |
627 | |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
628 in the clone b1 is now the head of B |
12279 | 629 |
630 $ cd .. | |
631 $ echo a2 >a2 | |
632 $ hg ci -Ama2 | |
633 adding a2 | |
634 | |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
635 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
|
636 it replaces a former topological and branch head, so this should not warn |
12279 | 637 |
638 glog of local: | |
639 | |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20051
diff
changeset
|
640 $ hg log -G --template "{rev}: {branches} {desc}\n" |
12279 | 641 @ 3: A a2 |
642 | | |
643 o 2: A a1 | |
644 | | |
645 | o 1: B b | |
646 |/ | |
647 o 0: A a | |
648 | |
649 glog of remote: | |
650 | |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20051
diff
changeset
|
651 $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
12279 | 652 @ 3: B b1 |
653 | | |
654 | o 2: A a1 | |
655 | | | |
656 o | 1: B b | |
657 |/ | |
658 o 0: A a | |
659 | |
660 outgoing: | |
661 | |
662 $ hg out inner --template "{rev}: {branches} {desc}\n" | |
663 comparing with inner | |
664 searching for changes | |
665 3: A a2 | |
666 | |
667 $ hg push inner | |
668 pushing to inner | |
669 searching for changes | |
670 adding changesets | |
671 adding manifests | |
672 adding file changes | |
673 added 1 changesets with 1 changes to 1 files | |
674 | |
675 $ cd .. | |
676 | |
677 | |
678 Check prepush with new branch head and new child of former branch head | |
679 but child is on different branch: | |
680 | |
681 $ hg init p | |
682 $ cd p | |
683 $ hg branch A | |
684 marked working directory as branch A | |
15615 | 685 (branches are permanent and global, did you want a bookmark?) |
12279 | 686 $ echo a0 >a |
687 $ hg ci -Ama0 | |
688 adding a | |
689 $ echo a1 >a | |
690 $ hg ci -ma1 | |
691 $ hg up null | |
692 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
693 $ hg branch B | |
694 marked working directory as branch B | |
15615 | 695 (branches are permanent and global, did you want a bookmark?) |
12279 | 696 $ echo b0 >b |
697 $ hg ci -Amb0 | |
698 adding b | |
699 $ echo b1 >b | |
700 $ hg ci -mb1 | |
701 | |
702 $ hg clone . inner | |
703 updating to branch B | |
704 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
|
705 |
12279 | 706 $ hg up A |
707 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
708 $ hg branch -f B | |
709 marked working directory as branch B | |
15615 | 710 (branches are permanent and global, did you want a bookmark?) |
12279 | 711 $ echo a3 >a |
712 $ hg ci -ma3 | |
713 created new head | |
714 $ hg up 3 | |
715 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
716 $ hg branch -f A | |
717 marked working directory as branch A | |
15615 | 718 (branches are permanent and global, did you want a bookmark?) |
12279 | 719 $ echo b3 >b |
720 $ hg ci -mb3 | |
721 created new head | |
10909
29a83fb8c067
prepush: add more test cases
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
10908
diff
changeset
|
722 |
12279 | 723 glog of local: |
724 | |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20051
diff
changeset
|
725 $ hg log -G --template "{rev}: {branches} {desc}\n" |
12279 | 726 @ 5: A b3 |
727 | | |
728 | o 4: B a3 | |
729 | | | |
730 o | 3: B b1 | |
731 | | | |
732 o | 2: B b0 | |
733 / | |
734 o 1: A a1 | |
735 | | |
736 o 0: A a0 | |
737 | |
738 glog of remote: | |
10909
29a83fb8c067
prepush: add more test cases
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
10908
diff
changeset
|
739 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20051
diff
changeset
|
740 $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
12279 | 741 @ 3: B b1 |
742 | | |
743 o 2: B b0 | |
744 | |
745 o 1: A a1 | |
746 | | |
747 o 0: A a0 | |
748 | |
749 outgoing: | |
750 | |
751 $ hg out inner --template "{rev}: {branches} {desc}\n" | |
752 comparing with inner | |
753 searching for changes | |
754 4: B a3 | |
755 5: A b3 | |
10909
29a83fb8c067
prepush: add more test cases
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
10908
diff
changeset
|
756 |
12279 | 757 $ hg push inner |
758 pushing to inner | |
759 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
|
760 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
|
761 (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
|
762 [255] |
10909
29a83fb8c067
prepush: add more test cases
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
10908
diff
changeset
|
763 |
12279 | 764 $ hg push inner -r4 -r5 |
765 pushing to inner | |
766 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
|
767 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
|
768 (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
|
769 [255] |
12279 | 770 |
771 $ hg in inner | |
772 comparing with inner | |
773 searching for changes | |
774 no changes found | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
775 [1] |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16023
diff
changeset
|
776 |
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16023
diff
changeset
|
777 $ cd .. |