diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -707,15 +707,14 @@ lookuplinknode, units=_('manifests')): yield chunk - def _packtreemanifests(self, dir, mfnodes, lookuplinknode): - """Version of _packmanifests that operates on directory manifests. + def _packmanifestsdirheader(self, dir, mfnodes, lookuplinknode): + """Version of _packmanifests that encodes the directory name. Encodes the directory name in the output so multiple manifests can be sent. """ - assert self.version == b'03' - if dir: + assert self.version == b'03' yield self._fileheader(dir) # TODO violates storage abstractions by assuming revlogs. @@ -902,7 +901,7 @@ return clnode return lookupmflinknode - fn = (self._packtreemanifests if self._sendtreemanifests + fn = (self._packmanifestsdirheader if self._sendtreemanifests else self._packmanifests) size = 0 while tmfnodes: