changeset 3049:461573aa02ef

[churn] Ignore merge csets Merge changesets attributed a large number of lines to people that didn't actually develop it, but simply merged the code. By ignoring merges, we get a more accurate picture of how much code everyone changed.
author Josef "Jeff" Sipek <jeffpc@josefsipek.net>
date Sun, 03 Sep 2006 16:25:41 -0400
parents 8d344bc72e68
children dd1a142988d3
files hgext/churn.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/churn.py	Sun Sep 03 16:23:18 2006 -0400
+++ b/hgext/churn.py	Sun Sep 03 16:25:41 2006 -0400
@@ -14,7 +14,7 @@
 from mercurial.demandload import *
 from mercurial.i18n import gettext as _
 demandload(globals(), 'time sys signal os')
-demandload(globals(), 'mercurial:hg,mdiff,fancyopts,commands,ui,util,templater')
+demandload(globals(), 'mercurial:hg,mdiff,fancyopts,commands,ui,util,templater,node')
 
 def __gather(ui, repo, node1, node2):
     def dirtywork(f, mmap1, mmap2):
@@ -82,6 +82,10 @@
         node2    = cl.node(rev)
         node1    = cl.parents(node2)[0]
 
+	if cl.parents(node2)[1] != node.nullid:
+            ui.note(_('Revision %d is a merge, ignoring...\n') % (rev,))
+	    continue
+
         who, lines = __gather(ui, repo, node1, node2)
 
         # remap the owner if possible