Patchwork [01,of,20] localrepo: directly use repo.vfs.join

login
register
mail settings
Submitter Pierre-Yves David
Date March 12, 2017, 2:45 p.m.
Message ID <680edfb3b6a2ebc14368.1489329935@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19146/
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 1470400162 -7200
#      Fri Aug 05 14:29:22 2016 +0200
# Node ID 680edfb3b6a2ebc14368bb69f8fa6605d689cd9e
# Parent  62939e0148f170b67ca8c7374f36c413b67fd387
# 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 680edfb3b6a2
localrepo: directly use repo.vfs.join

The 'repo.join' method is about to be deprecated.
Augie Fackler - March 12, 2017, 6:11 p.m.
On Sun, Mar 12, 2017 at 07:45:35AM -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> # Date 1470400162 -7200
> #      Fri Aug 05 14:29:22 2016 +0200
> # Node ID 680edfb3b6a2ebc14368bb69f8fa6605d689cd9e
> # Parent  62939e0148f170b67ca8c7374f36c413b67fd387
> # 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 680edfb3b6a2
> localrepo: directly use repo.vfs.join

Queued these, and rebased them across Mads' related rename/unlink fixes. Thanks!

>
> The 'repo.join' method is about to be deprecated.
>
> diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
> --- a/mercurial/localrepo.py
> +++ b/mercurial/localrepo.py
> @@ -278,7 +278,7 @@ class localrepository(object):
>          # This list it to be filled by extension during repo setup
>          self._phasedefaults = []
>          try:
> -            self.ui.readconfig(self.join("hgrc"), self.root)
> +            self.ui.readconfig(self.vfs.join("hgrc"), self.root)
>              self._loadextensions()
>          except IOError:
>              pass
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -278,7 +278,7 @@  class localrepository(object):
         # This list it to be filled by extension during repo setup
         self._phasedefaults = []
         try:
-            self.ui.readconfig(self.join("hgrc"), self.root)
+            self.ui.readconfig(self.vfs.join("hgrc"), self.root)
             self._loadextensions()
         except IOError:
             pass