RFC new template keywords (wcmodified, wcmodifieddate) + sampleimpl.

Peter Bray peter.darren.bray at gmail.com
Tue May 31 09:47:35 CDT 2011


On 31/05/11 11:20 PM, Dominik Psenner wrote:
>>>> - 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.
>
> Would one build a modified working copy not just for testing purposes during
> development? If those changes were productive, the developer would version
> control them and after a period of testing release a new version that
> includes those changes? As those changes are now version controlled, one
> doesn't need the "modified working copy" information anymore, does he?

That's how I think and you would think so, as you obviously do :-)

> My point is: Wouldn't releasing software built from modified working copies
> change a support session into a nightmare as nobody is able to tell which
> code's running for real?

I agree completely, and I would NEVER release such a hack to any QA or 
PRODUCTION network. But then I can be quite the CM enforcer ;-)

But I have found that a surprisingly large number of developers treat 
development network and testbeds as a different story, and as part of a 
drive to increase CM best practices, I'm trying to improve all 
identifiability, so "for any artefact on any system we can say where it 
came from".

In corporate environments, it is sometimes amazing what some developers 
will try and get away with (time pressures, lack of clue, laziness, the 
list seems to go on and on). Or the other situation I've encountered is, 
developer's looking at one piece of code and running completely the 
wrong binary, because for example an scp / ftp failed and they weren't 
paying attention. Guess who tends to have to figure that out for them :-(

I suppose I'm trying further improve already good local CM practices, 
and long the way, make the same improvements easier for others to implement.

Regards,
Peter


More information about the Mercurial-devel mailing list