changeset 38979:6d726d1b08cb

changegroup: record changelogdone after fully consuming its data Setting this as a side-effect of calling _close() is wonky. There's only one group for changelog data. So we can wait until after all data has been emitted before recording it. Differential Revision: https://phab.mercurial-scm.org/D4136
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 03 Aug 2018 18:31:00 -0700
parents d2ab0db89465
children 4a202bccafcf
files mercurial/changegroup.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changegroup.py	Mon Aug 06 09:24:35 2018 -0700
+++ b/mercurial/changegroup.py	Fri Aug 03 18:31:00 2018 -0700
@@ -607,7 +607,6 @@
         if self._nextclrevtolocalrev is not None:
             self._clrevtolocalrev = self._nextclrevtolocalrev
             self._nextclrevtolocalrev = None
-        self._changelogdone = True
 
         return closechunk()
 
@@ -730,6 +729,8 @@
 
         self._verbosenote(_('%8.i (changelog)\n') % size)
 
+        self._changelogdone = True
+
         clrevorder = clstate['clrevorder']
         mfs = clstate['mfs']
         changedfiles = clstate['changedfiles']