Difference between revisions of "Git svn"

From relax wiki
Jump to navigation Jump to search
Line 2: Line 2:
 
Based [http://git-scm.com/book/ch8-1.html on this] and [http://iacoware.wordpress.com/2009/10/02/howto-use-svnsync-to-mirror-a-repository-on-windows/ this article.]
 
Based [http://git-scm.com/book/ch8-1.html on this] and [http://iacoware.wordpress.com/2009/10/02/howto-use-svnsync-to-mirror-a-repository-on-windows/ this article.]
  
  mkdir gittest
+
=== Windows ===
  cd gittest
+
md C:\relax
  svnadmin create svn
+
  svnadmin create C:/relax/trunk
 
+
  md C:\relax\branches
 +
  svnadmin create C:/relax/branches/relax_disp
 +
 
  #In windows
 
  #In windows
  echo exit 0 > svn/hooks/pre-revprop-change.bat
+
  echo exit 0 > C:/relax/trunk/hooks/pre-revprop-change.bat
#In linux
+
  echo exit 0 > C:/relax/branches/relax_disp/hooks/pre-revprop-change.bat
echo "#!/bin/sh" > svn/hooks/pre-revprop-change
 
  echo "exit 0;" >> svn/hooks/pre-revprop-change
 
chmod +x svn/hooks/pre-revprop-change
 
  
  svnsync init file:///c:/WinPython27/gittest/svn http://svn.gna.org/svn/relax/trunk
+
  svnsync init file:///C:/relax/trunk http://svn.gna.org/svn/relax/trunk
 +
svnsync init file:///C:/relax/branches/relax_disp http://svn.gna.org/svn/relax/branches/relax_disp
 
  # Be aware, if your repo is big, it could take a loooot of time.
 
  # Be aware, if your repo is big, it could take a loooot of time.
 
  # Example. 20500 commits, toke from 22 PM to 23 PM.
 
  # Example. 20500 commits, toke from 22 PM to 23 PM.
  svnsync sync file:///c:/WinPython27/gittest/svn
+
  svnsync sync file:///C:/relax/trunk
 +
svnsync sync file:///C:/relax/branches/relax_disp
 +
 
 +
md C:\relax\trunk_git
 +
cd C:\relax\trunk_git
 +
git svn clone file:///C:/relax/trunk -s
  
  mkdir git
+
  md C:\relax\branches\relax_disp_git
  cd git
+
  cd C:\relax\branches\relax_disp_git
  git svn clone file:///c:/WinPython27/gittest/svn -s
+
  git svn clone file:///C:/relax/branches/relax_disp -s

Revision as of 20:28, 20 July 2013

Background

Based on this and this article.

Windows

md C:\relax
svnadmin create C:/relax/trunk
md C:\relax\branches
svnadmin create C:/relax/branches/relax_disp

#In windows
echo exit 0 > C:/relax/trunk/hooks/pre-revprop-change.bat
echo exit 0 > C:/relax/branches/relax_disp/hooks/pre-revprop-change.bat
svnsync init file:///C:/relax/trunk http://svn.gna.org/svn/relax/trunk
svnsync init file:///C:/relax/branches/relax_disp http://svn.gna.org/svn/relax/branches/relax_disp
# Be aware, if your repo is big, it could take a loooot of time.
# Example. 20500 commits, toke from 22 PM to 23 PM.
svnsync sync file:///C:/relax/trunk
svnsync sync file:///C:/relax/branches/relax_disp
md C:\relax\trunk_git
cd C:\relax\trunk_git
git svn clone file:///C:/relax/trunk -s
md C:\relax\branches\relax_disp_git
cd C:\relax\branches\relax_disp_git
git svn clone file:///C:/relax/branches/relax_disp -s