On 02.07.2010 09:17, TK Soh wrote:
> I am rather confused on something about the overlay icons (using thg
> 1.1) on Windows XP (32bit, SP3): the overlay icon of modified file
> changes to 'modified' almost immediately after I edit and save a file.
> But the icon remains as 'modified' after I undo the edit and save the
> file. I am aware I can run "Update Icons" to refresh.  Maybe I am
> missing something
> 

Hello Tk, it's been a while since you posted here :-)

That's an effect of the shell extension's design, which is a trade-off
between speed, intruding windows processes with python.dll/mercurial or
not and overlay icon state accuracy.

A trade-off that has been discussed quite a number of times on the
TortoiseHg mailing lists already (IMHO, ad nauseum).

In the use case you cite, the file's timestamp is newer than the file's
timestamp in .hg/dirstate, but the file size hasn't changed (because of
you undoing the file edit).

This state needs a file compare to resolve correctly, which the shell
extension won't do by design (because of the design trade-off choosen).

Try running a 'hg status' in that repo in that case -- mercurial will
update .hg/dirstate and the shell extension will display the correct
icon again (unmodified), even without hitting the F5 key (refresh) in
Windows explorer.

It might be possible to trigger TortoiseHgOverlayServer.exe from the
shell extension in this case too, which basically does the same as 'hg
status' to update .hg/dirstate. In some cases, this already works
automagically, but apparently not in this one.

Perhaps someone might come-up with a fix fir this specific case which
triggers TortoiseHgOverlayServer.exe in this case as well. Just make
sure you don't introduce any endless loops here -- I've been wary of
these when I made the current overlay handler.

"Update icons" will update .hg/dirstate manually though, as you already
found out. Which is good enough for me for this case.


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Tortoisehg-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss

Reply via email to