SVN Push Help.
Eric Siegerman
lists08-bzr at davor.org
Fri Apr 29 19:42:44 UTC 2011
On Fri, 2011-04-29 at 10:14 -0700, Eric Berry wrote:
> I think I'm going to have to assume that at this point that this is
not going
> to work, and I'm not going to be able to save the history with my
split
> projects. I think the only way to save it would be to copy the main
project
> into the new trunks and redoing all the restructuring by deletes and
renames.
> Unfortunately this took me a few days to do the first time with the
split
> command, and I don't have that long to do it again.
Check out Tailor: http://wiki.darcs.net/RelatedSoftware/Tailor .
It's a tool that translates between many VCSes' repository
formats.
Tailor hasn't been updated since 2008, so I don't know whether
it'll handle Bazaar's 2a format; you might have to convert your
Bazaar branches to some older format (see "bzr upgrade", which
can downgrade too).
As a destination format, choose "1.14-rich-root". If tailor
can't handle even that, you'll have to use a non-rich-root
format ("1.14" or the even older "pack-0.92"), which in turn
means that:
- you'll have to use the fastexport | filter | fastimport"
dance (see below) to strip out the rich-root stuff, because
you can't downgrade directly to a non-rich-root format (I
don't know how to do that, but someone else here will)
- you'll have roundtripping problems between Subversion and
Bazaar. (I don't know whether it'll be impossible or just
impractical, but I imagine that what it won't be is easy.
I'd love to be corrected on this point, though :-/)
If Tailor can't do the job at all, I wonder if you could come up
with some workaround using bzr-fastexport (which is provided by
the bzr-fastimport [sic] plugin). The export format that it
works with was originally created for git, I believe, but has
since become something of an interchange format for a number of
(D?)VCSes.
I'm thinking you'd fast-export one of the split-off sub-branches
to test with, and then see if any of the following works:
- Directly import the results into SVN (if SVN has an importer
for fast-export format, that is; it may well not).
- Go indirectly via Mercurial, if it has a Subversion
interoperator that can handle your funky branches. (Actually,
you might be able to bypass the fast-export/import step if
bzr-hg can get you from bzr to hg directly, without
tripping over whatever split-related weirdness is upsetting
bzr-svn.)
- Go indirectly via Git, either using fast-export or (if
possible) directly using bzr-git. Same caveats apply.
- Kludge up a filter for fast-exported files, which smooths out
the weirdness. People often go this route when they need to
do funky things that bzr doesn't directly support (e.g. to
completely expunge a revision without leaving any trace of
its contents). IIRC, the fast-export metadata is all text
(with interspersed binary sections holding the actual file
content), so it shouldn't be too painful to manipulate with
your favourite text-processing language. The challenge will
be in figuring out what manipulation is needed :-/
I presume you intend to keep using Bazaar with these branches.
If so, be sure to do thorough round-trip testing, to make sure
that once you've initially got the branch into SVN, bzr-svn can
handle it through several back-and-forth pushes/pulls, merges,
etc.
Best of luck!
- Eric
More information about the bazaar
mailing list