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