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

Re: Possible way to support $Log$

From: John Peacock <jpeacock_at_rowman.com>
Date: 2004-04-21 15:58:30 CEST

Lübbe Onken wrote:

> BTW is it possible to have a username that includes a '$'? Then you
> could already fool the $author$ tag :-)
>
> 1st commit: $author: micro$oft $
> 2nd commit: $author: micro$oft $oft $

This is already a concern with keywords (although I'm pretty sure that '$' is
not legal as a username under /any/ *nix variant, though it _it_ legal I believe
under Win32).

> Can you be really absolutely sure that the number of bytes is always
> correct? What about CR or CRLFs? Will they count?

Yes, because they were put there _by the client code_ when the $Log was
expanded, with the correct EOL based on the platform.

> What if somebody deletes part of the log? Will you just kill 4K of text?

If the length as specified does not end with ' $' then the code could throw an
error and request that all of the text be deleted before committing (which would
always be safe).

>> The more I look at this, the less I like even my own solution,
>> especially given that most of the time the $Log$ entry will be
>> required to exist in a source file as a comment.
>
> I'd say all the time, like $author$ and so on

That's your bias showing ;). Perhaps I want the $author$ string to be expanded
in a README.TXT file...

>
>> For those languages with block comments, it is easy;
>
> I'd suggest don't use block comments, only use line comments, because[1]
>

Again, I think it is much better to keep it simple: the surrounding code must
comment out the $Log$ contents in the file if that is required for that type of
file.

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 21 15:58:37 2004

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

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