[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: Lübbe Onken <l.onken_at_rac.de>
Date: 2004-04-21 15:42:35 CEST

John Peacock wrote:
> The reason I specifically didn't want to suggest a $startlog$ and
> $endlog$ pair is because then the client code cannot immediately read
> all applicable bytes, but has to read line by line looking for the
> closing tag. It would also preclude the chosen closing tag from being
> part of the $Log$ entry itself (sans some escaping rules).
I fully understand your idea, but I think you cannot really prevent
this. I'd just document that the end tag is not allowed to be part of a
log message and leave it at that.
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 $

> By having a
> single tag with a fixed/precalculated size, the client code can
> immediately slurp up the applicable text
Can you be really absolutely sure that the number of bytes is always
correct? What about CR or CRLFs? Will they count?
What if somebody deletes part of the log? Will you just kill 4K of text?
See also[1]

> (and in most cases just ignore
> it, i.e. for diff purposes).
That should be done anyway, especially merging log entries would not
make much sense...

> 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

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

> for those which only have line comments, it
> requires the client to perform additional magic to make it work. Urghh...
[1] to slurp up the lines following a $LogN:, the client has to stop
either when it locates a $EndLog$ or when it encounters the first non
comment line.

Cheers
-Lübbe

---------------------------------------------------------------------
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:44:06 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.