Converting a svn repository with layout changes
Marius Gedminas
marius at pov.lt
Wed Apr 14 22:44:20 BST 2010
On Wed, Apr 14, 2010 at 06:33:36PM +0200, Jelmer Vernooij wrote:
> On Wed, 2010-04-14 at 19:27 +0300, Marius Gedminas wrote:
> > On Mon, Apr 12, 2010 at 06:53:08PM +0300, Marius Gedminas wrote:
> > > On Mon, Apr 12, 2010 at 06:34:51PM +0300, Marius Gedminas wrote:
> > > > On Sat, Apr 10, 2010 at 06:37:10PM +0200, Jelmer Vernooij wrote:
> > > > > On Sat, 2010-04-10 at 19:01 +0300, Marius Gedminas wrote:
> > > > > > http://mg.pov.lt/eazysvn/svn is an Subversion repository that used the
> > > > > > trivial "everything in root" layout for 49 revisions, then switched to
> > > > > > trunk/ + branches/ + tags/ for the rest.
...
> > Now
> >
> > $ bzr branch http://mg.pov.lt/eazysvn/svn eazysvn
> >
> > gives me a repository containing 66 revisions, half of which contain
> > directories named trunk/, branches/ and tags/
> >
> > $ bzr branch http://mg.pov.lt/eazysvn/svn/trunk eazysvn
> >
> > gives me a repository containing 15 revisions, losing old history.
>
> This is correct - see the output of:
>
> svn log http://mg.pov.lt/eazysvn/svn/trunk
>
> which also reports just 15 revisions.
You asked svn log to filter by pathname and it does so, but the full history
itself is still there. Compare
svn log http://mg.pov.lt/eazysvn/svn/trunk/README.txt
(10 changesets)
and
bzr branch http://mg.pov.lt/eazysvn/svn/trunk eazysvn
cd eazysvn
bzr log README.txt
(5 changesets)
I think my approaches are:
* bzr branch http://mg.pov.lt/eazysvn/svn eazysvn, followed by
bzr rm tags branches; bzr mv trunk/* ./; bzr rm trunk; bzr commit
- upside: simple
- downside: ugly history
* svnadmin dump, tweak the history using svndumpfilter, import into a
new svn revision, then convert it with bzr.
- upside: clean history
- downside: medium amount of effort
- upside: I've used svndumpfilter before; can't say I've loved it
* bzr branch http://mg.pov.lt/eazysvn/svn eazysvn, then dump the bzr
branch into some format (fast-export?), filter it (with sed? perl?),
import into a new bzr branch
- upside: clean history
- downside: medium amount of effort
- upside: unfamiliar tools
* write a custom conversion script/fork bzr svn-import.
- upside: clean history
- downside: a lot of effort
* implement and submit a patch for bzr svn-import to handle
mixed-style layouts (I can't be the only one on the planet who
tended to start with simple small Svn repositories and later
migrated to trunk+tags+branches!)
- upside: giving back etc.
- downside: even more effort
* convince someone else to implement support of mixed-style svn
repositories
- downside: I'd have to be very persuasive
* try Tom Widmer's Mercurial recipe, then see about converting to bzr
(or stay with hg, it can't hurt to be fluent in more than one DVCS)
- upside: simple
- downside: not Bazaar
- upside: fluency in another DVCS
Marius Gedminas
--
What can I do with Python that I can't do with C#? You can go home on time at
the end of the day.
-- Daniel Klein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20100415/47f50063/attachment.pgp
More information about the bazaar
mailing list