Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

Re: git-svn starting with an empty svn repository

From: Pascal Obry <hidden>
Date: 2016-06-15 22:46:16

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
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help