[PATCH 2 of 2] obsstore: issue debug message when adding duplicate markers
Eric Sumner
ericsumner at fb.com
Tue Apr 14 14:13:17 CDT 2015
# HG changeset patch
# User Eric Sumner <ericsumner at fb.com>
# Date 1429037944 14400
# Tue Apr 14 14:59:04 2015 -0400
# Node ID c8fd0a4978ea764b321faa1a98f29c4eec510300
# Parent b30cb32ea6821e165aab65051767aa810fdb8464
obsstore: issue debug message when adding duplicate markers
One of the performance issues with evolve right now is the sending of redundant
obsolete information; this patch tracks and reports this via a debug message
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -583,11 +583,19 @@
raise util.Abort('creating obsolete markers is not enabled on this '
'repo')
known = set(self._all)
+ duplicate = set()
+ count = 0
new = []
for m in markers:
+ count += 1
if m not in known:
known.add(m)
new.append(m)
+ else:
+ duplicate.add(m)
+ if duplicate:
+ self.ui.debug(_('obsolete: %i/%i added markers are duplicates\n')
+ % (len(duplicate), count))
if new:
f = self.sopener('obsstore', 'ab')
try:
More information about the Mercurial-devel
mailing list