D6953: sidedatacopies: read rename information from sidedata
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Oct 9 18:45:40 UTC 2019
martinvonz added inline comments.
INLINE COMMENTS
> marmoute wrote in changelog.py:369-371
> I am confused, the function should return a list or None. Since rawindides are bytes, they are not eligible for returns.
> I updated the code as follow:
>
> --- a/mercurial/changelog.py
> +++ b/mercurial/changelog.py
> @@ -366,9 +366,9 @@ class changelogrevision(object):
> rawindices = self._sidedata.get(sidedatamod.SD_FILESADDED)
> else:
> rawindices = self.extra.get(b'filesadded')
> - if rawindices is not None:
> - rawindices = decodefileindices(self.files, rawindices)
> - return rawindices
> + if rawindices is None:
> + return None
> + return decodefileindices(self.files, rawindices)
>
> @property
> def filesremoved(self):
I think you're saying that you changed it in order to handle `rawindices == b''` correctly. Makes sense.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D6953/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D6953
To: marmoute, #hg-reviewers
Cc: martinvonz, mercurial-devel
More information about the Mercurial-devel
mailing list