[PATCH 1 of 8 RFC] localrepo: extend "changeid in repo" to return True for workingctx revision

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Aug 21 12:03:43 CDT 2014



On 08/20/2014 08:01 AM, Yuya Nishihara wrote:
> On Tue, 19 Aug 2014 16:41:29 -0700, Pierre-Yves David wrote:
>> On 08/19/2014 03:56 PM, Yuya Nishihara wrote:
>>> # HG changeset patch
>>> # User Yuya Nishihara <yuya at tcha.org>
>>> # Date 1408242931 -32400
>>> #      Sun Aug 17 11:35:31 2014 +0900
>>> # Node ID 0e8b104fd419419ddf9ec3c9df4df1991e9ba3a5
>>> # Parent  8dda6f6ff564d8fe6ac7b8ce4c74eb9bfb5de14a
>>> localrepo: extend "changeid in repo" to return True for workingctx revision
>>
>> I love the idea of having annotate agains working directory (could
>> probably be extended to some other command) but I'm really not a fan of
>> messing with the revision rumbering.
>
> I see.
>
>> Is there a way to get the same feature without messaging with a 9 yeah
>> old numerotation scheme?
>
> Maybe the easiest way is to add -W,--working-directory option.  It won't
> break existing code base.

The idea of being able to use the working directory sounds good. Can we 
make a list of command where it would make sense? (and a list of where 
it would be actually useful). If the corpus is big enough, it probably 
worth implementing something in core.

I made a deeper review of your series, and you seems to "confuse" 
commitablectx with working directory. Commitablectx may also be in 
memctx (in memory changeset about to be commited) it is not clear if you 
took that in account in your patches. That said, being able to run 
operation on in memory ctx may be quite nice too (no precise usecase yet)

Conclusion: the implementation is too bold, but the idea might worth 
pursuing.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list