You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Rob Weir <ap...@robweir.com> on 2011/06/30 16:40:35 UTC

svn:needs-lock for ODF documents?

Noticed this comment on the CommitterStatus.ods file:

"Wondering: I think I may be about to experience the disadvantage of
binary documents in SVN.  If I have a collision, finding a way to
merge has to be all off-line and I could collide for a long time while
working on this document off-line.  Heh."

There is a technique we could use in SVN to make binary collisions less likely.

If we set the svn:needs-lock property for the file, then when it is
checked in, the working copy will be read-only at the OS level.  If
the user then locks the file in SVN, it becomes writable.    And when
committed the lock is released and the working copy is read-only
again.

In general locking is a bad thing, but there are trade-off's when
dealing with binary files that cannot be merged or even effectively
diff'ed if simultaneously edited.

-Rob