Issue 480: Endless refresh status loop
Adrian Buehlmann / abuehl on Tue, 11 Aug 2009 00:12:28 +0200:
The unset entries thing is a nastiness that mercurial leaves in the .hg/dirstate file. It's by design.
See http://mercurial.selenic.com/wiki/DirState for the gory details.
The shell extension (explorer.exe, that is) never writes .hg/dirstate. It only reads it.
Processes like "hg status" or "hgtk thgstatus" or "thgstatus.exe doing an update" all fix them as a side effect (that is, they eliminate the unset entries in .hg/dirstate -- at least they **should **if they work as expected).
You can often see unset entries after a largeish 'hg update' (or after a 'hg clone', which implies by default a 'hg update' at the end).
Various conditions trigger the shell extension to send an update request to thgstatus.exe. Unset entries in .hg/dirstate are one of them.
In other words, if the shell extension finds an unset entry in .hg/dirstate, it sends an update request to thgstatus.exe, which in turn implies a 'hg status' (basically), which causes a rewrite of .hg/dirstate. thgstatus.exe then sends a request to the "shell" (explorer.exe) to refresh the overlay icons, which in turn triggers the shell extension to reread .hg/dirstate.
So, unset entries are normal and expected. The thing that isn't expected is the endless update loop you see. We might have some timing/racing bug(s) left lurking in that whole system that affect huge repos.
The duration of hg status in itself shouldn't be a problem. If everything would work fine, it should just take whatever time it needs to update the icons -- that's all. ~5 or 7 seconds on such a huge repo wouldn't be that bad.
I will try to investigate this tomorrow (UTC+2).
This is an issue notification from bitbucket.org.
You are receiving this either because you are the
owner of the issue, or you are following the issue.