Discussion:
[git] SVN2Git migration issues...
Eric Gwin
2012-04-02 18:48:46 UTC
Permalink
Hi,

I'm running into an issue that I'm uncertain originates in the specific repository I'm migrating, or with the SVN2Git tools, or is inherit in migrating from SVN. Since the same thing occurs with the KDE svn tool and the built-in command svn2git, I'm thinking it is either the foremost or the last possibility. I've tried searching the web, but haven't stumbled upon any enlightening posts.

Basically, I've been able to configure the tooling to migrate all revisions no matter the branch, however none of the branches are rooted (ie. branch history starts at the first revision on the branch, and doesn't include parent revisions prior to the branch-point - therefore there is missing history when any branch is selected; modifications and whole files are missing if they were added prior to the branch-point).

I'm going to try a staggered migration, interspersing manual branch commands, followed by a final migration of the branch data in the next few days. I will post if it is successful. In the meantime, any information would be helpful.

-Eric
Paul Webster
2012-04-03 16:41:01 UTC
Permalink
Post by Eric Gwin
I'm going to try a staggered migration, interspersing manual branch
commands, followed by a final migration of the branch data in the next few
days. I will post if it is successful. In the meantime, any information
would be helpful.
Perhaps not so useful, but I stumbled across this post while looking at
some migration stuff: http://svn.haxx.se/dev/archive-2011-12/0131.shtml

It mentions that some tools only work with linear repos, but more
interesting is the comment that he's worked on a "branch-mapping algorithm
that should works for 99% of cases". There wasn't a link and I didn't look
through the thread, but maybe his tool is called reposurgeon?

Later,
PW
--
Paul Webster
Hi floor. Make me a sammich! - GIR
Eric Gwin
2012-04-12 18:39:07 UTC
Permalink
Thanks for the link. Reposurgeon is indeed a nifty looking tool. I'm gonna try some tests and see how much damage I can do.
Post by Eric Gwin
I'm going to try a staggered migration, interspersing manual branch commands, followed by a final migration of the branch data in the next few days. I will post if it is successful. In the meantime, any information would be helpful.
Perhaps not so useful, but I stumbled across this post while looking at some migration stuff: http://svn.haxx.se/dev/archive-2011-12/0131.shtml
It mentions that some tools only work with linear repos, but more interesting is the comment that he's worked on a "branch-mapping algorithm that should works for 99% of cases". There wasn't a link and I didn't look through the thread, but maybe his tool is called reposurgeon?
Later,
PW
--
Paul Webster
Hi floor. Make me a sammich! - GIR
_______________________________________________
git mailing list
http://dev.eclipse.org/mailman/listinfo/git
Eike Stepper
2012-04-04 14:31:29 UTC
Permalink
Hi Eric,

Stefan Winkler has done a great job when migrating our CDO repository to Git. He's explained it in detail:
http://www.winklerweb.net/index.php/blog/4-eclipse/16-migrating-the-cdo-svn-repository-to-git

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Eric Gwin
2012-04-12 19:06:48 UTC
Permalink
Eike,

Thanks! Awesome blog, and a pretty sweet repository too. They were the key to the light-bulb going off in my head.

My problem it seems is not the tooling per-se, but rather the "almost standard" approach we had to our SVN repository to begin with. We misunderstood the "best-practices" in SVN and created trunk, branches/<branchname>/trunk, and tags/<tagname>. Using one tool (KDE's svn2git) I can translate our non-standard directory structure, but it leaves floating branches (because the branch root never gets converted), using the packaged svn2git tools I end up with cruft on the branch with the real data one level down under "trunk". Attempts to "rename the branch" once in git don't work - obviously they are no longer simply high-level directories. So it looks like a truly successful migration will need my semi-manual approach after all - which would probably be too costly for a timely conversion.

Though I am still looking at other tooling options.

-Eric
Post by Eike Stepper
Hi Eric,
Stefan Winkler has done a great job when migrating our CDO repository to Git. He's explained it in detail: http://www.winklerweb.net/index.php/blog/4-eclipse/16-migrating-the-cdo-svn-repository-to-git
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
_______________________________________________
git mailing list
http://dev.eclipse.org/mailman/listinfo/git
Stephan Herrmann
2012-04-12 20:33:34 UTC
Permalink
One thing I did recently for an svn repo with undesired directory tree:

$ svnadmin dump old-svn ... 2> dump.log > svndump1
$ sed -e "s#-path: bogus/path/prefix#-path: standard/path/prefix#" <
svndump1 > svndump2 2> sed.log
$ # create a new svn repo
$ svnadmin load new-svn < svndump2

It appeared to be easier to massage the SVN upfront so that migration
tools would find everything in expected places.

YMMV,
Stephan
Post by Eric Gwin
Eike,
Thanks! Awesome blog, and a pretty sweet repository too. They were the
key to the light-bulb going off in my head.
My problem it seems is not the tooling per-se, but rather the "almost
standard" approach we had to our SVN repository to begin with. We
misunderstood the "best-practices" in SVN and created trunk,
branches/<branchname>/trunk, and tags/<tagname>. Using one tool (KDE's
svn2git) I can translate our non-standard directory structure, but it
leaves floating branches (because the branch root never gets converted),
using the packaged svn2git tools I end up with cruft on the branch with
the real data one level down under "trunk". Attempts to "rename the
branch" once in git don't work - obviously they are no longer simply
high-level directories. So it looks like a truly successful migration
will need my semi-manual approach after all - which would probably be
too costly for a timely conversion.
Though I am still looking at other tooling options.
-Eric
Post by Eike Stepper
Hi Eric,
Stefan Winkler has done a great job when migrating our CDO repository
http://www.winklerweb.net/index.php/blog/4-eclipse/16-migrating-the-cdo-svn-repository-to-git
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
_______________________________________________
git mailing list
http://dev.eclipse.org/mailman/listinfo/git
_______________________________________________
git mailing list
http://dev.eclipse.org/mailman/listinfo/git
Loading...