hgext3rd/evolve/genericcaches.py
changeset 3239 0c8c7b5274a5
parent 3238 88f11b9881b2
child 3279 4a9718a83602
--- a/hgext3rd/evolve/genericcaches.py	Wed Nov 22 13:40:47 2017 +0100
+++ b/hgext3rd/evolve/genericcaches.py	Wed Nov 22 13:44:44 2017 +0100
@@ -91,6 +91,11 @@
         """
         raise NotImplementedError
 
+    @abc.abstractmethod
+    def _updatesummary(self, data):
+        """return a small string to be included in debug output"""
+        raise NotImplementedError
+
     # Useful "public" function (no need to override them)
 
     def update(self, repo):
@@ -114,8 +119,9 @@
         starttime = util.timer()
         self._updatefrom(repo, data)
         duration = util.timer() - starttime
-        repo.ui.log('cache', 'updated %s in %.4f seconds\n',
-                    self._cachename, duration)
+        summary = self._updatesummary(data)
+        repo.ui.log('cache', 'updated %s in %.4f seconds (%s)\n',
+                    self._cachename, duration, summary)
 
         self._cachekey = newkey
 
@@ -164,3 +170,6 @@
 
     def _fetchupdatedata(self, repo):
         return self._fetchchangelogdata(self._cachekey, repo.changelog)
+
+    def _updatesummary(self, data):
+        return '%ir' % len(data)