Patchwork [15,of,22] vfs: use 'vfs' module directly in 'hgext.transplant'

login
register
mail settings
Submitter Pierre-Yves David
Date March 8, 2017, 9:18 p.m.
Message ID <08dbe59418ce0df83a5d.1489007906@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19013/
State Accepted
Headers show

Comments

Pierre-Yves David - March 8, 2017, 9:18 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1488457899 -3600
#      Thu Mar 02 13:31:39 2017 +0100
# Node ID 08dbe59418ce0df83a5d32a860935c749a8af880
# Parent  8810c5318e8ff7b7cce4fb339e71b11ab05963f1
# EXP-Topic vfs.cleanup
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 08dbe59418ce
vfs: use 'vfs' module directly in 'hgext.transplant'

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.

Patch

diff --git a/hgext/transplant.py b/hgext/transplant.py
--- a/hgext/transplant.py
+++ b/hgext/transplant.py
@@ -35,6 +35,7 @@  from mercurial import (
     scmutil,
     smartset,
     util,
+    vfs as vfsmod,
 )
 
 class TransplantError(error.Abort):
@@ -60,7 +61,7 @@  class transplants(object):
         self.opener = opener
 
         if not opener:
-            self.opener = scmutil.vfs(self.path)
+            self.opener = vfsmod.vfs(self.path)
         self.transplants = {}
         self.dirty = False
         self.read()
@@ -103,7 +104,7 @@  class transplanter(object):
     def __init__(self, ui, repo, opts):
         self.ui = ui
         self.path = repo.join('transplant')
-        self.opener = scmutil.vfs(self.path)
+        self.opener = vfsmod.vfs(self.path)
         self.transplants = transplants(self.path, 'transplants',
                                        opener=self.opener)
         def getcommiteditor():