On Dec 8, 2010, at 07:39, Merkle Andreas wrote:

> we have a lot of binary files, e. g. word documents, schematics, etc., which 
> are containing the revision number.
> If such a file is updated, it won’t be possible to estimate the revision 
> which the file really get.
> Example:
> Document A has rev. 10 … now I lock it, update it and write rev. 11 in the 
> document. Now I commit the document,
> but a colleague commits one second before a file to the repository. The 
> problem is that my document
> contains inside now the wrong rev. as text.
> Is it possible somehow to avoid this? The only chance I see at the moment is 
> to lock the whole repository, but that
> is not really a good solution.

If the text you type into the document will appear in the binary file in plain 
text (as it seems to in Word files for example), then you can use Subversion 
keywords as you would in any text file. Subversion has fixed-width versions of 
its keywords that you would use in this case, to ensure that expanding the 
keyword won't corrupt the file. So just type "$Rev::    $" or "$Id::            
  $" in your document, and set svn:keywords on that document to that key. Make 
sure you use double colons after the keyword name so that you get the 
fixed-width versions, otherwise you will corrupt the file.

See:

http://svnbook.red-bean.com/nightly/en/svn.advanced.props.special.keywords.html


Reply via email to