Re: git-svn starting with an empty svn repository
- From
Pascal Obry <pascal@obry.net>
- Date
- Feb 24, 2009, 14:19 UTC
- Message-ID
- <a2633edd0902240619v633eacq4ff7ffd20f66da04@mail.gmail.com>
- In-Reply-To
- <20090224134325.GA10719@mjollnir.org>
Penny,
I've been trying to do the exact same things. I'm using Git to import from CVS and export into a Subversion repository.
What I have done:
- I have used cvsimport for the CVS repository (no problem)
- I have created an empty repository using svnadmin
- I have imported the svn trunk into Git
- I'm cherry-picking any new commits from my cvs-imported branch (master) into the git-svn one (named svn-trunk)
For this last point, I'm using this code sniped:
<<
for i in $(git cherry svn-trunk master | sed -n 's/^+ //p'); do
echo Applying $i;
(git cherry-pick --no-commit $i &&
git log --pretty=format:"Author: %an <%ae>%nDate :
%ad%n%n%s%n%b" -1 $i > /tmp/cm &&
git commit --file=/tmp/cm) || (echo Cannot commit $i; exit 1)
done>>
I'm editing the log to properly record original author and date.
There is maybe better solutions...
-- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595