Mercurial > evolve
comparison hgext3rd/topic/compat.py @ 6570:5b23394b03aa
compat: hg 5.6 doesn't have tip as an argument to commitstatus() at all
While this patch is not necessary, it makes the code slightly clearer.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 12 Oct 2023 14:05:57 -0300 |
parents | 9a55b007faf6 |
children | 40875ca5e724 |
comparison
equal
deleted
inserted
replaced
6569:9a55b007faf6 | 6570:5b23394b03aa |
---|---|
62 return overridefn(_orig, repo, node, branch, bheads=bheads, tip=tip, **opts) | 62 return overridefn(_orig, repo, node, branch, bheads=bheads, tip=tip, **opts) |
63 extensions.wrapfunction(cmdutil, 'commitstatus', _override) | 63 extensions.wrapfunction(cmdutil, 'commitstatus', _override) |
64 else: | 64 else: |
65 # hg <= 5.6 (976b26bdd0d8) | 65 # hg <= 5.6 (976b26bdd0d8) |
66 def _override(orig, repo, node, branch, bheads=None, opts=None): | 66 def _override(orig, repo, node, branch, bheads=None, opts=None): |
67 def _orig(repo, node, branch, bheads=None, tip=None, **opts): | 67 def _orig(repo, node, branch, bheads=None, **opts): |
68 return orig(repo, node, branch, bheads=bheads, opts=opts) | 68 return orig(repo, node, branch, bheads=bheads, opts=opts) |
69 if opts is None: | 69 if opts is None: |
70 opts = {} | 70 opts = {} |
71 opts = pycompat.strkwargs(opts) | 71 opts = pycompat.strkwargs(opts) |
72 return overridefn(_orig, repo, node, branch, bheads=bheads, tip=None, **opts) | 72 return overridefn(_orig, repo, node, branch, bheads=bheads, **opts) |
73 extensions.wrapfunction(cmdutil, 'commitstatus', _override) | 73 extensions.wrapfunction(cmdutil, 'commitstatus', _override) |
74 | 74 |
75 if util.safehasattr(error, 'InputError'): | 75 if util.safehasattr(error, 'InputError'): |
76 InputError = error.InputError | 76 InputError = error.InputError |
77 else: | 77 else: |