[PATCH] templatekw: add 'dirty' keyword to indicate a dirty working directory

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Jun 23 19:37:48 CDT 2015



On 06/23/2015 04:00 PM, Yuya Nishihara wrote:
>> diff --git a/tests/test-status.t b/tests/test-status.t
>> --- a/tests/test-status.t
>> +++ b/tests/test-status.t
>> @@ -239,6 +239,11 @@ Test templater support:
>>     abort: "status" not in template map
>>     [255]
>>
>> +  $ hg log -r 'wdir()' -T "{if(dirty, '{p1node|short}', '{node|short}')}{dirty}\n"
>> +  389aef86a55e+
>> +  $ hg log -r tip -T "{if(dirty, '{p1node|short}', '{node|short}')}{dirty}\n"
>> +  389aef86a55e
>
> Do you plan to use the '{dirty}' keyword for log templates?
> I don't think it will be usable for the "changeset:" field because the wdir
> revision should be identified differently from the p1, even if it isn't dirty.
>
> % hg log -r 'wdir()' -Tdefault
> changeset:   29549:7fdd1782fc4e  # should have something even if it isn't dirty
> parent:      29549:7fdd1782fc4e
> user:        ...

Yuya. If you want to go through the trouble of creating a patchwork 
account (http://patchwork.serpentine.com/project/hg/list/) I would 
happily mark this patch "under review" by "you"

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list