Displaying template "file_copies" keyword without --copies

Greg Ward greg-hg at gerg.ca
Thu Dec 3 16:36:25 CST 2009


On Wed, Dec 2, 2009 at 9:32 AM, Patrick Mézard <pmezard at gmail.com> wrote:
> As suggested in http://www.selenic.com/pipermail/mercurial-devel/2009-November/017148.html , I have a local patch which forces a template or style containing the {file_copies} keyword to always display it instead of doing so only if --copies is passed. The remaining failing test is:
[...]
> This test compares the output of the default changelog and the styled one with a normal, --verbose and --debug output. With my patch, both --verbose and --debug differ because the related styles contain {file_copies} so the copies are displayed even if --copies is not set in the test. What should I do about it ?
>
> 1- Accept the styled changelog outputs are now equivalent only to the --copies non-styled ones?
> 2- Remove the {file_copies} from the styles so they match their non --copies counterpart?
> 3- Give up for this is not a tolerable compatibility breakage?

It seems to me that if a template contains {file_copies}, log should
show copies.  I.e. the current behaviour sounds to me like a bug.  If
it's as simple as that, I would go with #1 and say "the default
templates for --verbose and --debug now show file copy info".

But if there is a performance impact, i.e. it's expensive to expand
{file_copies}, then I'm not so sure.  I suppose in that case we should
remove {file_copies}, at least from --verbose mode of the default log
style.

Tricky one though.  It is a change to log output, but a rather obscure
corner of log output.  And it makes log a little bit more consistent
and sensible.

Greg


>
> --
> Patrick Mézard
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>


More information about the Mercurial-devel mailing list