diff hgext/evolve.py @ 958:6d18a1ab496c

evolve: add bytes and new marker data when processing part This will helps use to keep printing useful message when pulling through bundle2.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 20 May 2014 15:01:33 -0700
parents 2cde59f3cb5d
children d39a5c8c82ad
line wrap: on
line diff
--- a/hgext/evolve.py	Tue May 20 13:41:27 2014 -0700
+++ b/hgext/evolve.py	Tue May 20 15:01:33 2014 -0700
@@ -2373,7 +2373,12 @@
 def handleobsmarkerv1(op, inpart):
     """add a stream of obsmarker to the repo"""
     tr = op.gettransaction()
-    op.repo.obsstore.mergemarkers(tr, inpart.read())
+    obsdata = inpart.read()
+    totalsize = len(obsdata)
+    old = len(op.repo.obsstore._all)
+    op.repo.obsstore.mergemarkers(tr, obsdata)
+    new = len(op.repo.obsstore._all) - old
+    op.records.add('evo_obsmarkers', {'new': new, 'bytes': totalsize})
 
 def _buildpullobsmerkersboundaries(pullop):
     """small funtion returning the argument for pull markers call