hgext/churn.py
changeset 9321 d7b6429c5ad4
parent 9254 db13255617b3
child 9367 1ef630452e0b
child 9557 dbe2bdd5e488
equal deleted inserted replaced
9320:884964f99e07 9321:d7b6429c5ad4
    22     t.use_template(tmpl)
    22     t.use_template(tmpl)
    23     return t
    23     return t
    24 
    24 
    25 def changedlines(ui, repo, ctx1, ctx2, fns):
    25 def changedlines(ui, repo, ctx1, ctx2, fns):
    26     lines = 0
    26     lines = 0
    27     fmatch = cmdutil.match(repo, pats=fns)
    27     fmatch = cmdutil.matchfiles(repo, fns)
    28     diff = ''.join(patch.diff(repo, ctx1.node(), ctx2.node(), fmatch))
    28     diff = ''.join(patch.diff(repo, ctx1.node(), ctx2.node(), fmatch))
    29     for l in diff.split('\n'):
    29     for l in diff.split('\n'):
    30         if (l.startswith("+") and not l.startswith("+++ ") or
    30         if (l.startswith("+") and not l.startswith("+++ ") or
    31             l.startswith("-") and not l.startswith("--- ")):
    31             l.startswith("-") and not l.startswith("--- ")):
    32             lines += 1
    32             lines += 1