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

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Mar 12 10:45:37 EDT 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at 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.

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
 


More information about the Mercurial-devel mailing list