Patchwork [06,of,20] repair: directly use repo.vfs.join

login
register
mail settings
Submitter Pierre-Yves David
Date March 12, 2017, 2:45 p.m.
Message ID <59fbf352777b40ac00fb.1489329940@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19151/
State Accepted
Headers show

Comments

Pierre-Yves David - March 12, 2017, 2:45 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1489020819 28800
#      Wed Mar 08 16:53:39 2017 -0800
# Node ID 59fbf352777b40ac00fb8185f1cf900544fc769c
# Parent  d383436e0a8b7db98feb13235aac7e09d6d43595
# 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 59fbf352777b
repair: directly use repo.vfs.join

The 'repo.join' method is about to be deprecated.

Patch

diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -886,7 +886,7 @@  def _upgraderepo(ui, srcrepo, dstrepo, r
     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'))
+    util.copyfile(srcrepo.vfs.join('requires'), backupvfs.join('requires'))
 
     # We install an arbitrary requirement that clients must not support
     # as a mechanism to lock out new clients during the data swap. This is