bug in convert

Greg Ward greg-hg at gerg.ca
Mon Jul 20 19:38:15 CDT 2009


On Sun, Jul 19, 2009 at 7:06 PM, Christoph Egger<Christoph_Egger at gmx.de> wrote:
> I tried to convert netbsd anoncvs src tree into a mercurial repository.

Very brave of you.

> Conversion failed with:
>
> 794600 sys/arch/hpcmips/conf/GENERIC
> 794700 sys/arch/hpcmips/conf/GENERIC
> 794800 sys/arch/hpcmips/conf/INSTALL_TX3922
> ** unknown exception encountered, details follow
> ** report bug details to http://mercurial.selenic.com/bts/
> ** or mercurial at selenic.com
> ** Mercurial Distributed SCM (version 1.3)
> ** Extensions loaded: convert, rebase
> Traceback (most recent call last):
>  File "/sw/bin/hg", line 27, in <module>
>    mercurial.dispatch.run()
[...]
>  File "/sw/lib/python2.5/site-packages/hgext/convert/cvsps.py", line
> 299, in createlog
>    assert match, _('expected revision number')
> AssertionError: expected revision number
> cvs [rlog aborted]: received broken pipe signal

Looks like an incompatibility between the output of your CVS version
and what the parser expects.  First, can you try this patch
(completely untested!) to improve the error reporting:

--- a/hgext/convert/cvsps.py
+++ b/hgext/convert/cvsps.py
@@ -296,7 +296,7 @@
             # we create the logentry here from values stored in states 0 to 4,
             # as this state is re-entered for subsequent revisions of a file.
             match = re_50.match(line)
-            assert match, _('expected revision number')
+            assert match, _('expected revision number (got %r)') % line
             e = logentry(rcs=scache(rcs), file=scache(filename),
                     revision=tuple([int(x) for x in
match.group(1).split('.')]),
                     branches=[], parent=None,

When/if you rerun the conversion, try adding --debug.  That might make
the crash more informative.

Next, can you tell us precisely which version of CVS you're using?
"cvs --version" should be helpful.  In particular, it's not this
newfangled OpenCVS thing that those poor misguided[1] OpenBSD people
are doing, is it?

Finally, can you show us the output of "cvs rlog" on a representative
file?  (Ideally the one that caused the crash, but I'm not sure if
that info is available to you.  Running with --debug might help.)

Greg

[1] IIUC, apparently they want a centralized version control system
that's not infected by the evil GPL and that sucks less than CVS.  So
rather than switching to Subversion, they're reimplementing CVS.  The
mind boggles.



More information about the Mercurial mailing list