Comment 3 for bug 718604

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 718604] Re: bzr fastimport fails to import branches with slashes in the name from git correctly

Hi Björn,

On Mon, 2011-02-14 at 09:26 +0000, Björn Michaelsen wrote:
> I attached a second possible solution, which maps "/" in the git-
> branchnames to "--" in bzr. While this mapping misses some elegance, it
> should not be prone to platform dependence and removes the need for
> os/os.path calls.
>
> What is still missing in the patches is a short update to bzr fast-
> import --help documenting the behavior.
>
> ** Patch added: "pragmatic fix"
> https://bugs.launchpad.net/bzr-fastimport/+bug/718604/+attachment/1848892/+files/fix_heirarical_branches_pragmatic.patch
Thanks for the patch.

Using "--" as the escape sequence is problematic because it will break
re-exporting of any previously imported branches with "--" (rather than
"/") in their name.

Rather than escaping the / I wonder if it might make more sense to just
keep the slash in and make sure any missing parent directories get
created. This matches the behaviour in Git (where directories are
created in this case as well) and works well with Bazaar shared
repositories.

Cheers,

Jelmer