mercurial/localrepo.py
changeset 46096 4d5e2fd53707
parent 46004 49b4ab1d9f5e
child 46114 c6ae1982b2a1
--- a/mercurial/localrepo.py	Thu Dec 03 14:39:39 2020 -0800
+++ b/mercurial/localrepo.py	Sat Dec 05 23:35:55 2020 +0100
@@ -2254,7 +2254,13 @@
                 accountclosed = singleheadsub.get(
                     b"account-closed-heads", False
                 )
-                scmutil.enforcesinglehead(repo, tr2, desc, accountclosed)
+                if singleheadsub.get(b"public-changes-only", False):
+                    filtername = b"immutable"
+                else:
+                    filtername = b"visible"
+                scmutil.enforcesinglehead(
+                    repo, tr2, desc, accountclosed, filtername
+                )
             if hook.hashook(repo.ui, b'pretxnclose-bookmark'):
                 for name, (old, new) in sorted(
                     tr.changes[b'bookmarks'].items()