##// END OF EJS Templates
vfs: use 'vfs' module directly in 'mercurial.patch'...
Pierre-Yves David -
r31233:067f2a95 default
parent child Browse files
Show More
@@ -38,6 +38,7 b' from . import ('
38 scmutil,
38 scmutil,
39 similar,
39 similar,
40 util,
40 util,
41 vfs as vfsmod,
41 )
42 )
42 stringio = util.stringio
43 stringio = util.stringio
43
44
@@ -449,7 +450,7 b' class abstractbackend(object):'
449 class fsbackend(abstractbackend):
450 class fsbackend(abstractbackend):
450 def __init__(self, ui, basedir):
451 def __init__(self, ui, basedir):
451 super(fsbackend, self).__init__(ui)
452 super(fsbackend, self).__init__(ui)
452 self.opener = scmutil.vfs(basedir)
453 self.opener = vfsmod.vfs(basedir)
453
454
454 def _join(self, f):
455 def _join(self, f):
455 return os.path.join(self.opener.base, f)
456 return os.path.join(self.opener.base, f)
@@ -560,7 +561,7 b' class filestore(object):'
560 else:
561 else:
561 if self.opener is None:
562 if self.opener is None:
562 root = tempfile.mkdtemp(prefix='hg-patch-')
563 root = tempfile.mkdtemp(prefix='hg-patch-')
563 self.opener = scmutil.vfs(root)
564 self.opener = vfsmod.vfs(root)
564 # Avoid filename issues with these simple names
565 # Avoid filename issues with these simple names
565 fn = str(self.created)
566 fn = str(self.created)
566 self.opener.write(fn, data)
567 self.opener.write(fn, data)
General Comments 0
You need to be logged in to leave comments. Login now