Patchwork [09,of,20] convert: directly use repo.vfs.join

login
register
mail settings
Submitter Pierre-Yves David
Date March 12, 2017, 2:45 p.m.
Message ID <4bf8c226e796484a748e.1489329943@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19154/
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 1489020685 28800
#      Wed Mar 08 16:51:25 2017 -0800
# Node ID 4bf8c226e796484a748e60f7f6c9c95e17b3b3df
# Parent  0e277a15c4e81ef8081a8b344c7df54a99ca61d9
# 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 4bf8c226e796
convert: directly use repo.vfs.join

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

Patch

diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py
--- a/hgext/convert/hg.py
+++ b/hgext/convert/hg.py
@@ -90,10 +90,10 @@  class mercurial_sink(common.converter_si
             self.wlock.release()
 
     def revmapfile(self):
-        return self.repo.join("shamap")
+        return self.repo.vfs.join("shamap")
 
     def authorfile(self):
-        return self.repo.join("authormap")
+        return self.repo.vfs.join("authormap")
 
     def setbranch(self, branch, pbranches):
         if not self.clonebranches:
@@ -625,7 +625,7 @@  class mercurial_source(common.converter_
 
     def converted(self, rev, destrev):
         if self.convertfp is None:
-            self.convertfp = open(self.repo.join('shamap'), 'a')
+            self.convertfp = open(self.repo.vfs.join('shamap'), 'a')
         self.convertfp.write('%s %s\n' % (destrev, rev))
         self.convertfp.flush()