- attached unlink.diff
Making util.unlink() check the readonly flag for Windows support
hg update currently dies when it tries to remove a readonly file on Windows - os.Unlink() fails unless the file is read-write. Here's a change that monkeypatches util.unlink() to behave the same way as the modified util.opener. I've factored out a couple of functions to avoid duplication.
This is useful for those of us who have to bridge to Microsoft's VCS, team foundation server. The common pattern is to clone a repo created in TFS's working directory, and work in the clone. Makewritable makes it easy to push and update changes back into the TFS working folder, but if any files have been deleted in the clone they currently need to be set read/write by hand or the update fails.
Comments (3)
-
-
- changed status to open
-
assigned issue to
-
Looks nice! Thanks for the contribution, I'll test and push it here if all works out...
- Log in to comment