I updated my patch of last week to fix issue 1780.
The algorithm implemented here isn't changed, so this patch will not solve
the problem of usernames starting or ending with '$'. It only solves user-
or filenames containing a '$'.
This patch contains:
- code changes to subst.c implementing the new algorithm
- unit tests in translate-test.c
Fix issue #1780: correct keyword expansion when URL or Author value contains
(translate_chunk): add algorithm that keeps searching for next '$' until
valid keyword is found or search limits are reached.
(lines): added two lines to test on '$' in Author and URL keywords.
> -----Original Message-----
> From: Lieven Govaerts [mailto:firstname.lastname@example.org]
> Sent: dinsdag 10 januari 2006 21:07
> To: 'John Peacock'; 'Michael Pilato'
> Cc: 'svn-dev'
> Subject: RE: [PATCH] issue 1780: Keyword values with dollar
> signs causebadness.
> Michael, John,
> > John Peacock wrote:
> > Michael Pilato wrote:
> > > The algorithm is a pretty good one, though I think it still
> > falls down
> > > if, say, an Author's name begins with a '$'. The expanded
> > form would
> > > be '$ Author: $username $', which happens to be a superset of the
> > > completely valid format '$ Author: $'.
> You're absolutely right, this patch doesn't solve that
> situation, it will give the same result as the code without the patch.
> > Which brings up the topic of a generalized escaping mechanism for
> > keyword *values*, rather than trying larger and larger
> strings (as the
> > proposed patch does).
> Concerning performance, a keyword is not only limited by
> SVN_KEYWORD_MAX_LEN chars, but also by a '\r' or '\n'. So the
> only scenario where the performance is affected by this patch is with:
> - a file with keyword expasion enabled
> - containing very long lines without CR's
> - using filenames with $ signs.
> And even then, SVN_KEYWORD_MAX_LEN is defined as 255 for now,
> it will never exceed eg. 1024 right?
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.17/229 - Release Date: 13/01/2006
Received on Sun Jan 15 00:03:21 2006
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org