Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/filelog.py @ 4267:b11a2fb59cf5
revlog: simplify revlog version handling
- pass the default version as an attribute on the opener
- eliminate config option mess
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 22 Mar 2007 19:52:38 -0500 |
parents | 1b5c38e9d7aa |
children | 63b9d2deed48 |
comparison
equal
deleted
inserted
replaced
4266:1b5c38e9d7aa | 4267:b11a2fb59cf5 |
---|---|
7 | 7 |
8 from revlog import * | 8 from revlog import * |
9 import os | 9 import os |
10 | 10 |
11 class filelog(revlog): | 11 class filelog(revlog): |
12 def __init__(self, opener, path, defversion=REVLOG_DEFAULT_VERSION): | 12 def __init__(self, opener, path): |
13 revlog.__init__(self, opener, | 13 revlog.__init__(self, opener, |
14 "/".join(("data", self.encodedir(path + ".i"))), | 14 "/".join(("data", self.encodedir(path + ".i")))) |
15 defversion) | |
16 | 15 |
17 # This avoids a collision between a file named foo and a dir named | 16 # This avoids a collision between a file named foo and a dir named |
18 # foo.i or foo.d | 17 # foo.i or foo.d |
19 def encodedir(self, path): | 18 def encodedir(self, path): |
20 return (path | 19 return (path |