Patchwork [02,of,20] cmdutil: directly use repo.vfs.join

login
register
mail settings
Submitter Pierre-Yves David
Date March 12, 2017, 2:45 p.m.
Message ID <931e9e6b03b74c942163.1489329936@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19148/
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 1489020789 28800
#      Wed Mar 08 16:53:09 2017 -0800
# Node ID 931e9e6b03b74c942163e66212c43e4ad1b30394
# Parent  680edfb3b6a2ebc14368bb69f8fa6605d689cd9e
# 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 931e9e6b03b7
cmdutil: directly use repo.vfs.join

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

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -201,7 +201,7 @@  def dorecord(ui, repo, commitfunc, cmdsu
                     newlyaddedandmodifiedfiles]
         backups = {}
         if tobackup:
-            backupdir = repo.join('record-backups')
+            backupdir = repo.vfs.join('record-backups')
             try:
                 os.mkdir(backupdir)
             except OSError as err:
@@ -3412,7 +3412,7 @@  def clearunfinished(repo):
             raise error.Abort(msg, hint=hint)
     for f, clearable, allowcommit, msg, hint in unfinishedstates:
         if clearable and repo.vfs.exists(f):
-            util.unlink(repo.join(f))
+            util.unlink(repo.vfs.join(f))
 
 afterresolvedstates = [
     ('graftstate',