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