Patchwork [2,of,2] localrepo: use vfs.reljoin rather than os.path.join in the localrepository class

login
register
mail settings
Submitter Angel Ezquerra
Date Jan. 2, 2015, 12:31 p.m.
Message ID <d24d78ac79b43ebd6601.1420201861@Angels-MacBook-Pro.local>
Download mbox | patch
Permalink /patch/7300/
State Accepted
Commit e3a0e7e21f548a65d44510660e90414a238737ee
Headers show

Comments

Angel Ezquerra - Jan. 2, 2015, 12:31 p.m.
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra@gmail.com>
# Date 1420201838 -3600
#      Fri Jan 02 13:30:38 2015 +0100
# Node ID d24d78ac79b43ebd66018b08089da119b460cdaf
# Parent  2c2eadf76e8b8dbb3abb265e87f41252cb1cdacb
localrepo: use vfs.reljoin rather than os.path.join in the localrepository class

The removes the last remaining usage of os.path.join inside teh localrepository
class.
Matt Mackall - Jan. 2, 2015, 10:28 p.m.
On Fri, 2015-01-02 at 13:31 +0100, Angel Ezquerra wrote:
> # HG changeset patch
> # User Angel Ezquerra <angel.ezquerra@gmail.com>
> # Date 1420201838 -3600
> #      Fri Jan 02 13:30:38 2015 +0100
> # Node ID d24d78ac79b43ebd66018b08089da119b460cdaf
> # Parent  2c2eadf76e8b8dbb3abb265e87f41252cb1cdacb
> localrepo: use vfs.reljoin rather than os.path.join in the localrepository class

This one is applied to default, thanks. The first one was accepted a
while ago.

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -762,7 +762,7 @@ 
         return self.vfs.join(self.vfs.reljoin(f, *insidef))
 
     def wjoin(self, f, *insidef):
-        return os.path.join(self.root, f, *insidef)
+        return self.vfs.reljoin(self.root, f, *insidef)
 
     def file(self, f):
         if f[0] == '/':