Show More
@@ -1,782 +1,788 b'' | |||||
|
1 | $ cat << EOF >> $HGRCPATH | |||
|
2 | > [experimental] | |||
|
3 | > # drop me once bundle2 is the default, | |||
|
4 | > # added to get test change early. | |||
|
5 | > bundle2-exp = True | |||
|
6 | > EOF | |||
1 |
$ |
|
7 | $ hg init a | |
2 | $ cd a |
|
8 | $ cd a | |
3 | $ echo foo > t1 |
|
9 | $ echo foo > t1 | |
4 | $ hg add t1 |
|
10 | $ hg add t1 | |
5 | $ hg commit -m "1" |
|
11 | $ hg commit -m "1" | |
6 |
|
12 | |||
7 | $ cd .. |
|
13 | $ cd .. | |
8 | $ hg clone a b |
|
14 | $ hg clone a b | |
9 | updating to branch default |
|
15 | updating to branch default | |
10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
11 |
|
17 | |||
12 | $ cd a |
|
18 | $ cd a | |
13 | $ echo foo > t2 |
|
19 | $ echo foo > t2 | |
14 | $ hg add t2 |
|
20 | $ hg add t2 | |
15 | $ hg commit -m "2" |
|
21 | $ hg commit -m "2" | |
16 |
|
22 | |||
17 | $ cd ../b |
|
23 | $ cd ../b | |
18 | $ echo foo > t3 |
|
24 | $ echo foo > t3 | |
19 | $ hg add t3 |
|
25 | $ hg add t3 | |
20 | $ hg commit -m "3" |
|
26 | $ hg commit -m "3" | |
21 |
|
27 | |||
22 | Specifying a revset that evaluates to null will abort |
|
28 | Specifying a revset that evaluates to null will abort | |
23 |
|
29 | |||
24 | $ hg push -r '0 & 1' ../a |
|
30 | $ hg push -r '0 & 1' ../a | |
25 | pushing to ../a |
|
31 | pushing to ../a | |
26 | abort: specified revisions evaluate to an empty set |
|
32 | abort: specified revisions evaluate to an empty set | |
27 | (use different revision arguments) |
|
33 | (use different revision arguments) | |
28 | [255] |
|
34 | [255] | |
29 |
|
35 | |||
30 | $ hg push ../a |
|
36 | $ hg push ../a | |
31 | pushing to ../a |
|
37 | pushing to ../a | |
32 | searching for changes |
|
38 | searching for changes | |
33 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a |
|
39 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a | |
34 | abort: push creates new remote head 1e108cc5548c! |
|
40 | abort: push creates new remote head 1e108cc5548c! | |
35 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
41 | (pull and merge or see "hg help push" for details about pushing new heads) | |
36 | [255] |
|
42 | [255] | |
37 |
|
43 | |||
38 | $ hg push --debug ../a |
|
44 | $ hg push --debug ../a | |
39 | pushing to ../a |
|
45 | pushing to ../a | |
40 | query 1; heads |
|
46 | query 1; heads | |
41 | searching for changes |
|
47 | searching for changes | |
42 | taking quick initial sample |
|
48 | taking quick initial sample | |
43 | query 2; still undecided: 1, sample size is: 1 |
|
49 | query 2; still undecided: 1, sample size is: 1 | |
44 | 2 total queries |
|
50 | 2 total queries | |
45 | listing keys for "phases" |
|
51 | listing keys for "phases" | |
46 | checking for updated bookmarks |
|
52 | checking for updated bookmarks | |
47 | listing keys for "bookmarks" |
|
53 | listing keys for "bookmarks" | |
48 | listing keys for "bookmarks" |
|
54 | listing keys for "bookmarks" | |
49 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a |
|
55 | remote has heads on branch 'default' that are not known locally: 1c9246a22a0a | |
50 | new remote heads on branch 'default': |
|
56 | new remote heads on branch 'default': | |
51 | 1e108cc5548c |
|
57 | 1e108cc5548c | |
52 | abort: push creates new remote head 1e108cc5548c! |
|
58 | abort: push creates new remote head 1e108cc5548c! | |
53 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
59 | (pull and merge or see "hg help push" for details about pushing new heads) | |
54 | [255] |
|
60 | [255] | |
55 |
|
61 | |||
56 | $ hg pull ../a |
|
62 | $ hg pull ../a | |
57 | pulling from ../a |
|
63 | pulling from ../a | |
58 | searching for changes |
|
64 | searching for changes | |
59 | adding changesets |
|
65 | adding changesets | |
60 | adding manifests |
|
66 | adding manifests | |
61 | adding file changes |
|
67 | adding file changes | |
62 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
68 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
63 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
69 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
64 |
|
70 | |||
65 | $ hg push ../a |
|
71 | $ hg push ../a | |
66 | pushing to ../a |
|
72 | pushing to ../a | |
67 | searching for changes |
|
73 | searching for changes | |
68 | abort: push creates new remote head 1e108cc5548c! |
|
74 | abort: push creates new remote head 1e108cc5548c! | |
69 | (merge or see "hg help push" for details about pushing new heads) |
|
75 | (merge or see "hg help push" for details about pushing new heads) | |
70 | [255] |
|
76 | [255] | |
71 |
|
77 | |||
72 | $ hg merge |
|
78 | $ hg merge | |
73 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
79 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
74 | (branch merge, don't forget to commit) |
|
80 | (branch merge, don't forget to commit) | |
75 |
|
81 | |||
76 | $ hg commit -m "4" |
|
82 | $ hg commit -m "4" | |
77 | $ hg push ../a |
|
83 | $ hg push ../a | |
78 | pushing to ../a |
|
84 | pushing to ../a | |
79 | searching for changes |
|
85 | searching for changes | |
80 | adding changesets |
|
86 | adding changesets | |
81 | adding manifests |
|
87 | adding manifests | |
82 | adding file changes |
|
88 | adding file changes | |
83 | added 2 changesets with 1 changes to 1 files |
|
89 | added 2 changesets with 1 changes to 1 files | |
84 |
|
90 | |||
85 | $ cd .. |
|
91 | $ cd .. | |
86 |
|
92 | |||
87 | $ hg init c |
|
93 | $ hg init c | |
88 | $ cd c |
|
94 | $ cd c | |
89 | $ for i in 0 1 2; do |
|
95 | $ for i in 0 1 2; do | |
90 | > echo $i >> foo |
|
96 | > echo $i >> foo | |
91 | > hg ci -Am $i |
|
97 | > hg ci -Am $i | |
92 | > done |
|
98 | > done | |
93 | adding foo |
|
99 | adding foo | |
94 | $ cd .. |
|
100 | $ cd .. | |
95 |
|
101 | |||
96 | $ hg clone c d |
|
102 | $ hg clone c d | |
97 | updating to branch default |
|
103 | updating to branch default | |
98 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
104 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
99 |
|
105 | |||
100 | $ cd d |
|
106 | $ cd d | |
101 | $ for i in 0 1; do |
|
107 | $ for i in 0 1; do | |
102 | > hg co -C $i |
|
108 | > hg co -C $i | |
103 | > echo d-$i >> foo |
|
109 | > echo d-$i >> foo | |
104 | > hg ci -m d-$i |
|
110 | > hg ci -m d-$i | |
105 | > done |
|
111 | > done | |
106 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
112 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
107 | created new head |
|
113 | created new head | |
108 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
114 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
109 | created new head |
|
115 | created new head | |
110 |
|
116 | |||
111 | $ HGMERGE=true hg merge 3 |
|
117 | $ HGMERGE=true hg merge 3 | |
112 | merging foo |
|
118 | merging foo | |
113 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
119 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
114 | (branch merge, don't forget to commit) |
|
120 | (branch merge, don't forget to commit) | |
115 |
|
121 | |||
116 | $ hg ci -m c-d |
|
122 | $ hg ci -m c-d | |
117 |
|
123 | |||
118 | $ hg push ../c |
|
124 | $ hg push ../c | |
119 | pushing to ../c |
|
125 | pushing to ../c | |
120 | searching for changes |
|
126 | searching for changes | |
121 | abort: push creates new remote head 6346d66eb9f5! |
|
127 | abort: push creates new remote head 6346d66eb9f5! | |
122 | (merge or see "hg help push" for details about pushing new heads) |
|
128 | (merge or see "hg help push" for details about pushing new heads) | |
123 | [255] |
|
129 | [255] | |
124 |
|
130 | |||
125 | $ hg push -r 2 ../c |
|
131 | $ hg push -r 2 ../c | |
126 | pushing to ../c |
|
132 | pushing to ../c | |
127 | searching for changes |
|
133 | searching for changes | |
128 | no changes found |
|
134 | no changes found | |
129 | [1] |
|
135 | [1] | |
130 |
|
136 | |||
131 | $ hg push -r 3 ../c |
|
137 | $ hg push -r 3 ../c | |
132 | pushing to ../c |
|
138 | pushing to ../c | |
133 | searching for changes |
|
139 | searching for changes | |
134 | abort: push creates new remote head a5dda829a167! |
|
140 | abort: push creates new remote head a5dda829a167! | |
135 | (merge or see "hg help push" for details about pushing new heads) |
|
141 | (merge or see "hg help push" for details about pushing new heads) | |
136 | [255] |
|
142 | [255] | |
137 |
|
143 | |||
138 | $ hg push -v -r 3 -r 4 ../c |
|
144 | $ hg push -v -r 3 -r 4 ../c | |
139 | pushing to ../c |
|
145 | pushing to ../c | |
140 | searching for changes |
|
146 | searching for changes | |
141 | new remote heads on branch 'default': |
|
147 | new remote heads on branch 'default': | |
142 | a5dda829a167 |
|
148 | a5dda829a167 | |
143 | ee8fbc7a0295 |
|
149 | ee8fbc7a0295 | |
144 | abort: push creates new remote head a5dda829a167! |
|
150 | abort: push creates new remote head a5dda829a167! | |
145 | (merge or see "hg help push" for details about pushing new heads) |
|
151 | (merge or see "hg help push" for details about pushing new heads) | |
146 | [255] |
|
152 | [255] | |
147 |
|
153 | |||
148 | $ hg push -v -f -r 3 -r 4 ../c |
|
154 | $ hg push -v -f -r 3 -r 4 ../c | |
149 | pushing to ../c |
|
155 | pushing to ../c | |
150 | searching for changes |
|
156 | searching for changes | |
151 | 2 changesets found |
|
157 | 2 changesets found | |
152 | uncompressed size of bundle content: |
|
158 | uncompressed size of bundle content: | |
153 |
3 |
|
159 | 348 (changelog) | |
154 |
2 |
|
160 | 326 (manifests) | |
155 |
2 |
|
161 | 253 foo | |
156 | adding changesets |
|
162 | adding changesets | |
157 | adding manifests |
|
163 | adding manifests | |
158 | adding file changes |
|
164 | adding file changes | |
159 | added 2 changesets with 2 changes to 1 files (+2 heads) |
|
165 | added 2 changesets with 2 changes to 1 files (+2 heads) | |
160 |
|
166 | |||
161 | $ hg push -r 5 ../c |
|
167 | $ hg push -r 5 ../c | |
162 | pushing to ../c |
|
168 | pushing to ../c | |
163 | searching for changes |
|
169 | searching for changes | |
164 | adding changesets |
|
170 | adding changesets | |
165 | adding manifests |
|
171 | adding manifests | |
166 | adding file changes |
|
172 | adding file changes | |
167 | added 1 changesets with 1 changes to 1 files (-1 heads) |
|
173 | added 1 changesets with 1 changes to 1 files (-1 heads) | |
168 |
|
174 | |||
169 | $ hg in ../c |
|
175 | $ hg in ../c | |
170 | comparing with ../c |
|
176 | comparing with ../c | |
171 | searching for changes |
|
177 | searching for changes | |
172 | no changes found |
|
178 | no changes found | |
173 | [1] |
|
179 | [1] | |
174 |
|
180 | |||
175 |
|
181 | |||
176 | Issue450: push -r warns about remote head creation even if no heads |
|
182 | Issue450: push -r warns about remote head creation even if no heads | |
177 | will be created |
|
183 | will be created | |
178 |
|
184 | |||
179 | $ hg init ../e |
|
185 | $ hg init ../e | |
180 | $ hg push -r 0 ../e |
|
186 | $ hg push -r 0 ../e | |
181 | pushing to ../e |
|
187 | pushing to ../e | |
182 | searching for changes |
|
188 | searching for changes | |
183 | adding changesets |
|
189 | adding changesets | |
184 | adding manifests |
|
190 | adding manifests | |
185 | adding file changes |
|
191 | adding file changes | |
186 | added 1 changesets with 1 changes to 1 files |
|
192 | added 1 changesets with 1 changes to 1 files | |
187 |
|
193 | |||
188 | $ hg push -r 1 ../e |
|
194 | $ hg push -r 1 ../e | |
189 | pushing to ../e |
|
195 | pushing to ../e | |
190 | searching for changes |
|
196 | searching for changes | |
191 | adding changesets |
|
197 | adding changesets | |
192 | adding manifests |
|
198 | adding manifests | |
193 | adding file changes |
|
199 | adding file changes | |
194 | added 1 changesets with 1 changes to 1 files |
|
200 | added 1 changesets with 1 changes to 1 files | |
195 |
|
201 | |||
196 | $ cd .. |
|
202 | $ cd .. | |
197 |
|
203 | |||
198 |
|
204 | |||
199 | Issue736: named branches are not considered for detection of |
|
205 | Issue736: named branches are not considered for detection of | |
200 | unmerged heads in "hg push" |
|
206 | unmerged heads in "hg push" | |
201 |
|
207 | |||
202 | $ hg init f |
|
208 | $ hg init f | |
203 | $ cd f |
|
209 | $ cd f | |
204 | $ hg -q branch a |
|
210 | $ hg -q branch a | |
205 | $ echo 0 > foo |
|
211 | $ echo 0 > foo | |
206 | $ hg -q ci -Am 0 |
|
212 | $ hg -q ci -Am 0 | |
207 | $ echo 1 > foo |
|
213 | $ echo 1 > foo | |
208 | $ hg -q ci -m 1 |
|
214 | $ hg -q ci -m 1 | |
209 | $ hg -q up 0 |
|
215 | $ hg -q up 0 | |
210 | $ echo 2 > foo |
|
216 | $ echo 2 > foo | |
211 | $ hg -q ci -m 2 |
|
217 | $ hg -q ci -m 2 | |
212 | $ hg -q up 0 |
|
218 | $ hg -q up 0 | |
213 | $ hg -q branch b |
|
219 | $ hg -q branch b | |
214 | $ echo 3 > foo |
|
220 | $ echo 3 > foo | |
215 | $ hg -q ci -m 3 |
|
221 | $ hg -q ci -m 3 | |
216 | $ cd .. |
|
222 | $ cd .. | |
217 |
|
223 | |||
218 | $ hg -q clone f g |
|
224 | $ hg -q clone f g | |
219 | $ cd g |
|
225 | $ cd g | |
220 |
|
226 | |||
221 | Push on existing branch and new branch: |
|
227 | Push on existing branch and new branch: | |
222 |
|
228 | |||
223 | $ hg -q up 1 |
|
229 | $ hg -q up 1 | |
224 | $ echo 4 > foo |
|
230 | $ echo 4 > foo | |
225 | $ hg -q ci -m 4 |
|
231 | $ hg -q ci -m 4 | |
226 | $ hg -q up 0 |
|
232 | $ hg -q up 0 | |
227 | $ echo 5 > foo |
|
233 | $ echo 5 > foo | |
228 | $ hg -q branch c |
|
234 | $ hg -q branch c | |
229 | $ hg -q ci -m 5 |
|
235 | $ hg -q ci -m 5 | |
230 |
|
236 | |||
231 | $ hg push ../f |
|
237 | $ hg push ../f | |
232 | pushing to ../f |
|
238 | pushing to ../f | |
233 | searching for changes |
|
239 | searching for changes | |
234 | abort: push creates new remote branches: c! |
|
240 | abort: push creates new remote branches: c! | |
235 | (use 'hg push --new-branch' to create new remote branches) |
|
241 | (use 'hg push --new-branch' to create new remote branches) | |
236 | [255] |
|
242 | [255] | |
237 |
|
243 | |||
238 | $ hg push -r 4 -r 5 ../f |
|
244 | $ hg push -r 4 -r 5 ../f | |
239 | pushing to ../f |
|
245 | pushing to ../f | |
240 | searching for changes |
|
246 | searching for changes | |
241 | abort: push creates new remote branches: c! |
|
247 | abort: push creates new remote branches: c! | |
242 | (use 'hg push --new-branch' to create new remote branches) |
|
248 | (use 'hg push --new-branch' to create new remote branches) | |
243 | [255] |
|
249 | [255] | |
244 |
|
250 | |||
245 |
|
251 | |||
246 | Multiple new branches: |
|
252 | Multiple new branches: | |
247 |
|
253 | |||
248 | $ hg -q branch d |
|
254 | $ hg -q branch d | |
249 | $ echo 6 > foo |
|
255 | $ echo 6 > foo | |
250 | $ hg -q ci -m 6 |
|
256 | $ hg -q ci -m 6 | |
251 |
|
257 | |||
252 | $ hg push ../f |
|
258 | $ hg push ../f | |
253 | pushing to ../f |
|
259 | pushing to ../f | |
254 | searching for changes |
|
260 | searching for changes | |
255 | abort: push creates new remote branches: c, d! |
|
261 | abort: push creates new remote branches: c, d! | |
256 | (use 'hg push --new-branch' to create new remote branches) |
|
262 | (use 'hg push --new-branch' to create new remote branches) | |
257 | [255] |
|
263 | [255] | |
258 |
|
264 | |||
259 | $ hg push -r 4 -r 6 ../f |
|
265 | $ hg push -r 4 -r 6 ../f | |
260 | pushing to ../f |
|
266 | pushing to ../f | |
261 | searching for changes |
|
267 | searching for changes | |
262 | abort: push creates new remote branches: c, d! |
|
268 | abort: push creates new remote branches: c, d! | |
263 | (use 'hg push --new-branch' to create new remote branches) |
|
269 | (use 'hg push --new-branch' to create new remote branches) | |
264 | [255] |
|
270 | [255] | |
265 |
|
271 | |||
266 | $ cd ../g |
|
272 | $ cd ../g | |
267 |
|
273 | |||
268 |
|
274 | |||
269 | Fail on multiple head push: |
|
275 | Fail on multiple head push: | |
270 |
|
276 | |||
271 | $ hg -q up 1 |
|
277 | $ hg -q up 1 | |
272 | $ echo 7 > foo |
|
278 | $ echo 7 > foo | |
273 | $ hg -q ci -m 7 |
|
279 | $ hg -q ci -m 7 | |
274 |
|
280 | |||
275 | $ hg push -r 4 -r 7 ../f |
|
281 | $ hg push -r 4 -r 7 ../f | |
276 | pushing to ../f |
|
282 | pushing to ../f | |
277 | searching for changes |
|
283 | searching for changes | |
278 | abort: push creates new remote head 0b715ef6ff8f on branch 'a'! |
|
284 | abort: push creates new remote head 0b715ef6ff8f on branch 'a'! | |
279 | (merge or see "hg help push" for details about pushing new heads) |
|
285 | (merge or see "hg help push" for details about pushing new heads) | |
280 | [255] |
|
286 | [255] | |
281 |
|
287 | |||
282 | Push replacement head on existing branches: |
|
288 | Push replacement head on existing branches: | |
283 |
|
289 | |||
284 | $ hg -q up 3 |
|
290 | $ hg -q up 3 | |
285 | $ echo 8 > foo |
|
291 | $ echo 8 > foo | |
286 | $ hg -q ci -m 8 |
|
292 | $ hg -q ci -m 8 | |
287 |
|
293 | |||
288 | $ hg push -r 7 -r 8 ../f |
|
294 | $ hg push -r 7 -r 8 ../f | |
289 | pushing to ../f |
|
295 | pushing to ../f | |
290 | searching for changes |
|
296 | searching for changes | |
291 | adding changesets |
|
297 | adding changesets | |
292 | adding manifests |
|
298 | adding manifests | |
293 | adding file changes |
|
299 | adding file changes | |
294 | added 2 changesets with 2 changes to 1 files |
|
300 | added 2 changesets with 2 changes to 1 files | |
295 |
|
301 | |||
296 |
|
302 | |||
297 | Merge of branch a to other branch b followed by unrelated push |
|
303 | Merge of branch a to other branch b followed by unrelated push | |
298 | on branch a: |
|
304 | on branch a: | |
299 |
|
305 | |||
300 | $ hg -q up 7 |
|
306 | $ hg -q up 7 | |
301 | $ HGMERGE=true hg -q merge 8 |
|
307 | $ HGMERGE=true hg -q merge 8 | |
302 | $ hg -q ci -m 9 |
|
308 | $ hg -q ci -m 9 | |
303 | $ hg -q up 8 |
|
309 | $ hg -q up 8 | |
304 | $ echo 10 > foo |
|
310 | $ echo 10 > foo | |
305 | $ hg -q ci -m 10 |
|
311 | $ hg -q ci -m 10 | |
306 |
|
312 | |||
307 | $ hg push -r 9 ../f |
|
313 | $ hg push -r 9 ../f | |
308 | pushing to ../f |
|
314 | pushing to ../f | |
309 | searching for changes |
|
315 | searching for changes | |
310 | adding changesets |
|
316 | adding changesets | |
311 | adding manifests |
|
317 | adding manifests | |
312 | adding file changes |
|
318 | adding file changes | |
313 | added 1 changesets with 1 changes to 1 files (-1 heads) |
|
319 | added 1 changesets with 1 changes to 1 files (-1 heads) | |
314 |
|
320 | |||
315 | $ hg push -r 10 ../f |
|
321 | $ hg push -r 10 ../f | |
316 | pushing to ../f |
|
322 | pushing to ../f | |
317 | searching for changes |
|
323 | searching for changes | |
318 | adding changesets |
|
324 | adding changesets | |
319 | adding manifests |
|
325 | adding manifests | |
320 | adding file changes |
|
326 | adding file changes | |
321 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
327 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
322 |
|
328 | |||
323 |
|
329 | |||
324 | Cheating the counting algorithm: |
|
330 | Cheating the counting algorithm: | |
325 |
|
331 | |||
326 | $ hg -q up 9 |
|
332 | $ hg -q up 9 | |
327 | $ HGMERGE=true hg -q merge 2 |
|
333 | $ HGMERGE=true hg -q merge 2 | |
328 | $ hg -q ci -m 11 |
|
334 | $ hg -q ci -m 11 | |
329 | $ hg -q up 1 |
|
335 | $ hg -q up 1 | |
330 | $ echo 12 > foo |
|
336 | $ echo 12 > foo | |
331 | $ hg -q ci -m 12 |
|
337 | $ hg -q ci -m 12 | |
332 |
|
338 | |||
333 | $ hg push -r 11 -r 12 ../f |
|
339 | $ hg push -r 11 -r 12 ../f | |
334 | pushing to ../f |
|
340 | pushing to ../f | |
335 | searching for changes |
|
341 | searching for changes | |
336 | adding changesets |
|
342 | adding changesets | |
337 | adding manifests |
|
343 | adding manifests | |
338 | adding file changes |
|
344 | adding file changes | |
339 | added 2 changesets with 2 changes to 1 files |
|
345 | added 2 changesets with 2 changes to 1 files | |
340 |
|
346 | |||
341 |
|
347 | |||
342 | Failed push of new named branch: |
|
348 | Failed push of new named branch: | |
343 |
|
349 | |||
344 | $ echo 12 > foo |
|
350 | $ echo 12 > foo | |
345 | $ hg -q ci -m 12a |
|
351 | $ hg -q ci -m 12a | |
346 | [1] |
|
352 | [1] | |
347 | $ hg -q up 11 |
|
353 | $ hg -q up 11 | |
348 | $ echo 13 > foo |
|
354 | $ echo 13 > foo | |
349 | $ hg -q branch e |
|
355 | $ hg -q branch e | |
350 | $ hg -q ci -m 13d |
|
356 | $ hg -q ci -m 13d | |
351 |
|
357 | |||
352 | $ hg push -r 12 -r 13 ../f |
|
358 | $ hg push -r 12 -r 13 ../f | |
353 | pushing to ../f |
|
359 | pushing to ../f | |
354 | searching for changes |
|
360 | searching for changes | |
355 | abort: push creates new remote branches: e! |
|
361 | abort: push creates new remote branches: e! | |
356 | (use 'hg push --new-branch' to create new remote branches) |
|
362 | (use 'hg push --new-branch' to create new remote branches) | |
357 | [255] |
|
363 | [255] | |
358 |
|
364 | |||
359 |
|
365 | |||
360 | Using --new-branch to push new named branch: |
|
366 | Using --new-branch to push new named branch: | |
361 |
|
367 | |||
362 | $ hg push --new-branch -r 12 -r 13 ../f |
|
368 | $ hg push --new-branch -r 12 -r 13 ../f | |
363 | pushing to ../f |
|
369 | pushing to ../f | |
364 | searching for changes |
|
370 | searching for changes | |
365 | adding changesets |
|
371 | adding changesets | |
366 | adding manifests |
|
372 | adding manifests | |
367 | adding file changes |
|
373 | adding file changes | |
368 | added 1 changesets with 1 changes to 1 files |
|
374 | added 1 changesets with 1 changes to 1 files | |
369 |
|
375 | |||
370 | Pushing multi headed new branch: |
|
376 | Pushing multi headed new branch: | |
371 |
|
377 | |||
372 | $ echo 14 > foo |
|
378 | $ echo 14 > foo | |
373 | $ hg -q branch f |
|
379 | $ hg -q branch f | |
374 | $ hg -q ci -m 14 |
|
380 | $ hg -q ci -m 14 | |
375 | $ echo 15 > foo |
|
381 | $ echo 15 > foo | |
376 | $ hg -q ci -m 15 |
|
382 | $ hg -q ci -m 15 | |
377 | $ hg -q up 14 |
|
383 | $ hg -q up 14 | |
378 | $ echo 16 > foo |
|
384 | $ echo 16 > foo | |
379 | $ hg -q ci -m 16 |
|
385 | $ hg -q ci -m 16 | |
380 | $ hg push --branch f --new-branch ../f |
|
386 | $ hg push --branch f --new-branch ../f | |
381 | pushing to ../f |
|
387 | pushing to ../f | |
382 | searching for changes |
|
388 | searching for changes | |
383 | abort: push creates new branch 'f' with multiple heads |
|
389 | abort: push creates new branch 'f' with multiple heads | |
384 | (merge or see "hg help push" for details about pushing new heads) |
|
390 | (merge or see "hg help push" for details about pushing new heads) | |
385 | [255] |
|
391 | [255] | |
386 | $ hg push --branch f --new-branch --force ../f |
|
392 | $ hg push --branch f --new-branch --force ../f | |
387 | pushing to ../f |
|
393 | pushing to ../f | |
388 | searching for changes |
|
394 | searching for changes | |
389 | adding changesets |
|
395 | adding changesets | |
390 | adding manifests |
|
396 | adding manifests | |
391 | adding file changes |
|
397 | adding file changes | |
392 | added 3 changesets with 3 changes to 1 files (+1 heads) |
|
398 | added 3 changesets with 3 changes to 1 files (+1 heads) | |
393 |
|
399 | |||
394 | Checking prepush logic does not allow silently pushing |
|
400 | Checking prepush logic does not allow silently pushing | |
395 | multiple new heads but also doesn't report too many heads: |
|
401 | multiple new heads but also doesn't report too many heads: | |
396 |
|
402 | |||
397 | $ cd .. |
|
403 | $ cd .. | |
398 | $ hg init h |
|
404 | $ hg init h | |
399 | $ echo init > h/init |
|
405 | $ echo init > h/init | |
400 | $ hg -R h ci -Am init |
|
406 | $ hg -R h ci -Am init | |
401 | adding init |
|
407 | adding init | |
402 | $ echo a > h/a |
|
408 | $ echo a > h/a | |
403 | $ hg -R h ci -Am a |
|
409 | $ hg -R h ci -Am a | |
404 | adding a |
|
410 | adding a | |
405 | $ hg clone h i |
|
411 | $ hg clone h i | |
406 | updating to branch default |
|
412 | updating to branch default | |
407 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
413 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
408 | $ hg -R h up 0 |
|
414 | $ hg -R h up 0 | |
409 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
415 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
410 | $ echo b > h/b |
|
416 | $ echo b > h/b | |
411 | $ hg -R h ci -Am b |
|
417 | $ hg -R h ci -Am b | |
412 | adding b |
|
418 | adding b | |
413 | created new head |
|
419 | created new head | |
414 | $ hg -R i up 0 |
|
420 | $ hg -R i up 0 | |
415 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
421 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
416 | $ echo c > i/c |
|
422 | $ echo c > i/c | |
417 | $ hg -R i ci -Am c |
|
423 | $ hg -R i ci -Am c | |
418 | adding c |
|
424 | adding c | |
419 | created new head |
|
425 | created new head | |
420 |
|
426 | |||
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 |
|
427 | $ 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 | |
422 |
|
428 | |||
423 | $ hg -R i push h |
|
429 | $ hg -R i push h | |
424 | pushing to h |
|
430 | pushing to h | |
425 | searching for changes |
|
431 | searching for changes | |
426 | remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
|
432 | remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 | |
427 | abort: push creates new remote head 97bd0c84d346! |
|
433 | abort: push creates new remote head 97bd0c84d346! | |
428 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
434 | (pull and merge or see "hg help push" for details about pushing new heads) | |
429 | [255] |
|
435 | [255] | |
430 | $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx |
|
436 | $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx | |
431 | $ hg -R i push h |
|
437 | $ hg -R i push h | |
432 | pushing to h |
|
438 | pushing to h | |
433 | searching for changes |
|
439 | searching for changes | |
434 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others |
|
440 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others | |
435 | abort: push creates new remote head 97bd0c84d346! |
|
441 | abort: push creates new remote head 97bd0c84d346! | |
436 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
442 | (pull and merge or see "hg help push" for details about pushing new heads) | |
437 | [255] |
|
443 | [255] | |
438 | $ hg -R i push h -v |
|
444 | $ hg -R i push h -v | |
439 | pushing to h |
|
445 | pushing to h | |
440 | searching for changes |
|
446 | searching for changes | |
441 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
|
447 | remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 | |
442 | new remote heads on branch 'default': |
|
448 | new remote heads on branch 'default': | |
443 | 97bd0c84d346 |
|
449 | 97bd0c84d346 | |
444 | abort: push creates new remote head 97bd0c84d346! |
|
450 | abort: push creates new remote head 97bd0c84d346! | |
445 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
451 | (pull and merge or see "hg help push" for details about pushing new heads) | |
446 | [255] |
|
452 | [255] | |
447 |
|
453 | |||
448 |
|
454 | |||
449 | Check prepush logic with merged branches: |
|
455 | Check prepush logic with merged branches: | |
450 |
|
456 | |||
451 | $ hg init j |
|
457 | $ hg init j | |
452 | $ hg -R j branch a |
|
458 | $ hg -R j branch a | |
453 | marked working directory as branch a |
|
459 | marked working directory as branch a | |
454 | (branches are permanent and global, did you want a bookmark?) |
|
460 | (branches are permanent and global, did you want a bookmark?) | |
455 | $ echo init > j/foo |
|
461 | $ echo init > j/foo | |
456 | $ hg -R j ci -Am init |
|
462 | $ hg -R j ci -Am init | |
457 | adding foo |
|
463 | adding foo | |
458 | $ hg clone j k |
|
464 | $ hg clone j k | |
459 | updating to branch a |
|
465 | updating to branch a | |
460 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
466 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
461 | $ echo a1 > j/foo |
|
467 | $ echo a1 > j/foo | |
462 | $ hg -R j ci -m a1 |
|
468 | $ hg -R j ci -m a1 | |
463 | $ hg -R k branch b |
|
469 | $ hg -R k branch b | |
464 | marked working directory as branch b |
|
470 | marked working directory as branch b | |
465 | $ echo b > k/foo |
|
471 | $ echo b > k/foo | |
466 | $ hg -R k ci -m b |
|
472 | $ hg -R k ci -m b | |
467 | $ hg -R k up 0 |
|
473 | $ hg -R k up 0 | |
468 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
474 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
469 |
|
475 | |||
470 | $ hg -R k merge b |
|
476 | $ hg -R k merge b | |
471 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
477 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
472 | (branch merge, don't forget to commit) |
|
478 | (branch merge, don't forget to commit) | |
473 |
|
479 | |||
474 | $ hg -R k ci -m merge |
|
480 | $ hg -R k ci -m merge | |
475 |
|
481 | |||
476 | $ hg -R k push -r a j |
|
482 | $ hg -R k push -r a j | |
477 | pushing to j |
|
483 | pushing to j | |
478 | searching for changes |
|
484 | searching for changes | |
479 | abort: push creates new remote branches: b! |
|
485 | abort: push creates new remote branches: b! | |
480 | (use 'hg push --new-branch' to create new remote branches) |
|
486 | (use 'hg push --new-branch' to create new remote branches) | |
481 | [255] |
|
487 | [255] | |
482 |
|
488 | |||
483 |
|
489 | |||
484 | Prepush -r should not allow you to sneak in new heads: |
|
490 | Prepush -r should not allow you to sneak in new heads: | |
485 |
|
491 | |||
486 | $ hg init l |
|
492 | $ hg init l | |
487 | $ cd l |
|
493 | $ cd l | |
488 | $ echo a >> foo |
|
494 | $ echo a >> foo | |
489 | $ hg -q add foo |
|
495 | $ hg -q add foo | |
490 | $ hg -q branch a |
|
496 | $ hg -q branch a | |
491 | $ hg -q ci -ma |
|
497 | $ hg -q ci -ma | |
492 | $ hg -q up null |
|
498 | $ hg -q up null | |
493 | $ echo a >> foo |
|
499 | $ echo a >> foo | |
494 | $ hg -q add foo |
|
500 | $ hg -q add foo | |
495 | $ hg -q branch b |
|
501 | $ hg -q branch b | |
496 | $ hg -q ci -mb |
|
502 | $ hg -q ci -mb | |
497 | $ cd .. |
|
503 | $ cd .. | |
498 | $ hg -q clone l m -u a |
|
504 | $ hg -q clone l m -u a | |
499 | $ cd m |
|
505 | $ cd m | |
500 | $ hg -q merge b |
|
506 | $ hg -q merge b | |
501 | $ hg -q ci -mmb |
|
507 | $ hg -q ci -mmb | |
502 | $ hg -q up 0 |
|
508 | $ hg -q up 0 | |
503 | $ echo a >> foo |
|
509 | $ echo a >> foo | |
504 | $ hg -q ci -ma2 |
|
510 | $ hg -q ci -ma2 | |
505 | $ hg -q up 2 |
|
511 | $ hg -q up 2 | |
506 | $ echo a >> foo |
|
512 | $ echo a >> foo | |
507 | $ hg -q branch -f b |
|
513 | $ hg -q branch -f b | |
508 | $ hg -q ci -mb2 |
|
514 | $ hg -q ci -mb2 | |
509 | $ hg -q merge 3 |
|
515 | $ hg -q merge 3 | |
510 | $ hg -q ci -mma |
|
516 | $ hg -q ci -mma | |
511 |
|
517 | |||
512 | $ hg push ../l -b b |
|
518 | $ hg push ../l -b b | |
513 | pushing to ../l |
|
519 | pushing to ../l | |
514 | searching for changes |
|
520 | searching for changes | |
515 | abort: push creates new remote head 451211cc22b0 on branch 'a'! |
|
521 | abort: push creates new remote head 451211cc22b0 on branch 'a'! | |
516 | (merge or see "hg help push" for details about pushing new heads) |
|
522 | (merge or see "hg help push" for details about pushing new heads) | |
517 | [255] |
|
523 | [255] | |
518 |
|
524 | |||
519 | $ cd .. |
|
525 | $ cd .. | |
520 |
|
526 | |||
521 |
|
527 | |||
522 | Check prepush with new branch head on former topo non-head: |
|
528 | Check prepush with new branch head on former topo non-head: | |
523 |
|
529 | |||
524 | $ hg init n |
|
530 | $ hg init n | |
525 | $ cd n |
|
531 | $ cd n | |
526 | $ hg branch A |
|
532 | $ hg branch A | |
527 | marked working directory as branch A |
|
533 | marked working directory as branch A | |
528 | (branches are permanent and global, did you want a bookmark?) |
|
534 | (branches are permanent and global, did you want a bookmark?) | |
529 | $ echo a >a |
|
535 | $ echo a >a | |
530 | $ hg ci -Ama |
|
536 | $ hg ci -Ama | |
531 | adding a |
|
537 | adding a | |
532 | $ hg branch B |
|
538 | $ hg branch B | |
533 | marked working directory as branch B |
|
539 | marked working directory as branch B | |
534 | $ echo b >b |
|
540 | $ echo b >b | |
535 | $ hg ci -Amb |
|
541 | $ hg ci -Amb | |
536 | adding b |
|
542 | adding b | |
537 |
|
543 | |||
538 | b is now branch head of B, and a topological head |
|
544 | b is now branch head of B, and a topological head | |
539 | a is now branch head of A, but not a topological head |
|
545 | a is now branch head of A, but not a topological head | |
540 |
|
546 | |||
541 | $ hg clone . inner |
|
547 | $ hg clone . inner | |
542 | updating to branch B |
|
548 | updating to branch B | |
543 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
549 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
544 | $ cd inner |
|
550 | $ cd inner | |
545 | $ hg up B |
|
551 | $ hg up B | |
546 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
552 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
547 | $ echo b1 >b1 |
|
553 | $ echo b1 >b1 | |
548 | $ hg ci -Amb1 |
|
554 | $ hg ci -Amb1 | |
549 | adding b1 |
|
555 | adding b1 | |
550 |
|
556 | |||
551 | in the clone b1 is now the head of B |
|
557 | in the clone b1 is now the head of B | |
552 |
|
558 | |||
553 | $ cd .. |
|
559 | $ cd .. | |
554 | $ hg up 0 |
|
560 | $ hg up 0 | |
555 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
561 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
556 | $ echo a2 >a2 |
|
562 | $ echo a2 >a2 | |
557 | $ hg ci -Ama2 |
|
563 | $ hg ci -Ama2 | |
558 | adding a2 |
|
564 | adding a2 | |
559 |
|
565 | |||
560 | a2 is now the new branch head of A, and a new topological head |
|
566 | a2 is now the new branch head of A, and a new topological head | |
561 | it replaces a former inner branch head, so it should at most warn about |
|
567 | it replaces a former inner branch head, so it should at most warn about | |
562 | A, not B |
|
568 | A, not B | |
563 |
|
569 | |||
564 | glog of local: |
|
570 | glog of local: | |
565 |
|
571 | |||
566 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
572 | $ hg log -G --template "{rev}: {branches} {desc}\n" | |
567 | @ 2: A a2 |
|
573 | @ 2: A a2 | |
568 | | |
|
574 | | | |
569 | | o 1: B b |
|
575 | | o 1: B b | |
570 | |/ |
|
576 | |/ | |
571 | o 0: A a |
|
577 | o 0: A a | |
572 |
|
578 | |||
573 | glog of remote: |
|
579 | glog of remote: | |
574 |
|
580 | |||
575 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
581 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" | |
576 | @ 2: B b1 |
|
582 | @ 2: B b1 | |
577 | | |
|
583 | | | |
578 | o 1: B b |
|
584 | o 1: B b | |
579 | | |
|
585 | | | |
580 | o 0: A a |
|
586 | o 0: A a | |
581 |
|
587 | |||
582 | outgoing: |
|
588 | outgoing: | |
583 |
|
589 | |||
584 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
590 | $ hg out inner --template "{rev}: {branches} {desc}\n" | |
585 | comparing with inner |
|
591 | comparing with inner | |
586 | searching for changes |
|
592 | searching for changes | |
587 | 2: A a2 |
|
593 | 2: A a2 | |
588 |
|
594 | |||
589 | $ hg push inner |
|
595 | $ hg push inner | |
590 | pushing to inner |
|
596 | pushing to inner | |
591 | searching for changes |
|
597 | searching for changes | |
592 | adding changesets |
|
598 | adding changesets | |
593 | adding manifests |
|
599 | adding manifests | |
594 | adding file changes |
|
600 | adding file changes | |
595 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
601 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
596 |
|
602 | |||
597 | $ cd .. |
|
603 | $ cd .. | |
598 |
|
604 | |||
599 |
|
605 | |||
600 | Check prepush with new branch head on former topo head: |
|
606 | Check prepush with new branch head on former topo head: | |
601 |
|
607 | |||
602 | $ hg init o |
|
608 | $ hg init o | |
603 | $ cd o |
|
609 | $ cd o | |
604 | $ hg branch A |
|
610 | $ hg branch A | |
605 | marked working directory as branch A |
|
611 | marked working directory as branch A | |
606 | (branches are permanent and global, did you want a bookmark?) |
|
612 | (branches are permanent and global, did you want a bookmark?) | |
607 | $ echo a >a |
|
613 | $ echo a >a | |
608 | $ hg ci -Ama |
|
614 | $ hg ci -Ama | |
609 | adding a |
|
615 | adding a | |
610 | $ hg branch B |
|
616 | $ hg branch B | |
611 | marked working directory as branch B |
|
617 | marked working directory as branch B | |
612 | $ echo b >b |
|
618 | $ echo b >b | |
613 | $ hg ci -Amb |
|
619 | $ hg ci -Amb | |
614 | adding b |
|
620 | adding b | |
615 |
|
621 | |||
616 | b is now branch head of B, and a topological head |
|
622 | b is now branch head of B, and a topological head | |
617 |
|
623 | |||
618 | $ hg up 0 |
|
624 | $ hg up 0 | |
619 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
625 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
620 | $ echo a1 >a1 |
|
626 | $ echo a1 >a1 | |
621 | $ hg ci -Ama1 |
|
627 | $ hg ci -Ama1 | |
622 | adding a1 |
|
628 | adding a1 | |
623 |
|
629 | |||
624 | a1 is now branch head of A, and a topological head |
|
630 | a1 is now branch head of A, and a topological head | |
625 |
|
631 | |||
626 | $ hg clone . inner |
|
632 | $ hg clone . inner | |
627 | updating to branch A |
|
633 | updating to branch A | |
628 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
634 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
629 | $ cd inner |
|
635 | $ cd inner | |
630 | $ hg up B |
|
636 | $ hg up B | |
631 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
637 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
632 | $ echo b1 >b1 |
|
638 | $ echo b1 >b1 | |
633 | $ hg ci -Amb1 |
|
639 | $ hg ci -Amb1 | |
634 | adding b1 |
|
640 | adding b1 | |
635 |
|
641 | |||
636 | in the clone b1 is now the head of B |
|
642 | in the clone b1 is now the head of B | |
637 |
|
643 | |||
638 | $ cd .. |
|
644 | $ cd .. | |
639 | $ echo a2 >a2 |
|
645 | $ echo a2 >a2 | |
640 | $ hg ci -Ama2 |
|
646 | $ hg ci -Ama2 | |
641 | adding a2 |
|
647 | adding a2 | |
642 |
|
648 | |||
643 | a2 is now the new branch head of A, and a topological head |
|
649 | a2 is now the new branch head of A, and a topological head | |
644 | it replaces a former topological and branch head, so this should not warn |
|
650 | it replaces a former topological and branch head, so this should not warn | |
645 |
|
651 | |||
646 | glog of local: |
|
652 | glog of local: | |
647 |
|
653 | |||
648 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
654 | $ hg log -G --template "{rev}: {branches} {desc}\n" | |
649 | @ 3: A a2 |
|
655 | @ 3: A a2 | |
650 | | |
|
656 | | | |
651 | o 2: A a1 |
|
657 | o 2: A a1 | |
652 | | |
|
658 | | | |
653 | | o 1: B b |
|
659 | | o 1: B b | |
654 | |/ |
|
660 | |/ | |
655 | o 0: A a |
|
661 | o 0: A a | |
656 |
|
662 | |||
657 | glog of remote: |
|
663 | glog of remote: | |
658 |
|
664 | |||
659 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
665 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" | |
660 | @ 3: B b1 |
|
666 | @ 3: B b1 | |
661 | | |
|
667 | | | |
662 | | o 2: A a1 |
|
668 | | o 2: A a1 | |
663 | | | |
|
669 | | | | |
664 | o | 1: B b |
|
670 | o | 1: B b | |
665 | |/ |
|
671 | |/ | |
666 | o 0: A a |
|
672 | o 0: A a | |
667 |
|
673 | |||
668 | outgoing: |
|
674 | outgoing: | |
669 |
|
675 | |||
670 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
676 | $ hg out inner --template "{rev}: {branches} {desc}\n" | |
671 | comparing with inner |
|
677 | comparing with inner | |
672 | searching for changes |
|
678 | searching for changes | |
673 | 3: A a2 |
|
679 | 3: A a2 | |
674 |
|
680 | |||
675 | $ hg push inner |
|
681 | $ hg push inner | |
676 | pushing to inner |
|
682 | pushing to inner | |
677 | searching for changes |
|
683 | searching for changes | |
678 | adding changesets |
|
684 | adding changesets | |
679 | adding manifests |
|
685 | adding manifests | |
680 | adding file changes |
|
686 | adding file changes | |
681 | added 1 changesets with 1 changes to 1 files |
|
687 | added 1 changesets with 1 changes to 1 files | |
682 |
|
688 | |||
683 | $ cd .. |
|
689 | $ cd .. | |
684 |
|
690 | |||
685 |
|
691 | |||
686 | Check prepush with new branch head and new child of former branch head |
|
692 | Check prepush with new branch head and new child of former branch head | |
687 | but child is on different branch: |
|
693 | but child is on different branch: | |
688 |
|
694 | |||
689 | $ hg init p |
|
695 | $ hg init p | |
690 | $ cd p |
|
696 | $ cd p | |
691 | $ hg branch A |
|
697 | $ hg branch A | |
692 | marked working directory as branch A |
|
698 | marked working directory as branch A | |
693 | (branches are permanent and global, did you want a bookmark?) |
|
699 | (branches are permanent and global, did you want a bookmark?) | |
694 | $ echo a0 >a |
|
700 | $ echo a0 >a | |
695 | $ hg ci -Ama0 |
|
701 | $ hg ci -Ama0 | |
696 | adding a |
|
702 | adding a | |
697 | $ echo a1 >a |
|
703 | $ echo a1 >a | |
698 | $ hg ci -ma1 |
|
704 | $ hg ci -ma1 | |
699 | $ hg up null |
|
705 | $ hg up null | |
700 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
706 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
701 | $ hg branch B |
|
707 | $ hg branch B | |
702 | marked working directory as branch B |
|
708 | marked working directory as branch B | |
703 | $ echo b0 >b |
|
709 | $ echo b0 >b | |
704 | $ hg ci -Amb0 |
|
710 | $ hg ci -Amb0 | |
705 | adding b |
|
711 | adding b | |
706 | $ echo b1 >b |
|
712 | $ echo b1 >b | |
707 | $ hg ci -mb1 |
|
713 | $ hg ci -mb1 | |
708 |
|
714 | |||
709 | $ hg clone . inner |
|
715 | $ hg clone . inner | |
710 | updating to branch B |
|
716 | updating to branch B | |
711 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
717 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
712 |
|
718 | |||
713 | $ hg up A |
|
719 | $ hg up A | |
714 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
720 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
715 | $ hg branch -f B |
|
721 | $ hg branch -f B | |
716 | marked working directory as branch B |
|
722 | marked working directory as branch B | |
717 | $ echo a3 >a |
|
723 | $ echo a3 >a | |
718 | $ hg ci -ma3 |
|
724 | $ hg ci -ma3 | |
719 | created new head |
|
725 | created new head | |
720 | $ hg up 3 |
|
726 | $ hg up 3 | |
721 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
727 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
722 | $ hg branch -f A |
|
728 | $ hg branch -f A | |
723 | marked working directory as branch A |
|
729 | marked working directory as branch A | |
724 | $ echo b3 >b |
|
730 | $ echo b3 >b | |
725 | $ hg ci -mb3 |
|
731 | $ hg ci -mb3 | |
726 | created new head |
|
732 | created new head | |
727 |
|
733 | |||
728 | glog of local: |
|
734 | glog of local: | |
729 |
|
735 | |||
730 | $ hg log -G --template "{rev}: {branches} {desc}\n" |
|
736 | $ hg log -G --template "{rev}: {branches} {desc}\n" | |
731 | @ 5: A b3 |
|
737 | @ 5: A b3 | |
732 | | |
|
738 | | | |
733 | | o 4: B a3 |
|
739 | | o 4: B a3 | |
734 | | | |
|
740 | | | | |
735 | o | 3: B b1 |
|
741 | o | 3: B b1 | |
736 | | | |
|
742 | | | | |
737 | o | 2: B b0 |
|
743 | o | 2: B b0 | |
738 | / |
|
744 | / | |
739 | o 1: A a1 |
|
745 | o 1: A a1 | |
740 | | |
|
746 | | | |
741 | o 0: A a0 |
|
747 | o 0: A a0 | |
742 |
|
748 | |||
743 | glog of remote: |
|
749 | glog of remote: | |
744 |
|
750 | |||
745 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" |
|
751 | $ hg log -G -R inner --template "{rev}: {branches} {desc}\n" | |
746 | @ 3: B b1 |
|
752 | @ 3: B b1 | |
747 | | |
|
753 | | | |
748 | o 2: B b0 |
|
754 | o 2: B b0 | |
749 |
|
755 | |||
750 | o 1: A a1 |
|
756 | o 1: A a1 | |
751 | | |
|
757 | | | |
752 | o 0: A a0 |
|
758 | o 0: A a0 | |
753 |
|
759 | |||
754 | outgoing: |
|
760 | outgoing: | |
755 |
|
761 | |||
756 | $ hg out inner --template "{rev}: {branches} {desc}\n" |
|
762 | $ hg out inner --template "{rev}: {branches} {desc}\n" | |
757 | comparing with inner |
|
763 | comparing with inner | |
758 | searching for changes |
|
764 | searching for changes | |
759 | 4: B a3 |
|
765 | 4: B a3 | |
760 | 5: A b3 |
|
766 | 5: A b3 | |
761 |
|
767 | |||
762 | $ hg push inner |
|
768 | $ hg push inner | |
763 | pushing to inner |
|
769 | pushing to inner | |
764 | searching for changes |
|
770 | searching for changes | |
765 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
|
771 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! | |
766 | (merge or see "hg help push" for details about pushing new heads) |
|
772 | (merge or see "hg help push" for details about pushing new heads) | |
767 | [255] |
|
773 | [255] | |
768 |
|
774 | |||
769 | $ hg push inner -r4 -r5 |
|
775 | $ hg push inner -r4 -r5 | |
770 | pushing to inner |
|
776 | pushing to inner | |
771 | searching for changes |
|
777 | searching for changes | |
772 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! |
|
778 | abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! | |
773 | (merge or see "hg help push" for details about pushing new heads) |
|
779 | (merge or see "hg help push" for details about pushing new heads) | |
774 | [255] |
|
780 | [255] | |
775 |
|
781 | |||
776 | $ hg in inner |
|
782 | $ hg in inner | |
777 | comparing with inner |
|
783 | comparing with inner | |
778 | searching for changes |
|
784 | searching for changes | |
779 | no changes found |
|
785 | no changes found | |
780 | [1] |
|
786 | [1] | |
781 |
|
787 | |||
782 | $ cd .. |
|
788 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now