store: pathjoiner default value is os.path.join
authorPatrick Mezard <pmezard@gmail.com>
Fri, 05 Sep 2008 11:00:07 +0200
changeset 6989 32e68ffccbc5
parent 6988 907e4e9bd3c4
child 6992 4e62be0208d3
store: pathjoiner default value is os.path.join
mercurial/localrepo.py
mercurial/store.py
--- a/mercurial/localrepo.py	Sun Aug 31 00:22:20 2008 +0200
+++ b/mercurial/localrepo.py	Fri Sep 05 11:00:07 2008 +0200
@@ -60,7 +60,7 @@
                 if inst.errno != errno.ENOENT:
                     raise
 
-        self.store = store.store(requirements, self.path, util.opener, os.path.join)
+        self.store = store.store(requirements, self.path, util.opener)
         self.spath = self.store.path
         self.sopener = self.store.opener
         self.sjoin = self.store.join
--- a/mercurial/store.py	Sun Aug 31 00:22:20 2008 +0200
+++ b/mercurial/store.py	Fri Sep 05 11:00:07 2008 +0200
@@ -120,7 +120,8 @@
         return (['requires', '00changelog.i'] +
                 [self.pathjoiner('store', f) for f in _data.split()])
 
-def store(requirements, path, opener, pathjoiner):
+def store(requirements, path, opener, pathjoiner=None):
+    pathjoiner = pathjoiner or os.path.join
     if 'store' in requirements:
         return encodedstore(path, opener, pathjoiner)
     return basicstore(path, opener, pathjoiner)