Displaying template "file_copies" keyword without --copies
Matt Mackall
mpm at selenic.com
Fri Dec 4 13:12:59 CST 2009
On Wed, 2009-12-02 at 15:32 +0100, Patrick Mézard 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:
>
> -------------------------
> ERROR: test-command-template output changed
> --- Expected output
> +++ Test output
> @@ -4,7 +4,29 @@
> # default style is like normal output
> # normal
> # verbose
> +log.out style.out differ: char 141, line 6
> +--- log.out 2009-12-02 14:17:26.000000000 +0000
> ++++ style.out 2009-12-02 14:17:26.000000000 +0000
> +@@ -3,6 +3,7 @@
> + user: test
> + date: Wed Jan 01 10:01:00 2020 +0000
> + files: fourth second third
> ++copies: fourth (second)
> + description:
> + third
> +
> # debug
> +log.out style.out differ: char 351, line 10
> +--- log.out 2009-12-02 14:17:26.000000000 +0000
> ++++ style.out 2009-12-02 14:17:26.000000000 +0000
> +@@ -7,6 +7,7 @@
> + date: Wed Jan 01 10:01:00 2020 +0000
> + files+: fourth third
> + files-: second
> ++copies: fourth (second)
> + extra: branch=default
> + description:
> + third
> # revision with no copies (used to print a traceback)
>
> # compact style works
> !
> -------------------------
>
> 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?
4- Have two variables: one that matches the current behavior (and name)
and one that always shows copies?
--
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel
mailing list