cvs2hg problem with CVS vendor branch (was Re: cvsps wrapper script)

Greg Ward greg-hg at gerg.ca
Sun Oct 4 15:01:50 CDT 2009


On Wed, Sep 30, 2009 at 9:59 PM, John Hein <jhein at timing.com> wrote:
> John Hein wrote at 17:53 -0600 on Sep 30, 2009:
>  > I'm trying to narrow it down, but the full repo is 240 MB, so
>  > it's slow whittling.
>
> Okay.  I can reproduce it simply like so:
>
> #!/bin/sh
> mkdir /tmp/foobar || exit 1
> cd /tmp/foobar
> export CVSROOT=/tmp/foobar/root
> cvs init
> mkdir imp
> (cd imp
> touch xx yy
> cvs import -m imp m v r)
> cvs co m
> (cd m
> cvs admin -b
> cvs admin -m1.1:'add yy' yy)
> # point to your cvs2svn
> export PYTHONPATH=/tmp/cvs2svn
> /tmp/cvs2svn/cvs2hg --hgrepos=$PWD/2hg $CVSROOT/m
[...]
> ----- pass 16 (OutputPass) -----
> added changeset 0:c77513120cef (branch: default)
> added branch 'v' with changeset 1:563a37000af4
> added changeset 2:f5658c3297ca (branch: v)
> Traceback (most recent call last):
>  File "/tmp/cvs2svn/cvs2hg", line 90, in <module>
>    hg_main(os.path.basename(sys.argv[0]), sys.argv[1:])
[...]
>  File "/.amd_mnt/brain/uv/homes/jhein/tmp/hgt/zz/1/cvs2hg/cvs2svn/cvs2svn_lib/checkout_internal.py", line 341, in __getitem__
>    return self.text_records[id]
> KeyError: 4

Got it!  Turns out I misunderstood some of the inner details of
handling CVS vendor branches in cvs2svn.  The fix: do what the svn
backend does, translated into Mercurial terms.

Just "hg pull -u" from my hg repo of cvs2svn and you should get the fix.

Greg



More information about the Mercurial mailing list