diff mercurial/commands.py @ 49582:3adca6eb6659 stable

commit: properly consider file include and exclude options when closing branch It looks like this is meant to prevent adding another commit that does nothing but close a branch on top of a commit that already closed the branch. The matcher building functions want `Dict[bytes, Any]`, not `Dict[str, Any]`, which was found by adding type hints to the matcher related methods in scmutil.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 18 Nov 2022 13:43:03 -0500
parents f2b1bc19ce90
children bc59c1e5dd01 c9690836747d
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Nov 18 14:03:56 2022 -0500
+++ b/mercurial/commands.py	Fri Nov 18 13:43:03 2022 -0500
@@ -2114,7 +2114,9 @@
         if repo[b'.'].closesbranch():
             # Not ideal, but let us do an extra status early to prevent early
             # bail out.
-            matcher = scmutil.match(repo[None], pats, opts)
+            matcher = scmutil.match(
+                repo[None], pats, pycompat.byteskwargs(opts)
+            )
             s = repo.status(match=matcher)
             if s.modified or s.added or s.removed:
                 bheads = repo.branchheads(branch, closed=True)