diff -r d5357238eda9 -r 73a33fe625bb mercurial/changegroup.py --- a/mercurial/changegroup.py Sat Jan 26 11:23:31 2019 -0800 +++ b/mercurial/changegroup.py Tue Jan 29 15:43:02 2019 +0300 @@ -930,6 +930,13 @@ changedfiles = set() clrevtomanifestrev = {} + state = { + 'clrevorder': clrevorder, + 'manifests': manifests, + 'changedfiles': changedfiles, + 'clrevtomanifestrev': clrevtomanifestrev, + } + # Callback for the changelog, used to collect changed files and # manifest nodes. # Returns the linkrev node (identity in the changelog case). @@ -970,13 +977,6 @@ return x - state = { - 'clrevorder': clrevorder, - 'manifests': manifests, - 'changedfiles': changedfiles, - 'clrevtomanifestrev': clrevtomanifestrev, - } - gen = deltagroup( self._repo, cl, nodes, True, lookupcl, self._forcedeltaparentprev,