Mercurial > hg-git
comparison hggit/compat.py @ 1130:80664524802b
compat: add compatibility for 4.6 mercurial.utils
author | Sean Farley <sean@farley.io> |
---|---|
date | Thu, 24 May 2018 11:26:15 +0200 |
parents | 8ed6c0cae9b8 |
children | 8e03a8ba04af |
comparison
equal
deleted
inserted
replaced
1129:5edabf9db748 | 1130:80664524802b |
---|---|
34 hgvfs = vfsmod.vfs | 34 hgvfs = vfsmod.vfs |
35 except ImportError: | 35 except ImportError: |
36 # vfsmod was extracted in hg 4.2 | 36 # vfsmod was extracted in hg 4.2 |
37 from mercurial import scmutil | 37 from mercurial import scmutil |
38 hgvfs = scmutil.vfs | 38 hgvfs = scmutil.vfs |
39 | |
40 try: | |
41 from mercurial.utils import procutil, stringutil | |
42 sshargs = procutil.sshargs | |
43 shellquote = procutil.shellquote | |
44 quotecommand = procutil.quotecommand | |
45 binary = stringutil.binary | |
46 except ImportError: | |
47 # these were moved in 4.6 | |
48 sshargs = hgutil.sshargs | |
49 shellquote = hgutil.shellquote | |
50 quotecommand = hgutil.quotecommand | |
51 binary = hgutil.binary | |
39 | 52 |
40 | 53 |
41 def gitvfs(repo): | 54 def gitvfs(repo): |
42 """return a vfs suitable to read git related data""" | 55 """return a vfs suitable to read git related data""" |
43 # Mercurial >= 3.3: repo.shared() | 56 # Mercurial >= 3.3: repo.shared() |