Patchwork [05,of,20] merge: directly use repo.vfs.join

login
register
mail settings
Submitter Pierre-Yves David
Date March 12, 2017, 2:45 p.m.
Message ID <d383436e0a8b7db98feb.1489329939@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19150/
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 1489020812 28800
#      Wed Mar 08 16:53:32 2017 -0800
# Node ID d383436e0a8b7db98feb13235aac7e09d6d43595
# Parent  aefb162f77e6434c3286cde061f7aa9d39f06a84
# 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 d383436e0a8b
merge: directly use repo.vfs.join

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

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -124,7 +124,7 @@  class mergestate(object):
             self._mdstate = 's'
         else:
             self._mdstate = 'u'
-        shutil.rmtree(self._repo.join('merge'), True)
+        shutil.rmtree(self._repo.vfs.join('merge'), True)
         self._results = {}
         self._dirty = False
 
@@ -1679,7 +1679,7 @@  def update(repo, node, branchmerge, forc
             repo.setparents(fp1, fp2)
             recordupdates(repo, actions, branchmerge)
             # update completed, clear state
-            util.unlink(repo.join('updatestate'))
+            util.unlink(repo.vfs.join('updatestate'))
 
             if not branchmerge:
                 repo.dirstate.setbranch(p2.branch())