changeset 22362:c9b32c6a2944

localrepo: make it possible to pass multiple path elements to join and wjoin This makes join and wjoin behave in the same way as os.path.join. That is, it makes it possible to pass more than one path element to them. Note that the first path element is still required, as it was before this patch, and as is the case for os.path.join.
author Angel Ezquerra <angel.ezquerra@gmail.com>
date Thu, 28 Aug 2014 17:23:05 +0200
parents eb6adf750954
children 9510b0e9480b
files mercurial/localrepo.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sun Aug 31 12:22:44 2014 +0200
+++ b/mercurial/localrepo.py	Thu Aug 28 17:23:05 2014 +0200
@@ -739,11 +739,11 @@
         # if publishing we can't copy if there is filtered content
         return not self.filtered('visible').changelog.filteredrevs
 
-    def join(self, f):
-        return os.path.join(self.path, f)
+    def join(self, f, *insidef):
+        return os.path.join(self.path, f, *insidef)
 
-    def wjoin(self, f):
-        return os.path.join(self.root, f)
+    def wjoin(self, f, *insidef):
+        return os.path.join(self.root, f, *insidef)
 
     def file(self, f):
         if f[0] == '/':