indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  https://phab.mercurial-scm.org/rHG0548f696795b6f30c32f11620ddc274a112260d3 
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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4155

AFFECTED FILES
  mercurial/changegroup.py

CHANGE DETAILS

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -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()



To: indygreg, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to