cannot import from Mercurial
Ian Clatworthy
ian.clatworthy at canonical.com
Sun Jul 20 07:59:50 BST 2008
Sean Kelley wrote:
> Hi
>
> On Fri, Apr 11, 2008 at 12:37 PM, Georg <gwk.rko at googlemail.com> wrote:
>> Hi,
>>
>> is there a working way to import from Mercurial? I tried both hg-import and
>> fastimport (hg-
>>
>
> I get the same errors and I am using bzr 1.6b3:
>
> with bzr-fastimport I get:
>
> ~/.bazaar/plugins/fastimport/exporters/hg-fast-export.py -r
> ../port-manager.hg | bzr fast-import -
> File "/home/kelleys/.bazaar/plugins/fastimport/revisionloader.py",
> line 170, in _add_inventory
> inv_vf = self.repo.get_inventory_weave()
> AttributeError: 'KnitPackRepository' object has no attribute
> 'get_inventory_weave'
My guess is that this will work fine with bzr 1.5 and that
bzr-fastimport needs to be updated to support a newer API in
bzr 1.6. I'll look into that now.
> With bzr-hgimport I get this error:
>
> bzr hg-import ../../port-manager.hg/
> bzr: ERROR: exceptions.AttributeError: 'module' object has no attribute 'hex'
>
> Traceback (most recent call last):
> File "/home/kelleys/.bazaar/plugins/hgimport/importer.py", line 52,
> in bzr_revision_id
> return 'hg-' + mercurial.hg.hex(node)
> AttributeError: 'module' object has no attribute 'hex'
This looks like Mercurial has changed their API since hgimport was
written.
> So is there some other way to import Mercurial or does one have to
> convert mercurial to Git first?
Right now, use bzr-fastimport with bzr 1.5. Once you've generated
the bzr repository, you can use 1.6b3 again. I'll take a look at fixing
bzr-fastimport to support both the older and newer bzrlib API. I'll
let you know when that's done.
Ian C.
More information about the bazaar
mailing list