hg convert - can't read from repo type
Ken Blake
kblake2 at gmail.com
Tue Oct 30 14:39:18 CDT 2007
On 10/30/07, Patrick Mézard <pmezard at gmail.com> wrote:
> Ken Blake a écrit :
> > I'm trying to convert a cvs repository. I first created a small test
> > cvs repo and was able to convert that just fine. I then tried to
> > convert my company's cvs repo and got the following error:
> >
> > connecting to :pserver:ken at company.com:/home/dev/cvsroot
> > abort: main/star: can't read from this repo type
>
> Could you paste the command used to convert ?
hg convert -A ~/etc/hg-authors main/star hg-main/star
My .hgrc files contains the extensions:
[extensions]
extdiff=
fetch=
hgext.convert=
> I suspect the converter fails while analyzing the target repository
> which is required sooner or later. You could give a try with 0.9.5,
> the generated traceback may be more helpful than the 0.9.4. Just be
> aware there is a pending issue here:
> http://www.selenic.com/mercurial/bts/issue787.
I just installed 0.9.5 on another machine so I can give both a try this evening.
>
> Sure, please send a traceback if you have one.
I didn't, but will when I run it again.
I went hunting for the source code and found it in:
mercurial-0.9.4/build/lib.linux-x86_64-2.5/hgext/convert
It appears to call convert_cvs in cvs.py. This calls cvsps and
processes the output. I've run cvsps on it's own and it generates
copious output, including zillions of warnings which I hope aren't the
problem (maybe the -q option silences them). The way I read the code,
it looks like the convert_cvs object is populated with all the
changesets from the cvs repo. This would explain the long time it
takes. However I don't yet understand the failure mode. I assume
error comes from:
srcc = converter(ui, src)
if not hasattr(srcc, "getcommit"):
raise util.Abort("%s: can't read from this repo type" % src)
I'm not a python programmer but I'm guessing that hasattr is used to
determine if srcc is a valid object. Shouldn't the object be valid
unless raise is called from withing convert_cvs? But if so then I
would see a different error message. This is why I don't understand
the failure mode.
I'll try added some prints to see if I can make more sense of this.
Ken
More information about the Mercurial
mailing list