TortoiseHG fails with:
[Error 32] The process cannot access teh file because it is being used by another process
if I try to shelve only some hunks of a file and all the chunks are deleted from the original file. However the shelf patch is created with only the shelved hunks.
It's however possible to recover the changes made in .hg\Trashcan, but I feel that should be more comfortable to report the error to the user and let him/her know to stop the other process instead of updating to the original version.
I think that the file is not in use after all if it is possible to update it back to the original version... This happens when I have Visual Studio 6.0 with the same file open when I shelve. Probably after the first update Visual Studio re-reads the file blocking shelve tool to apply only selected chunks?