# HG changeset patch # User Anton Shestakov # Date 1697132251 10800 # Node ID 40875ca5e7245ad5a715ad097fde77cade51d493 # Parent 5b23394b03aa4d721e9a50a86f71e111c063adbb 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. diff -r 5b23394b03aa -r 40875ca5e724 hgext3rd/topic/compat.py --- 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 = {}