Show More
@@ -2086,11 +2086,10 b' class localrepository(object):' | |||||
2086 | tracktags(tr2) |
|
2086 | tracktags(tr2) | |
2087 | repo = reporef() |
|
2087 | repo = reporef() | |
2088 |
|
2088 | |||
2089 | r = repo.ui.configsuboptions( |
|
2089 | singleheadopt = (b'experimental', b'single-head-per-branch') | |
2090 | b'experimental', b'single-head-per-branch' |
|
2090 | singlehead = repo.ui.configbool(*singleheadopt) | |
2091 | ) |
|
|||
2092 | singlehead, singleheadsub = r |
|
|||
2093 | if singlehead: |
|
2091 | if singlehead: | |
|
2092 | singleheadsub = repo.ui.configsuboptions(*singleheadopt)[1] | |||
2094 | accountclosed = singleheadsub.get( |
|
2093 | accountclosed = singleheadsub.get( | |
2095 | b"account-closed-heads", False |
|
2094 | b"account-closed-heads", False | |
2096 | ) |
|
2095 | ) |
@@ -259,3 +259,35 b' Test that closing heads can be explicitl' | |||||
259 | abort: rejecting multiple heads on branch "branch_A" |
|
259 | abort: rejecting multiple heads on branch "branch_A" | |
260 | (3 heads: 49003e504178 5254bcccab93 42b9fe70a3c1) |
|
260 | (3 heads: 49003e504178 5254bcccab93 42b9fe70a3c1) | |
261 | [255] |
|
261 | [255] | |
|
262 | ||||
|
263 | ||||
|
264 | Test that config can be overriden as the boolean it is | |||
|
265 | ------------------------------------------------------ | |||
|
266 | ||||
|
267 | $ cat <<EOF >> $TESTTMP/single-head-server/.hg/hgrc | |||
|
268 | > [experimental] | |||
|
269 | > single-head-per-branch = no | |||
|
270 | > EOF | |||
|
271 | ||||
|
272 | Because of previous test, we'll also push c_aL0 and c_aM0. | |||
|
273 | ||||
|
274 | $ hg out -T "{desc}\n" | |||
|
275 | comparing with $TESTTMP/single-head-server | |||
|
276 | searching for changes | |||
|
277 | c_aL0 | |||
|
278 | c_aM0 | |||
|
279 | ||||
|
280 | Let's make a new head and push everythin. The server feedback will mention | |||
|
281 | exactly one new head because c_aM0 is closed. | |||
|
282 | ||||
|
283 | $ hg up 'desc("c_aG0")' | |||
|
284 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |||
|
285 | $ mkcommit c_aN0 | |||
|
286 | created new head | |||
|
287 | $ hg push -f | |||
|
288 | pushing to $TESTTMP/single-head-server | |||
|
289 | searching for changes | |||
|
290 | adding changesets | |||
|
291 | adding manifests | |||
|
292 | adding file changes | |||
|
293 | added 3 changesets with 3 changes to 3 files (+1 heads) |
General Comments 0
You need to be logged in to leave comments.
Login now