[OT] Anyone w/ svn->git experience and advice?

Jacob Carlborg doob at me.com
Thu Jan 12 23:38:01 PST 2012


On 2012-01-13 04:32, Nick Sabalausky wrote:
> I apologize for going so far offtopic with this. But I've taken this to the
> git mailing list, and after working on it for days it's still not working
> and I'm just about pulling my hair out. What makes it even more frustrating
> is that when I attempted SVN->Hg and SVN->Bzr, those were even *more*
> problematic (especially Bzr).
>
> I know DMD made the switch from SVN to Git at one point, so I'm hoping
> someone here might be able to help out before I finally go nuts:
>
> Summary:
> --------------
>
> I'm trying to use "git svn clone --preserve-empty-dirs ..." (Git v1.7.8.3,
> Linux) but after it gets through only a fraction of the revisions, it just
> bails with some cryptic:
>
> On one SVN repo:
> Failed to strip path 'bin/lang/.gitignore' ((?-xism:^trunk(/|$)))
>
> On the other SVN repo:
> Failed to strip path 'src/nonFatalAssertTest/.gitignore'
> ((?-xism:^trunk(/|$)))
>
>
> The Full Picture:
> -------------------------
>
> I want to convert these to Git:
>
> http://svn.dsource.org/projects/semitwist
> http://svn.dsource.org/projects/goldie
>
> Notes:
>
> - Goldie has some tags.
> - Neither repo has branches.
> - Being SVN, I wasn't shy about including required empty dirs in the repo
> (since every F&*#&$@ filesystem on the G*#$*%^$ planet handles them fine.) I
> need to keep these.
> - For awhile I had been including compiled binaries in the repo. Don't ask
> me why, I just did :) I need to remove these.
> - Obviously not interested in preserving the "downloads" directory (just a
> DSource-ism anyway).
> - Both repos are small enough that known-to-be-slow git-svn should still be
> plenty fast enough for this task.
>
> I did get some help at the git mailing list:
> http://git.661346.n2.nabble.com/SVN-gt-Git-but-with-special-changes-td6840904.html
>
> They showed me how to strip the binaries from the Git repo after it's
> converted (although I haven't gotten that far yet). And I've found some
> tutorials that help out with the author conversions, etc. The problem is
> actually converting the dang repos, and doing it while preserving tags and
> *all* directories (not just the ones that Git's decided are worthy of
> existing). But like I said above, git-svn is just crapping out:
>
> $ git svn clone
> http://svn.dsource.org/projects/semitwist --prefix=svn/ --preserve-empty-dirs -
> -authors-file=semitwistdtools-authors.txt  --trunk=trunk --tags=tags
> SemiTwistDTools
> ...the first few revisions (out of 242 total) here...
> r46 = 61d45b1e70c129a5096bb35686f0d024786c1204 (refs/remotes/svn/trunk)
>          A       cmdTest.pnproj
> Failed to strip path 'src/nonFatalAssertTest/.gitignore'
> ((?-xism:^trunk(/|$)))
>
> $ git svn clone
> http://svn.dsource.org/projects/goldie --prefix=svn/ --preserve-empty-dirs --authors-file=goldie-authors.txt
> --trunk=trunk --tags=tags Goldie
> ...the first few revisions (out of 557 total) here...
> r85 = 60d792abf9957f41f70d7ae399fee7ecda0b66f1 (refs/remotes/svn/trunk)
>          M       README.txt
> Failed to strip path 'bin/lang/.gitignore' ((?-xism:^trunk(/|$)))

If --preserve-empty-dir isn't working, can't you add these directories 
after you've cloned the repository?

BTW is a could page about git and svn: 
http://www.viget.com/extend/effectively-using-git-with-subversion/

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list