[PATCH 0 of 3] patches for TortoiseHg overlay icons

Adrian Buehlmann adrian at cadifra.com
Wed May 20 13:07:26 CDT 2009


These changes would enable TortoiseHg to update
the overlay icons on Windows explorer (the Windows "Desktop").
Folks are very keen on having those icons. Now it would
be possible to have them at an acceptable speed, even
for large repos with number of files in the >10K range.
We are currently directly reading .hg/dirstate
with a dll that is loaded by explorer (a so called
shell extension, written in C++, complied with MingW --
design idea taken from CuteHg project).

The patch series makes sure, that we have no 'unset' entries
in .hg/dirstate (see 'hg debugstate' after e.g. clone) when
Mercurial finishes, and provides a new hook that is called
_after_ .hg/dirstate has been updated by Mercurial.

The cost for a "clean" .hg/dirstate is, that we have to wait
'granularity' seconds between writing the working tree
and writing .hg/dirstate, so that they are not written
within the same tick of the clock. For hg cli usage, this is
currently postponed to the next hg status invocation. For
our C++ shell extension, which is constantly nailed by
explorer, we can't do that: We have to provide a clean
.hg/dirstate, because explorer wants to know 'hg status'
immediately after touching anything in the working tree.

The 1s waiting is enabled with a config option (default=off),
such that only the TortoiseHg users using their installer will
be paying the one second speed penalty on update/merge.

Testsuite passed on FreeBSD.



More information about the Mercurial-devel mailing list