diff hgext3rd/topic/compat.py @ 6571:40875ca5e724

compat: older hg versions need byteskwargs in commitstatus() Notice how we first convert opts to strkwargs, and in this patch we add code to reverse that operation. Yeah. This is now officially the worst compat code.
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 12 Oct 2023 14:37:31 -0300
parents 5b23394b03aa
children 4c6d35f92469
line wrap: on
line diff
--- a/hgext3rd/topic/compat.py	Thu Oct 12 14:05:57 2023 -0300
+++ b/hgext3rd/topic/compat.py	Thu Oct 12 14:37:31 2023 -0300
@@ -57,6 +57,7 @@
         # hg <= 6.5 (489268c8ee7e)
         def _override(orig, repo, node, branch, bheads=None, tip=None, opts=None):
             def _orig(repo, node, branch, bheads=None, tip=None, **opts):
+                opts = pycompat.byteskwargs(opts)
                 return orig(repo, node, branch, bheads=bheads, tip=tip, opts=opts)
             opts = pycompat.strkwargs(opts)
             return overridefn(_orig, repo, node, branch, bheads=bheads, tip=tip, **opts)
@@ -65,6 +66,7 @@
         # hg <= 5.6 (976b26bdd0d8)
         def _override(orig, repo, node, branch, bheads=None, opts=None):
             def _orig(repo, node, branch, bheads=None, **opts):
+                opts = pycompat.byteskwargs(opts)
                 return orig(repo, node, branch, bheads=bheads, opts=opts)
             if opts is None:
                 opts = {}