[PATCH] cvsps: cvs log loop uses lookahead to avoid misleading text
Frank A. Kingswood
frank at kingswood-consulting.co.uk
Sun Jan 4 10:07:30 UTC 2009
David Champion wrote:
> Changes cvsps.py's cvs log reader to use a one-line lookahead, so
> that possibly misleading log messages can be disambiguated. In
> particular I have past committers who used cvs log's 28-character
> row of hyphens within commit messages; this throws cvsps and disrupts
> conversion.
Yes, this looks good to me, thanks. Reviewing the code I think there
should be no boundary case issues, and the check itself is simple.
A couple of trial runs show no issues. I've added a testcase, which follows.
I think this is about as far as we'd want to go attempting to add smarts
to the parsing of the log messages (considering that anything could be
returned). In particular, attempting to lookahead past lines matching
re_32 or re_70 would be a step (or a recursive descent) too far.
> The only alternative in this case is to edit the cvs
> ,v file by hand, which bloodies mercurial's "don't change history"
> principle.
Well, actually there's "cvs admin -m", but the same issues apply.
Frank
More information about the Mercurial-devel
mailing list