Displaying template "file_copies" keyword without --copies

Matt Mackall mpm at selenic.com
Fri Dec 11 20:22:42 UTC 2009


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.

-- 
http://selenic.com : development and support for Mercurial and Linux





More information about the Mercurial-devel mailing list