[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: Srilakshmanan, Lakshman <lakshman.srilakshmanan_at_police.vic.gov.au>
Date: Fri, 4 Jan 2008 14:51:54 +1100

Hi Ryan,

Thanks for your quick response.

When I look at my text file using the browser (IE) I don't see the
keyword expanded. I do however see the keyword substituted once I have
checked it out using the client.

Am I doing something wrong ?

Thanks
Lakshman
-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2007b_at_ryandesign.com]
Sent: Friday, 4 January 2008 1:40 PM
To: Srilakshmanan, Lakshman
Cc: users_at_subversion.tigris.org
Subject: Re: svn keyword expansion

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://.../ , 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.

================================================================================================
EMAIL DISCLAIMER

This email and any attachments are confidential. They may also be subject to copyright.

If you are not an intended recipient of this email please immediately contact us by replying
to this email and then delete this email.

You must not read, use, copy, retain, forward or disclose this email or any attachment.

We do not accept any liability arising from or in connection with unauthorised use or disclosure
of the information contained in this email or any attachment.

We make reasonable efforts to protect against computer viruses but we do not accept liability
for any liability, loss or damage caused by any computer virus contained in this email.
================================================================================================

---------------------------------------------------------------------
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 04:52:13 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.