Mercurial > hg
changeset 38974:4f06e0360bad
changegroup: restore original behavior of _nextclrevtolocalrev
0548f696795b accidentally changed the behavior of cgpacker._close().
The old behavior moved _nextclrevtolocalrev to _clrevtolocalrev only
when _nextclrevtolocalrev was present and then removed
_nextclrevtolocalrev. The bad behavior performed this move
then cleared _clrevtolocalrev because it was the same object as
_nextclrevtolocalrev.
This commit restores the previous behavior.
Surprisingly, no tests changed as a result of this bad logic. I'm
not sure why.
Differential Revision: https://phab.mercurial-scm.org/D4155
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 07 Aug 2018 10:24:49 -0700 |
parents | 633249d226c7 |
children | 87b737b78bd0 |
files | mercurial/changegroup.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/changegroup.py Thu Aug 09 12:03:39 2018 -0400 +++ b/mercurial/changegroup.py Tue Aug 07 10:24:49 2018 -0700 @@ -604,9 +604,9 @@ def _close(self): # Ellipses serving mode. self._clrevtolocalrev.clear() - if self._nextclrevtolocalrev: + if self._nextclrevtolocalrev is not None: self._clrevtolocalrev = self._nextclrevtolocalrev - self._nextclrevtolocalrev.clear() + self._nextclrevtolocalrev = None self._changelogdone = True return closechunk()