[PATCH 0 of 2] diffstat in templates
Alexander Solovyov
piranha at piranha.org.ua
Wed Feb 4 21:57:44 UTC 2009
Hi,
there is again changes to changeset_templater, adding ability to compute
diffstat.
Now it comes with a patch, which refines changeset_templater itself to
use context. This is slightly slower, but difference is like 0.239 vs 0.241
for a history in a ~1k of revisions. I've runned ~10 times both variants,
and while this test is not scientific, it shows that code can be used.
Second patch got util.iterlines() function, which yields lines one by one.
Or I could change patch.diff, but looks like this wouldn't change a lot.
Matt Mackall wrote:
> Also it looks like doing a log -p with a diffstat will compute the diff
> twice, am I missing something?
Yes, you are right, but one way I see to fix that is using some form of
cache. I don't think that this should be done as diffstat is not a
performance critical place, right?
More information about the Mercurial-devel
mailing list