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

Re: Possible bug in keyword replacement (revisited, with examples)

From: John Peacock <jpeacock_at_rowman.com>
Date: 2004-04-08 03:33:50 CEST

Philip Martin wrote:
> John Peacock <jpeacock@rowman.com> writes:
>
>
>>It would appear that the diff code is treating it as an expanded
>>keyword and collapsing it in error.
>
>
> It's the commit code rather than the diff code. I've raised issue
> 1823.
>

Not really. If you dump the repository created using the reproduction recipe
given in the issue:

...
Node-path: foo1
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 7
Text-content-md5: f30442dd0b44c51adfd4656d363e671d
Content-length: 17

PROPS-END
$Id: $

Node-path: foo2
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 6
Text-content-md5: 0b3dea829a3557a69caed1bb464064a3
Content-length: 16

PROPS-END
$Id:$

Node-path: foo3
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 10
Text-content-md5: 3fe6718bbb5be7e768ae636905c222ff
Content-length: 20

PROPS-END
$Id: xxx$
...

You'll see that what is in the repository is not the expanded keyword, but a
stub that looks like an keyword (for the first two). foo3 does not contain a
keyword at all, and will not be expanded in the WC.

This is going to be a tricky one to fix, because the illegal keyword string can
be stored in the repository prior to the svn:keywords property being set (as you
did in the reproduction recipe). I think the appropriate response would be to
special case '$keyword:$' and '$keyword: $' in the same fashion, i.e. there will
be no keyword expansion in either case, since the keyword text is ill-formed in
the repository (per the book definitions).

However, for compatibility purposes, I believe both of those first two cases
should throw a warning that the keyword _cannot_ be expanded. The third one
should continue to be ignored as outside of our control.

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Apr 8 03:34:03 2004

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.