Patchwork [03,of,20] commands: directly use repo.vfs.join

login
register
mail settings
Submitter Pierre-Yves David
Date March 12, 2017, 2:45 p.m.
Message ID <8ddcc8a2f6047565c202.1489329937@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19147/
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 1489020797 28800
#      Wed Mar 08 16:53:17 2017 -0800
# Node ID 8ddcc8a2f6047565c2029c8f9fb6d3eac993c0ab
# Parent  931e9e6b03b74c942163e66212c43e4ad1b30394
# 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 8ddcc8a2f604
commands: directly use repo.vfs.join

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

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1772,7 +1772,7 @@  def config(ui, repo, *values, **opts):
         if opts.get('local'):
             if not repo:
                 raise error.Abort(_("can't use --local outside a repository"))
-            paths = [repo.join('hgrc')]
+            paths = [repo.vfs.join('hgrc')]
         elif opts.get('global'):
             paths = scmutil.systemrcpath()
         else:
@@ -2383,7 +2383,7 @@  def _dograft(ui, repo, *revs, **opts):
 
     # remove state when we complete successfully
     if not opts.get('dry_run'):
-        util.unlinkpath(repo.join('graftstate'), ignoremissing=True)
+        util.unlinkpath(repo.vfs.join('graftstate'), ignoremissing=True)
 
     return 0