diff -r c2ecaf63bade -r 206334f8aa0b hgext/churn.py --- a/hgext/churn.py Sun Mar 22 20:59:03 2009 +0100 +++ b/hgext/churn.py Tue Mar 24 16:41:41 2009 -0500 @@ -21,9 +21,10 @@ t.use_template(tmpl) return t -def changedlines(ui, repo, ctx1, ctx2): +def changedlines(ui, repo, ctx1, ctx2, fns): lines = 0 - diff = ''.join(patch.diff(repo, ctx1.node(), ctx2.node())) + fmatch = cmdutil.match(repo, pats=fns) + diff = ''.join(patch.diff(repo, ctx1.node(), ctx2.node(), fmatch)) for l in diff.split('\n'): if (l.startswith("+") and not l.startswith("+++ ") or l.startswith("-") and not l.startswith("--- ")): @@ -71,7 +72,7 @@ continue ctx1 = parents[0] - lines = changedlines(ui, repo, ctx1, ctx) + lines = changedlines(ui, repo, ctx1, ctx, fns) rate[key] = rate.get(key, 0) + lines if opts.get('progress'):