Comment 2 for bug 513475

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 513475] [NEW] Branch fails with UnknownVCS error

On Sun, 2010-01-31 at 14:08 +0000, Jelmer Vernooij wrote:
> status incomplete
>
> I'm curious how this repository was created. The convert_revision
> Mercurial extra seems to be set to a bazaar revision-like id.
>
> E.g. see http://imapclient.freshfoo.com/changeset/28:a858d6ecea6b/
Menno has kindly provided me with the original bazaar repository that
the current hg repository was created from.

It looks like the "hg convert" backend that converts from Bazaar to
Mercurial does not prefix the revision id with the version control
system name as the bzr-hg plugin expects at the moment. I wonder what
the best way is to work around this problem.

Perhaps we should patch hg so that it always prefixes the revision id
with "bzr:" so that it is easier to track where a revision came from.

Independent of that, I think it would be a good idea to add a warning to
bzr-hg to inform the user about the fact that a 'convert_revision' extra
was encountered with invalid data. To avoid spamming the user with these
warnings, we should probably remember that we have warned once and then
shut up.

Since we need to be able to roundtrip, we need to make sure that we are
able to recreate the original 'convert_revision' extra even if the
convert_revision property in bazaar could not be created. I think the
easiest way to do this is to unconditionally import the convert_revision
extra into the bazaar revision properties. This should also allow us to
simplify the mapping code, at a slight disk usage overhead.

Thoughts?

  status triaged
  importance medium
  summary "Need to cope with incomprehensible data in convert_revision
extra"

Cheers,

Jelmer