comparison mercurial/changegroup.py @ 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 9134c4e46084
children 87b737b78bd0
comparison
equal deleted inserted replaced
38973:633249d226c7 38974:4f06e0360bad
602 self._clnodetorev = {} 602 self._clnodetorev = {}
603 603
604 def _close(self): 604 def _close(self):
605 # Ellipses serving mode. 605 # Ellipses serving mode.
606 self._clrevtolocalrev.clear() 606 self._clrevtolocalrev.clear()
607 if self._nextclrevtolocalrev: 607 if self._nextclrevtolocalrev is not None:
608 self._clrevtolocalrev = self._nextclrevtolocalrev 608 self._clrevtolocalrev = self._nextclrevtolocalrev
609 self._nextclrevtolocalrev.clear() 609 self._nextclrevtolocalrev = None
610 self._changelogdone = True 610 self._changelogdone = True
611 611
612 return closechunk() 612 return closechunk()
613 613
614 def _fileheader(self, fname): 614 def _fileheader(self, fname):