[PATCH] cvsps: fix computation of parent revisions when log caching is on

Emanuele Giaquinta emanuele.giaquinta at gmail.com
Fri Oct 9 07:30:17 CDT 2015


Hi,

On Thu, Oct 08, 2015 at 01:39:46PM -0400, Augie Fackler wrote:
> On Wed, Oct 07, 2015 at 01:32:38PM +0300, Emanuele Giaquinta wrote:
> > # HG changeset patch
> > # User Emanuele Giaquinta <emanuele.giaquinta at gmail.com>
> > # Date 1444206832 -10800
> > #      Wed Oct 07 11:33:52 2015 +0300
> > # Node ID cacca520238c70e0411905230c67a7e8132436ef
> > # Parent  efd57cd6fd1d5eb76102fabfc45676873bbba29d
> > cvsps: fix computation of parent revisions when log caching is on
> 
> seems mostly good, one question below
> 
> >
> > cvsps computes the parent revisions of log entries by walking the cvs log
> > sorted by (rcs, revision) and by iteratively maintaining a 'versions'
> > dictionary which maps a (rcs, branch) pair onto the last revision seen for that
> > pair. When log caching is on and a log cache exists, cvsps fails to set the
> > parent revisions of new log entries because it does not iterate over the log
> > cache in the parents computation. A complication is that a file rcs can change
> > (move to/from the attic), with respect to its value in the log cache, if the
> > file is removed/added back. This patch adds an iteration over the log cache to
> > update the rcs of cached log entries, if changed, and to properly populate the
> > 'versions' dictionary.
> >
> 
> [snip]
> 
> > diff -r efd57cd6fd1d -r cacca520238c tests/test-cvsps.t
> > --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> > +++ b/tests/test-cvsps.t	Wed Oct 07 11:33:52 2015 +0300
> > @@ -0,0 +1,95 @@
> > +#require cvs
> 
> is there any way this test can piggyback on one of the existing CVS tests?

I moved the test in test-convert-cvs.t and sent an updated patch.

Emanuele


More information about the Mercurial-devel mailing list