Am 27.03.2014 um 08:46 schrieb Pavel Sanda <sa...@lyx.org>: > Georg Baum wrote: >> Stephan Witt wrote: >> >>> Am 24.01.2014 um 19:05 schrieb Pavel Sanda <sa...@lyx.org>: >>> >>>> Stephan Witt wrote: >>>>> I've played a little bit with SVN and LyX and there are IMO some issues >>>>> when locking is enabled. >>>>> >>>>> 1. When a file isn't locked the file is not writable. Ok. >>>>> That's why the rename operation is block in GuiView::dispatchVC(). >>>>> But it's not disabled in GuiView::getStatus(). >>>>> >>>>> 2. When a file isn't locked the copy operation is blocked too. >>>>> That's questionable. The copy operation doesn't touch the original. >> >> I agree, this was an oversight. >> >>>>> 3. With SVN 1.8 the revert operation has change it's behavior. >>>>> I'm not sure if it's a bug of SVN or not. A possible workaround >>>>> I can see is to unlock before lock and ignore the possible error. >>>>> >>>>> See http://www.lyx.org/trac/ticket/8937#comment:15 >>>>> >>>>> Attached is a simple patch for 1. > > Stephan did you finally committed that patch or should we open bug to > track these issues?
No, a new bug would be better. Applying the patch improves the situation only a little bit. There is more work to be done with these locking issues. Stephan > > Pavel > >>>>> Regarding the other topics I'd like to ask for comments. >>>> >>>> Most probably Georg didn't test the new routines with locking, >>>> your comments seem sensible. >> >> Actually I don't know anymore, but it looks like your guess is right;-( >> >>> I've tried to fix these issues. But there are more questions >>> than answers now. :( >>> >>> 1. Nitpicking issue: >>> * toFilesystemEncoding() isn't used all over the place. >>> * to_utf8 for file name arguments doesn't look right >> >> Yes. I have seen this at several places even outside VCS, however I did not >> change it because I am unable to test (being on linux with a utf8 locale and >> utf8 filesystem). >> >>> 2. Locking issue: >>> With locking enabled neither move nor copy work. >>> >>> When copy and move where successfully done the backend >>> does automatically commit this change. This implies the >>> working file is made clean and read only. The problem >>> is the next step. After returning from lyxvc operation >>> in GuiView::renameBuffer() the current buffer should be >>> written to disk with saveBuffer(). But this fails because >>> of the read only buffer. >>> >>> What's the best antidote in this case? Is it really a must >>> to save the buffer after the lyxvc operation? >> >> The reason to save is given in the comment above the saveBuffer() call: To >> get relative paths right. However, this should be done before the commit. >> IIRC I added the automatic commit for consistency reasons later and it did >> not exist in the first version, and therefore it worked. >> >> The correct fix to the problem would be to move the save call into the >> individual rename and copy methods of the VCS backends. Then all should >> work. >> >> >> Georg