# HG changeset patch # User Angel Ezquerra # Date 2014-08-28 15:23:05 # Node ID c9b32c6a294404712cc215b8777c2db30ac0095c # Parent eb6adf7509540dbbb83e4a2763fb3c0220847236 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. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -739,11 +739,11 @@ class localrepository(object): # 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] == '/':