Patchwork [02,of,22] vfs: use 'vfs' module directly in 'mercurial.repair'

login
register
mail settings
Submitter Pierre-Yves David
Date March 8, 2017, 9:18 p.m.
Message ID <3ea27e3eb238450add3b.1489007893@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19000/
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 1488457783 -3600
#      Thu Mar 02 13:29:43 2017 +0100
# Node ID 3ea27e3eb238450add3bca5b9d23f9bba3ddfced
# Parent  c46a9910b10778bfa378ef4e37d66dfb270d23e6
# 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 3ea27e3eb238
vfs: use 'vfs' module directly in 'mercurial.repair'

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/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -26,6 +26,7 @@  from . import (
     revlog,
     scmutil,
     util,
+    vfs as vfsmod,
 )
 
 def _bundle(repo, bases, heads, node, suffix, compress=True):
@@ -882,7 +883,7 @@  def _upgraderepo(ui, srcrepo, dstrepo, r
     ui.write(_('data fully migrated to temporary repository\n'))
 
     backuppath = tempfile.mkdtemp(prefix='upgradebackup.', dir=srcrepo.path)
-    backupvfs = scmutil.vfs(backuppath)
+    backupvfs = vfsmod.vfs(backuppath)
 
     # Make a backup of requires file first, as it is the first to be modified.
     util.copyfile(srcrepo.join('requires'), backupvfs.join('requires'))