changegroup: include subdirectory manifests in verbose size
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 12 Feb 2016 15:42:16 -0800
changeset 28229 8e13b2379407
parent 28228 abf120262683
child 28230 0c2a088ffcc5
changegroup: include subdirectory manifests in verbose size When verbose logging is one, we report the size in bytes of the manifest data in the changegroup. For files, we report the size per file, but I'm not sure we need that level of detail (i.e. size per directory manifest). Instead, report a single figure for the size of root manifest plus submanifests.
mercurial/changegroup.py
--- a/mercurial/changegroup.py	Fri Feb 12 15:18:56 2016 -0800
+++ b/mercurial/changegroup.py	Fri Feb 12 15:42:16 2016 -0800
@@ -824,10 +824,11 @@
         for x in self._packmanifests('', mfnodes, lookupmflinknode):
             size += len(x)
             yield x
-        self._verbosenote(_('%8.i (manifests)\n') % size)
         for dir, nodes in tmfnodes.iteritems():
             for x in self._packmanifests(dir, nodes, nodes.get):
+                size += len(x)
                 yield x
+        self._verbosenote(_('%8.i (manifests)\n') % size)
         yield self._manifestsdone()
 
     # The 'source' parameter is useful for extensions