Show More
@@ -306,6 +306,9 b' class changelogrevision(object):' | |||||
306 | def changes(self): |
|
306 | def changes(self): | |
307 | if self._changes is not None: |
|
307 | if self._changes is not None: | |
308 | return self._changes |
|
308 | return self._changes | |
|
309 | if self._cpsd: | |||
|
310 | changes = metadata.decode_files_sidedata(self, self._sidedata) | |||
|
311 | else: | |||
309 | changes = metadata.ChangingFiles( |
|
312 | changes = metadata.ChangingFiles( | |
310 | touched=self.files or (), |
|
313 | touched=self.files or (), | |
311 | added=self.filesadded or (), |
|
314 | added=self.filesadded or (), |
@@ -342,6 +342,32 b' def encode_files_sidedata(files):' | |||||
342 | return sidedata |
|
342 | return sidedata | |
343 |
|
343 | |||
344 |
|
344 | |||
|
345 | def decode_files_sidedata(changelogrevision, sidedata): | |||
|
346 | """Return a ChangingFiles instance from a changelogrevision using sidata | |||
|
347 | """ | |||
|
348 | touched = changelogrevision.files | |||
|
349 | ||||
|
350 | rawindices = sidedata.get(sidedatamod.SD_FILESADDED) | |||
|
351 | added = decodefileindices(touched, rawindices) | |||
|
352 | ||||
|
353 | rawindices = sidedata.get(sidedatamod.SD_FILESREMOVED) | |||
|
354 | removed = decodefileindices(touched, rawindices) | |||
|
355 | ||||
|
356 | rawcopies = sidedata.get(sidedatamod.SD_P1COPIES) | |||
|
357 | p1_copies = decodecopies(touched, rawcopies) | |||
|
358 | ||||
|
359 | rawcopies = sidedata.get(sidedatamod.SD_P2COPIES) | |||
|
360 | p2_copies = decodecopies(touched, rawcopies) | |||
|
361 | ||||
|
362 | return ChangingFiles( | |||
|
363 | touched=touched, | |||
|
364 | added=added, | |||
|
365 | removed=removed, | |||
|
366 | p1_copies=p1_copies, | |||
|
367 | p2_copies=p2_copies, | |||
|
368 | ) | |||
|
369 | ||||
|
370 | ||||
345 | def _getsidedata(srcrepo, rev): |
|
371 | def _getsidedata(srcrepo, rev): | |
346 | ctx = srcrepo[rev] |
|
372 | ctx = srcrepo[rev] | |
347 | filescopies = computechangesetcopies(ctx) |
|
373 | filescopies = computechangesetcopies(ctx) |
General Comments 0
You need to be logged in to leave comments.
Login now