[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn keyword expansion

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: Thu, 3 Jan 2008 20:39:38 -0600

On Jan 3, 2008, at 19:58, Srilakshmanan, Lakshman wrote:

> My understanding is that the svn keyword expansion is performed on
> the client side.
>
> The above being the case, word doc files on the server should never
> be corrupted due to keyword expansion related issues, because the
> keywords are not expanded and stored on the server.
>
> Therefore, how can I retrieve a MSword file without a client
> attempting to perform keyword substitution.
>
> I tried svn export http://%85/ , alas that too substitutes keywords.
> I know this because I have a txt file and a MSword file in the same
> directory.
>
> Any help is much appreciated.
>
> I am aware that keyword expansion is not supported for MSWord
> (binary) files http://svn.haxx.se/users/archive-2007-11/0801.shtml.
> I have *not* got my self into a strife, but was interested in
> having a work around for such an issue.
>

Well...

The client does the keyword substitution, yes. But it does so not
only when checking out or updating a working copy, but also when
committing.

So, if your Word file contains the string '$Id:foo$', and "Id" is in
this file's svn:keywords property, then the Subversion client will
transform '$Id:foo$' to '$Id$' before sending the file to the server,
thus likely corrupting it if it is a binary file. The data has been
changed before the file was sent to the repository, therefore there
is no way to retrieve the original from the repository. Therefore you
must not set svn:keywords on binary files, unless you restrict
yourself to the fixed-width keywords, which are meant to work fine in
binary files. Assuming strings like '$Id$' do not otherwise appear in
the file.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-04 03:40:49 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.