Displaying template "file_copies" keyword without --copies

Patrick Mézard pmezard at gmail.com
Sun Dec 13 17:11:50 UTC 2009


Le 11/12/09 21:22, Matt Mackall a écrit :
> On Fri, 2009-12-11 at 15:12 -0500, Greg Ward wrote:
>> On Thu, Dec 10, 2009 at 3:59 PM, Patrick Mézard <pmezard at gmail.com> wrote:
>>>> 4- Have two variables: one that matches the current behavior (and name)
>>>> and one that always shows copies?
>>>
>>> Not easy to come up with an elegant name. At least, it should draw the attention on {file_copies} special behaviour.
>>>
>>> {file_copies_forced}
>>> {file_copies_always}
>>> {file_copyrecords}
>>> ?
>>
>> I like {file_copies_always}, or maybe {filecopies_always}, which
>> nudges it closer to normal hg "no underscores" usage, while leaving in
>> one underscore which maybe sort-of hints that the "always" is weird.
>> Specifically, it's not about content, but about behaviour: this is a
>> hack for backwards compatibility.  Documenting this concisely will be
>> tricky!
> 
> It's got to match up with these names from hg help templates:
> 
>     files       List of strings. All files modified, added, or removed by this
>                 changeset.
>     file_adds   List of strings. Files added by this changeset.
>     file_mods   List of strings. Files modified by this changeset.
>     file_dels   List of strings. Files removed by this changeset.
> 
> Interestingly, copies isn't mentioned here.
> 
> I might be convinced that the right thing to do is:
> 
> file_copies: always on
> file_copies_switch: only with --copies switch
> 
> and adjust the current templates.

In crew as http://hg.intevation.org/mercurial/crew/rev/9e2ab10728a2 and ancestors.

I am not completely sure about the new 'repo', 'ctx', 'templ', 'cache' and 'revcache' arguments, but there is time before the release to rename them like 'repo_' if we think they are too likely to cause template collisions

--
Patrick Mézard




More information about the Mercurial-devel mailing list