Skip to content
Snippets Groups Projects
Commit 650eadb4 authored by Manuel Jacob's avatar Manuel Jacob
Browse files

compat: add case for removed procutil.quotecommand() in Mercurial

parent bec3bd68
No related branches found
No related tags found
1 merge request!33Partially fix compat with Mercurial default
Pipeline #6917 passed with warnings
from __future__ import absolute_import, print_function
import sys
from mercurial import (
context,
pycompat,
......@@ -21,7 +23,14 @@
from mercurial.utils import procutil, stringutil
sshargs = procutil.sshargs
shellquote = procutil.shellquote
quotecommand = procutil.quotecommand
try:
quotecommand = procutil.quotecommand
except AttributeError:
# procutil.quotecommand() returned the argument unchanged on Python
# >= 2.7.1 and was removed after Mercurial raised the minimum
# Python version to 2.7.4.
assert sys.version_info[:3] >= (2, 7, 1)
quotecommand = pycompat.identity
binary = stringutil.binary
except ImportError:
# these were moved in 4.6
......
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