comparison tests/test-single-head.t @ 43734:88a306478556 stable

singlehead: making config item a bool again with the use of `configsuboptions`, the main config item has become a string (unless it's just the default value). This makes it in particular hard to override in a cascade of HGRC files, as we do in Heptapod to re-allow multiple heads on specific repositories while the default behaviour is to forbid them. The added test case reflects that use-case
author Georges Racinet <georges.racinet@octobus.net>
date Wed, 20 Nov 2019 19:07:02 +0100
parents 76608f9f27f6
children 4d5e2fd53707
comparison
equal deleted inserted replaced
43724:5be128f669d4 43734:88a306478556
257 transaction abort! 257 transaction abort!
258 rollback completed 258 rollback completed
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)