20 propertycache = util.propertycache |
20 propertycache = util.propertycache |
21 |
21 |
22 class localrepository(repo.repository): |
22 class localrepository(repo.repository): |
23 capabilities = set(('lookup', 'changegroupsubset', 'branchmap', 'pushkey')) |
23 capabilities = set(('lookup', 'changegroupsubset', 'branchmap', 'pushkey')) |
24 supportedformats = set(('revlogv1', 'parentdelta')) |
24 supportedformats = set(('revlogv1', 'parentdelta')) |
25 supported = supportedformats | set(('store', 'fncache', 'shared')) |
25 supported = supportedformats | set(('store', 'fncache', 'shared', |
|
26 'dotencode')) |
26 |
27 |
27 def __init__(self, baseui, path=None, create=0): |
28 def __init__(self, baseui, path=None, create=0): |
28 repo.repository.__init__(self) |
29 repo.repository.__init__(self) |
29 self.root = os.path.realpath(util.expandpath(path)) |
30 self.root = os.path.realpath(util.expandpath(path)) |
30 self.path = os.path.join(self.root, ".hg") |
31 self.path = os.path.join(self.root, ".hg") |
50 if self.ui.configbool('format', 'usestore', True): |
51 if self.ui.configbool('format', 'usestore', True): |
51 os.mkdir(os.path.join(self.path, "store")) |
52 os.mkdir(os.path.join(self.path, "store")) |
52 requirements.append("store") |
53 requirements.append("store") |
53 if self.ui.configbool('format', 'usefncache', True): |
54 if self.ui.configbool('format', 'usefncache', True): |
54 requirements.append("fncache") |
55 requirements.append("fncache") |
|
56 if self.ui.configbool('format', 'dotencode', True): |
|
57 requirements.append('dotencode') |
55 # create an invalid changelog |
58 # create an invalid changelog |
56 self.opener("00changelog.i", "a").write( |
59 self.opener("00changelog.i", "a").write( |
57 '\0\0\0\2' # represents revlogv2 |
60 '\0\0\0\2' # represents revlogv2 |
58 ' dummy changelog to prevent using the old repo layout' |
61 ' dummy changelog to prevent using the old repo layout' |
59 ) |
62 ) |