changeset 10322:d9a2bc2f776b

add options dict to localrepo.store.opener and use it for defversion
author Vsevolod Solovyov <vsevolod.solovyov@gmail.com>
date Fri, 05 Feb 2010 19:10:26 +0100
parents 6e721636fede
children 0aa59f532ef9
files mercurial/localrepo.py mercurial/revlog.py
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Fri Feb 05 18:23:01 2010 +0100
+++ b/mercurial/localrepo.py	Fri Feb 05 19:10:26 2010 +0100
@@ -89,6 +89,7 @@
         self.sopener = self.store.opener
         self.sjoin = self.store.join
         self.opener.createmode = self.store.createmode
+        self.sopener.options = {}
 
         # These two define the set of tags for this repository.  _tags
         # maps tag name to node; _tagtypes maps tag name to 'global' or
@@ -112,7 +113,7 @@
             p = os.environ['HG_PENDING']
             if p.startswith(self.root):
                 c.readpending('00changelog.i.a')
-        self.sopener.defversion = c.version
+        self.sopener.options['defversion'] = c.version
         return c
 
     @propertycache
--- a/mercurial/revlog.py	Fri Feb 05 18:23:01 2010 +0100
+++ b/mercurial/revlog.py	Fri Feb 05 19:10:26 2010 +0100
@@ -431,8 +431,8 @@
         self.index = []
 
         v = REVLOG_DEFAULT_VERSION
-        if hasattr(opener, "defversion"):
-            v = opener.defversion
+        if hasattr(opener, 'options') and 'defversion' in opener.options:
+            v = opener.options['defversion']
             if v & REVLOGNG:
                 v |= REVLOGNGINLINEDATA