bzr-git and backslashes in names

Jelmer Vernooij jelmer at debian.org
Sun Aug 26 16:40:29 UTC 2012


On Sun, Aug 26, 2012 at 12:25:02PM -0400, Stefan Monnier wrote:
> >> > It's not a trivial problem since all backslashes provided are
> >> > converted to forward slashes at the inventory level, for compatibility
> >> > with Windows.
> >> But when bzr-git sees a backslash in a file name in a Git repository,
> >> why can't it turn it into an _ before passing it to bzrlib?
> > It has to be able to roundtrip the data.

> Then turn backslash into "_backslash_" and turn "(_+)backslash_" into
> "\1_backslash_".  Or you can also decide that round-tripping doesn't
> work with backslashes (still better than what we have now).

That sort of filename manipulation isn't trivial either, and likely to
introduce corner case bugs; rather than make the bzr-git codebase
more complex, I would prefer to fix bzr core (also so it fixes
the issue for not just bzr-git but also core bzr users and bzr-svn).

If roundtripping doesn't work then that means that you are only able
to fetch from git once; further pulls from git are very likely to fail with
checksum errors. It also means that fetching from git and then pushing
back into git results in a completely different history (likely to
upset other users of the repository).

If you don't care about the conversion being deterministic
then I would recommend using bzr-fastimport instead; it
is much simpler precisely because it doesn't worry about these things.

Cheers,

Jelmer



More information about the bazaar mailing list