Show More
@@ -209,25 +209,28 class bundlerepository(localrepo.localre | |||
|
209 | 209 | # dict with the mapping 'filename' -> position in the bundle |
|
210 | 210 | self.bundlefilespos = {} |
|
211 | 211 | |
|
212 | def __getattr__(self, name): | |
|
213 | if name == 'changelog': | |
|
214 |
|
|
|
212 | @util.propertycache | |
|
213 | def changelog(self): | |
|
214 | c = bundlechangelog(self.sopener, self.bundlefile) | |
|
215 | 215 |
|
|
216 |
|
|
|
217 | elif name == 'manifest': | |
|
216 | return c | |
|
217 | ||
|
218 | @util.propertycache | |
|
219 | def manifest(self): | |
|
218 | 220 |
|
|
219 |
|
|
|
220 | self.changelog.rev) | |
|
221 | m = bundlemanifest(self.sopener, self.bundlefile, self.changelog.rev) | |
|
221 | 222 |
|
|
222 |
|
|
|
223 | elif name == 'manstart': | |
|
223 | return m | |
|
224 | ||
|
225 | @util.propertycache | |
|
226 | def manstart(self): | |
|
224 | 227 |
|
|
225 | 228 |
|
|
226 | elif name == 'filestart': | |
|
229 | ||
|
230 | @util.propertycache | |
|
231 | def filestart(self): | |
|
227 | 232 |
|
|
228 | 233 |
|
|
229 | else: | |
|
230 | return localrepo.localrepository.__getattr__(self, name) | |
|
231 | 234 | |
|
232 | 235 | def url(self): |
|
233 | 236 | return self._url |
@@ -15,6 +15,7 import match as match_ | |||
|
15 | 15 | import merge as merge_ |
|
16 | 16 | |
|
17 | 17 | from lock import release |
|
18 | propertycache = util.propertycache | |
|
18 | 19 | |
|
19 | 20 | class localrepository(repo.repository): |
|
20 | 21 | capabilities = set(('lookup', 'changegroupsubset')) |
@@ -88,24 +89,23 class localrepository(repo.repository): | |||
|
88 | 89 | self._datafilters = {} |
|
89 | 90 | self._transref = self._lockref = self._wlockref = None |
|
90 | 91 | |
|
91 | def __getattr__(self, name): | |
|
92 | if name == 'changelog': | |
|
93 |
|
|
|
92 | @propertycache | |
|
93 | def changelog(self): | |
|
94 | c = changelog.changelog(self.sopener) | |
|
94 | 95 |
|
|
95 | 96 |
|
|
96 | 97 |
|
|
97 |
|
|
|
98 |
|
|
|
99 |
|
|
|
100 | if name == 'manifest': | |
|
101 | self.changelog | |
|
102 | self.manifest = manifest.manifest(self.sopener) | |
|
103 |
|
|
|
104 | if name == 'dirstate': | |
|
105 | self.dirstate = dirstate.dirstate(self.opener, self.ui, self.root) | |
|
106 | return self.dirstate | |
|
107 | else: | |
|
108 | raise AttributeError(name) | |
|
98 | c.readpending('00changelog.i.a') | |
|
99 | self.sopener.defversion = c.version | |
|
100 | return c | |
|
101 | ||
|
102 | @propertycache | |
|
103 | def manifest(self): | |
|
104 | return manifest.manifest(self.sopener) | |
|
105 | ||
|
106 | @propertycache | |
|
107 | def dirstate(self): | |
|
108 | return dirstate.dirstate(self.opener, self.ui, self.root) | |
|
109 | 109 | |
|
110 | 110 | def __getitem__(self, changeid): |
|
111 | 111 | if changeid == None: |
General Comments 0
You need to be logged in to leave comments.
Login now