# HG changeset patch # User Alexander Solovyov # Date 2010-12-07 14:50:28 # Node ID 8f29a08e7bbc5ebc06805578c62b5fd4e82038ae # Parent a98a9002326150d3afe569404fa4fe309b73b1ad templatekw.showdiffstat: use ctx.diff() instead of calling patch diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -162,9 +162,8 @@ def showdescription(repo, ctx, templ, ** return ctx.description().strip() def showdiffstat(repo, ctx, templ, **args): - diff = patch.diff(repo, ctx.parents()[0].node(), ctx.node()) files, adds, removes = 0, 0, 0 - for i in patch.diffstatdata(util.iterlines(diff)): + for i in patch.diffstatdata(util.iterlines(ctx.diff())): files += 1 adds += i[1] removes += i[2]