[PATCH] mercurial/stable: Add a new -i/--isodate option to `debugstate'

Giorgos Keramidas keramida at ceid.upatras.gr
Fri Jan 11 19:47:24 CST 2008


On 2008-01-11 19:29, Matt Mackall <mpm at selenic.com> wrote:
>On Fri, 2008-01-11 at 23:35 +0200, Giorgos Keramidas wrote:
>> # HG changeset patch
>> # User Giorgos Keramidas <keramida at ceid.upatras.gr>
>> # Date 1200087056 -7200
>> # Node ID 03c1fb34b2fa9d783b6e37a9c11f938a2dbd4064
>> # Parent  1b230f506346a139344ad80005d90487f56c4ca2
>> Add a new -i/--isodate option to `debugstate'
>>
>> The localized version of date/time displayed by the '%x %X'
>> format may vary depending on the current timezone setup.  When
>> debugstate runs with the new -i/--isodate option, it will always
>> display the date using '%Y-%m-%d %H:%M:%S' as the strftime format
>> string.  This makes debugstate output more predictable, and
>> easier to parse in an automated manner.
>
> Why don't we just make this output fixed?

No objection from me.  The `%Y-%m-%d %H:%M:%S' format enabled by the -i
option in the patch is as close as `fixed' we can get.  I was just
reluctant to change the default output of debugstate, in case other
people already depend on the previous format.

> If you're parsing the output of any of the debug commands, you're
> asking for trouble though.

Yes, that's true.  That's why I only changed this place (which I
happened to stumble upon earlier today).  I understand it doesn't make
sense to _depend_ on debug commands to always display the same output.



More information about the Mercurial-devel mailing list