[PATCH] convert: added cvsnt mergepoint support

Henrik Stuart henrik.stuart at edlund.dk
Thu Apr 2 08:24:30 CDT 2009


> From: gerg.ward at gmail.com [mailto:gerg.ward at gmail.com] on behalf of 
> Greg Ward
> Sent: 2. april 2009 15:19
> To: Henrik Stuart
> Cc: Mercurial Devel
> Subject: Re: [PATCH] convert: added cvsnt mergepoint support
> 
> On Thu, Apr 2, 2009 at 4:33 AM, Henrik Stuart <henrik.stuart at edlund.dk>
> wrote:
> > Adding it as a separate unit test-like thing is a tad difficult at
> best,
> > since all the parsing is happening in cvsps.py:createlog, which also
> > invokes "cvs rlog".
> 
> It would be nice if we could add unit tests for cvsps.py, but it would
> take some refactoring to make that happen.  As I'm sure you noticed.
> ;-)

I stumbled over the debugcvsps command, it contains enough information to
test the mergepoint logic.

> > As a slightly hacked possibility, it would be
> > possible to place a bogus cvs command in the path and just let it
> > return a pre-defined rlog. I'm not sure how nice a solution this is
> > either.
> 
> What a disgusting hack.  I love it!  A trick like that would make the
> cvs conversion tests much faster, and less dependent on the whims of
> whatever the local "cvs" happens to be.
> 
> The trick is: after cvsps has figured out the changesets, how do you
> fake getting the file contents?  Hmmm.

I solved it, in the patch I just sent, by only returning fake information
if it's an rlog command. It's probably not sufficient in the general case.

For the general case, I guess mocking a CVS server would be required.

Also, the cvsps tests don't work if you're running cvsnt, as init
requires admin access.

I forgot to mention, the patch applies to crew - haven't tested it against
stable.

-- 
Kind regards,
Henrik Stuart



More information about the Mercurial-devel mailing list