| Summary: | 'Replace with Revision' action fails if svn:needs-lock property is set | ||
|---|---|---|---|
| Product: | [Technology] Subversive | Reporter: | Stefan Sperling <stsp> |
| Component: | Core | Assignee: | Igor Burilo <igor.burilo> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Stefan Sperling
> Subversive should ensure that the destination is indeed writable before copying a temporary file on top of it.
From one side, adding such a verification will require to check properties on every file, which for big working copies can take much time. From the other side, if replace operation fails because of locks on files, you can always revert all changes.
The property check does not need to be done for every file (and even if, I'd rather have a feature that works well but performs less well than a feature that does not really work). What about doing the property check inside a handler of the "access denied" exception, and if the svn:needs-lock property exists on the file, tweak file permission to writable, and do the copy? I don't recall the details, but assuming the copy transfers properties correctly (I hope it does), check for the svn:needs-lock property again (the old version of the file might not have it), and if the svn:needs-lock property is still present, make the file to read-only again. I don't understand how reverting changes will help here. There are no local changes in the working copy being replaced with the state of another revision. I think it's quite complicated what you proposed also taking into account that using locks in SVN isn't widely used. The solution I proposed is: run replace action, if you have error because some file needs locking you revert all changes (if needed), lock that file and run replace action once again. |