Skip to content
Snippets Groups Projects
Commit 20ecc2c3 authored by muxator's avatar muxator
Browse files

compat: support mercurial 5.0, adapting to renamed parameter in memctx()

Mercurial 5.0 renamed a parameter for memctx() in commit 550a172a603b (memctx:
rename constructor argument "copied" to "copysource").
This commit keeps a fast path for 5.0, and continues supporting older mercurial
versions as before.
parent f6cef55e
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,8 @@
# Different versions of mercurial have different parameters to
# memfilectx. Try them from newest to oldest.
parameters_to_try = (
((repo, changectx, path, data), { 'copied': copied }), # hg >= 4.5
((repo, changectx, path, data), { 'copysource': copied }), # hg >= 5.0
((repo, changectx, path, data), { 'copied': copied }), # hg 4.5 - 4.9.1
((repo, path, data), { 'copied': copied }), # hg 3.1 - 4.4.2
((path, data), { 'copied': copied }), # hg <= 3.0.2
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment