changeset 6989:32e68ffccbc5

store: pathjoiner default value is os.path.join
author Patrick Mezard <pmezard@gmail.com>
date Fri, 05 Sep 2008 11:00:07 +0200
parents 907e4e9bd3c4
children 4e62be0208d3
files mercurial/localrepo.py mercurial/store.py
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)