compat: handle pre-4.2 compatibility for accessing vfs
The vfs module is quite new.
--- a/hgext3rd/evolve/obscache.py Tue Jul 25 05:14:37 2017 +0200
+++ b/hgext3rd/evolve/obscache.py Tue Jul 25 05:51:44 2017 +0200
@@ -22,7 +22,6 @@
pycompat,
node,
util,
- vfs as vfsmod,
)
from mercurial.i18n import _
@@ -43,6 +42,12 @@
else:
timer = time.time
+# hg < 4.2 compat
+try:
+ from mercurial import vfs as vfsmod
+ vfsmod.vfs
+except ImportError:
+ from mercurial import scmutil as vfsmod
try:
obsstorefilecache = localrepo.localrepository.obsstore