##// END OF EJS Templates
repoview: extract a function for wrapping changelog...
Martin von Zweigbergk -
r43746:d630c571 default
parent child Browse files
Show More
@@ -218,6 +218,12 b' def filterrevs(repo, filtername, visibil'
218 return repo.filteredrevcache[filtername]
218 return repo.filteredrevcache[filtername]
219
219
220
220
221 def wrapchangelog(unfichangelog, filteredrevs):
222 cl = copy.copy(unfichangelog)
223 cl.filteredrevs = filteredrevs
224 return cl
225
226
221 class repoview(object):
227 class repoview(object):
222 """Provide a read/write view of a repo through a filtered changelog
228 """Provide a read/write view of a repo through a filtered changelog
223
229
@@ -286,8 +292,7 b' class repoview(object):'
286 cl = None
292 cl = None
287 # could have been made None by the previous if
293 # could have been made None by the previous if
288 if cl is None:
294 if cl is None:
289 cl = copy.copy(unfichangelog)
295 cl = wrapchangelog(unfichangelog, revs)
290 cl.filteredrevs = revs
291 object.__setattr__(self, r'_clcache', cl)
296 object.__setattr__(self, r'_clcache', cl)
292 object.__setattr__(self, r'_clcachekey', newkey)
297 object.__setattr__(self, r'_clcachekey', newkey)
293 return cl
298 return cl
General Comments 0
You need to be logged in to leave comments. Login now