RFC new template keywords (wcmodified,wcmodifieddate) + sample impl.

Matt Mackall mpm at selenic.com
Tue May 31 10:18:20 CDT 2011


> >> - Templates support for determining if the working copy is modified.
> >>
> >>     In templates, I can't see a way to determine if the working copy
> >>     has been modified. With "hg id -i" the plus (+) is not optional
> >>     ("hg parents --template '{node|short}'" is the alternate). While
> >>     in templates the plus or some indication that the working copy is
> >>     modified does not seem to be available.
> >
> > Indeed, none of the commands that take templates actually pay any
> > attention to the working directory in their display and I don't think
> > it's ever occurred to anyone that they should. So this message is all a
> > little weird to me.
> 
> I suppose my point is that builds are done on working copies not
> repositories, and changes to the working copy (probably) need to be
> summarised in the build revision information. That information is
> available in Mercurial, wouldn't it be nice to have a portable elegant
> way to extract it for the build process, that is flexible enough to
> handle whatever language / build system is in use.

And my point is that this is just a really awkward fit. The commands
that use templating are all about displaying information about revisions
in history and not about telling about the status of the working
directory. For instance, these new variables will make no sense at all
with a normal log command. And the parents command has already been
dropped from the short list of commands shown by 'hg' in favor of
summary.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list