# HG changeset patch # User Pierre-Yves David # Date 2017-03-02 12:29:59 # Node ID 067f2a95e32c01f6caddc4b75a7b4ea03e155d1f # Parent 254f98326eef9e89bd345d897d1e5df33f515db7 vfs: use 'vfs' module directly in 'mercurial.patch' Now that the 'vfs' classes moved in their own module, lets use the new module directly. We update code iteratively to help with possible bisect needs in the future. diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -38,6 +38,7 @@ from . import ( scmutil, similar, util, + vfs as vfsmod, ) stringio = util.stringio @@ -449,7 +450,7 @@ class abstractbackend(object): class fsbackend(abstractbackend): def __init__(self, ui, basedir): super(fsbackend, self).__init__(ui) - self.opener = scmutil.vfs(basedir) + self.opener = vfsmod.vfs(basedir) def _join(self, f): return os.path.join(self.opener.base, f) @@ -560,7 +561,7 @@ class filestore(object): else: if self.opener is None: root = tempfile.mkdtemp(prefix='hg-patch-') - self.opener = scmutil.vfs(root) + self.opener = vfsmod.vfs(root) # Avoid filename issues with these simple names fn = str(self.created) self.opener.write(fn, data)