--- a/mercurial/localrepo.py Wed Sep 25 12:57:11 2019 +0200
+++ b/mercurial/localrepo.py Wed Sep 25 12:59:26 2019 +0200
@@ -1920,8 +1920,13 @@
# gating.
tracktags(tr2)
repo = reporef()
- if repo.ui.configbool('experimental', 'single-head-per-branch'):
- scmutil.enforcesinglehead(repo, tr2, desc)
+
+ r = repo.ui.configsuboptions('experimental',
+ 'single-head-per-branch')
+ singlehead, singleheadsub = r
+ if singlehead:
+ accountclosed = singleheadsub.get("account-closed-heads", False)
+ scmutil.enforcesinglehead(repo, tr2, desc, accountclosed)
if hook.hashook(repo.ui, 'pretxnclose-bookmark'):
for name, (old, new) in sorted(tr.changes['bookmarks'].items()):
args = tr.hookargs.copy()