My latest attempt at fixing issue2264 (dirstate race on multiple commits in the same process), this time split into three easy-to-digest patches. BTW, this is not for stable. I don't know what I was thinking this morning when I sent it flagged 'STABLE?'. Greg