112 adding file changes |
111 adding file changes |
113 added 1 changesets with 0 changes to 1 files (+1 heads) |
112 added 1 changesets with 0 changes to 1 files (+1 heads) |
114 1 new obsolescence markers |
113 1 new obsolescence markers |
115 obsoleted 1 changesets |
114 obsoleted 1 changesets |
116 |
115 |
117 Check it does to interfer with strip |
116 Check it does not interfer with strip |
118 ------------------------------------ |
117 ------------------------------------- |
119 |
118 |
120 setup |
119 setup |
121 |
120 |
122 $ hg branch branch_A --force |
121 $ hg branch branch_A --force |
123 marked working directory as branch branch_A |
122 marked working directory as branch branch_A |
199 actual stripping |
198 actual stripping |
200 |
199 |
201 $ hg strip --config extensions.strip= --rev 'desc("c_dH0")' |
200 $ hg strip --config extensions.strip= --rev 'desc("c_dH0")' |
202 saved backup bundle to $TESTTMP/client/.hg/strip-backup/fe47ea669cea-a41bf5a9-backup.hg |
201 saved backup bundle to $TESTTMP/client/.hg/strip-backup/fe47ea669cea-a41bf5a9-backup.hg |
203 |
202 |
|
203 Test that closing heads are ignored by default |
|
204 ----------------------------------------------- |
|
205 |
|
206 $ hg up 'desc("c_aG0")' |
|
207 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
208 $ mkcommit c_aJ0 |
|
209 created new head |
|
210 |
|
211 pushing the new head should fails |
|
212 |
|
213 $ hg push -f |
|
214 pushing to $TESTTMP/single-head-server |
|
215 searching for changes |
|
216 adding changesets |
|
217 adding manifests |
|
218 adding file changes |
|
219 transaction abort! |
|
220 rollback completed |
|
221 abort: rejecting multiple heads on branch "branch_A" |
|
222 (2 heads: 49003e504178 468bd81ccc5d) |
|
223 [255] |
|
224 |
|
225 |
|
226 closing the head and pushing should succeed |
|
227 |
|
228 $ mkcommit c_aK0 --close-branch |
|
229 $ hg push -f |
|
230 pushing to $TESTTMP/single-head-server |
|
231 searching for changes |
|
232 adding changesets |
|
233 adding manifests |
|
234 adding file changes |
|
235 added 4 changesets with 4 changes to 4 files (-1 heads) |
|
236 |
|
237 |
|
238 Test that closing heads can be explicitly accounted for |
|
239 ------------------------------------------------------- |
|
240 |
|
241 $ cat <<EOF >> $TESTTMP/single-head-server/.hg/hgrc |
|
242 > [experimental] |
|
243 > single-head-per-branch:account-closed-heads = yes |
|
244 > EOF |
|
245 |
|
246 $ hg up 'desc("c_aG0")' |
|
247 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
248 $ mkcommit c_aL0 |
|
249 created new head |
|
250 $ mkcommit c_aM0 --close-branch |
|
251 $ hg push -f |
|
252 pushing to $TESTTMP/single-head-server |
|
253 searching for changes |
|
254 adding changesets |
|
255 adding manifests |
|
256 adding file changes |
|
257 transaction abort! |
|
258 rollback completed |
|
259 abort: rejecting multiple heads on branch "branch_A" |
|
260 (3 heads: 49003e504178 5254bcccab93 42b9fe70a3c1) |
|
261 [255] |