[PATCH 08 of 22] vfs: use 'vfs' module directly in 'mercurial.simplemerge'

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Mar 8 16:18:19 EST 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1488457858 -3600
#      Thu Mar 02 13:30:58 2017 +0100
# Node ID f9b148da25f6a92866ac52ec185a9cf0f622ae06
# Parent  2c27b19bbea4f4e86dd9a8b2130fb2a50d043fc6
# 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 f9b148da25f6
vfs: use 'vfs' module directly in 'mercurial.simplemerge'

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/simplemerge.py b/mercurial/simplemerge.py
--- a/mercurial/simplemerge.py
+++ b/mercurial/simplemerge.py
@@ -24,8 +24,8 @@ from .i18n import _
 from . import (
     error,
     mdiff,
-    scmutil,
     util,
+    vfs as vfsmod,
 )
 
 class CantReprocessAndShowBase(Exception):
@@ -437,7 +437,7 @@ def simplemerge(ui, local, base, other, 
 
     local = os.path.realpath(local)
     if not opts.get('print'):
-        opener = scmutil.vfs(os.path.dirname(local))
+        opener = vfsmod.vfs(os.path.dirname(local))
         out = opener(os.path.basename(local), "w", atomictemp=True)
     else:
         out = ui.fout


More information about the Mercurial-devel mailing list