mercurial/localrepo.py
changeset 42969 76608f9f27f6
parent 42905 3df3b139a43d
child 43024 188476e48f51
--- 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()