dirstate hooks

Adrian Buehlmann adrian at cadifra.com
Mon May 18 09:45:06 CDT 2009


On 17.05.2009 19:51, Adrian Buehlmann wrote:
> On 17.05.2009 17:31, Steve Borho wrote:
>> TortoiseHG has introduced C++ explorer extensions on it's development
>> branch.  We've found that directly reading the dirstate cache is an
>> order of magnitude faster than running repo.status(), and more
>> importantly removing the Python shell extensions fixes a large number
>> of interoperability problems that have plagued the project from the
>> beginning.
>>
>> Reading the dirstate file directly has some drawbacks that we would
>> like to try to at least partially work around.  In particular, the 'n'
>> or 'not-set' state which occurs when a file was last modified within a
>> second of it's being scanned.  It happens very consistently after
>> clone and update operations.  I would like to be able to introduce a
>> hook or other UI configuration so that TortoiseHg can opt in for a
>> delay here to wait for the second hand of the system clock to roll
>> over before continuing.
> 
> See also af3f26b6bba4, which introduced config option [ui] 'limit'
> (the granularity of file times, default is 1 second).
> 
> Maybe we could introduce a new config option [ui] 'dirstatewait'?
> With a default of False. If set to True, Mercurial should wait
> for 'limit' seconds (maximum), such that there are no 'unset'
> entries left in .hg/dirstate.

Sorry. Of course we currently have [dirstate] 'granularity'
(not [ui] 'limit', this was renamed by mpm)

So we could name that new option 'wait' and put it in section
'dirstate'.


More information about the Mercurial-devel mailing list