localrepo: use the vfs join method to implement the localrepo join method
authorAngel Ezquerra <angel.ezquerra@gmail.com>
Tue, 23 Dec 2014 19:48:38 +0100
changeset 23667 f8df993516d0
parent 23666 965788d9ae09
child 23670 6721199ac78a
localrepo: use the vfs join method to implement the localrepo join method This will make it possible to customize the behavior of the join method by changing the vfs class (e.g. by using the altvfs" class introduced recently). Note that we could have modified the VFS join methods to acept a set of optional paths in the same way thta the localrepo join method does. However it seemed simpler to simply call os.path.join before calling self.vfs.join.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Sun Dec 21 00:19:10 2014 +0100
+++ b/mercurial/localrepo.py	Tue Dec 23 19:48:38 2014 +0100
@@ -765,7 +765,7 @@
         return None
 
     def join(self, f, *insidef):
-        return os.path.join(self.path, f, *insidef)
+        return self.vfs.join(os.path.join(f, *insidef))
 
     def wjoin(self, f, *insidef):
         return os.path.join(self.root, f, *insidef)