[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: Hari Kodungallur <hkodungallur_at_gmail.com>
Date: Thu, 3 Jan 2008 22:17:38 -0800

On Jan 3, 2008 8:49 PM, Srilakshmanan, Lakshman <
lakshman.srilakshmanan_at_police.vic.gov.au> wrote:

> Hi Ryan,
>
> In the first email :
> >> 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.
>
> May be its my misunderstanding, but from the text above, I understood
> the file is updated and the updated version is sent to the repository.
> That would indicate that the server would store the keyword expanded ?

Subversion will only store the keyword within $ signs (the string "$Id$" for
the Id keyword) on the server. What it means is that if the file already has
something like "$Id: <some text>$" when you set the svn:keywords, it will
delete ": <some text>" and then send the file over to the server. If the
file only has $Id$, then it will not do any modification.
[As you might have already read from the document, if there is no keyword
within $ sign within the file, then no modification is made.]

Once the initial modification is made, the actual expansion of the keyword
is made only on the client side. So in the case of an $Id$, then you will
only see $Id$ on the server (via web) and then on the client you will see it
expanded ($Id: <file revision..etc>$).

Regarding your original question, by some huge chance, if there was no
modification made to the word document by subversion, then accessing it via
web might be the work around. I am not sure, but may be svn cat
url://to/file/mydoc.doc > mydoc.doc will work.

>
>
> But in the next email you indicate :
> >> Therefore, it sees the file as it exists in the repository -- with
> keywords unexpanded. As
> >> you know, only a Subversion client performs the keyword
> >> expansion.
>
> So the question is
> A) does the server store the keyword *expanded*
> B) does the server store the keywords *unexpanded*
>
> If the answer is B) then the file should not be corrupted, as the
> keywords have not been expanded. That is, the expansion is performed
> when the client checks out the file.
>
> If the answer is A) then a browser should see the expanded keywords ?
>
> Could you please clarify my misreading.
>

Thanks,
-Hari
Received on 2008-01-04 07:18:03 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.