Jump to: navigation, search

Difference between revisions of "Platform-releng/Juno Git Migration Recipe"

m (New page: This is a modified version of the steps described by the CDT team in bug [https://bugs.eclipse.org/bugs/show_bug.cgi?id=316208 bug 316208] Recipe for test conversion for p2 Steps to repr...)
 
m
Line 1: Line 1:
This is a modified version of the steps described by the CDT team in bug [https://bugs.eclipse.org/bugs/show_bug.cgi?id=316208 bug 316208]
+
This is a modified version of the steps described by the CDT team in bug [https://bugs.eclipse.org/bugs/show_bug.cgi?id=316208 bug 316208]  
  
Recipe for test conversion for p2
+
Recipe for test conversion for p2  
  
Steps to reproduce:
+
Steps to reproduce:  
# mkdir ~/cvs; cd ~/cvs
+
 
cp /home/data/cvs/rt/org.eclipse.equinox.p2 .
+
==Copy the existing repository to a temp location==
 +
mkdir ~/cvs; cd ~/cvs
 +
 
 +
cp /home/data/cvs/rt/org.eclipse.equinox.p2 .  
 +
 
 +
==Remove broken symlinks in the repo from all to the components we moved above==
  
# Remove broken symlinks in the repo (from all to the CDT components we moved
 
above)
 
 
   find cvs/ -type l|xargs -n 1 rm
 
   find cvs/ -type l|xargs -n 1 rm
Note: This didn't apply to us.
 
  
 +
Note: This didn't apply to us.
  
# Move old content into old and exclude old content from migration. Need to create exclude list, preliminary one is here [[ Platform-releng/Git_Migration_Granularity | here]]
+
Move old content into old and exclude old content from migration. Need to create exclude list, preliminary one is here [[Platform-releng/Git Migration Granularity|here]]
 +
 
 +
==Run cvs2git to do the conversion==
  
# Run cvs2git to do the conversion:
 
 
   http://cvs2svn.tigris.org/cvs2git.html
 
   http://cvs2svn.tigris.org/cvs2git.html
  
# Get latest cvs2git:
+
  Get latest cvs2git:
    svn co --username=guest --password=""
+
 
http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk
+
  svn co --username=guest --password="" http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk  
 +
 
 +
.../cvs2svn/cvs2git --options=cvs2git.options
  
# .../cvs2svn/cvs2git --options=cvs2git.options
 
 
     (To do: Add options file link)
 
     (To do: Add options file link)
  
# Import the cvs2git output into git
+
==Import the cvs2git output into git==
  
  cd /gitroot/p2
+
  cd /gitroot/p2
  mkdir org.eclipse.equinox.p2/org.eclipse.equinox.p2.git
+
  mkdir org.eclipse.equinox.p2/org.eclipse.equinox.p2.git
  cd org.eclipse.equinox.p2/org.eclipse.equinox.p2.git
+
  cd org.eclipse.equinox.p2/org.eclipse.equinox.p2.git
  git init
+
  git init
  cat ~/cvs2svn-tmp/git-blob.dat ~/cvs2svn-tmp/git-dump.dat | git fast-import
+
  cat ~/cvs2svn-tmp/git-blob.dat ~/cvs2svn-tmp/git-dump.dat | git fast-import
 +
 
 +
==Move tags into place==
  
# Move tags into place
 
 
   python ..../cvs2svn/contrib/git-move-refs.py   
 
   python ..../cvs2svn/contrib/git-move-refs.py   
  
# Prune + Repack the repository
+
==Prune + Repack the repository==
  git prune
+
 
  git repack -a -d --depth=250 --window=250
+
git prune
  git gc --aggressive
+
git repack -a -d --depth=250 --window=250
  git repack -a -d --depth=250 --window=250
+
git gc --aggressive
 
+
git repack -a -d --depth=250 --window=250
# Verify repo
+
 +
 
 +
==Verify repo==
 +
 
 
   mkdir /tmp/compare-kmoir/
 
   mkdir /tmp/compare-kmoir/
  .../verify-cvs2svn.py --git .../cvs/tools/org.eclipse.cdt/ .../path_to_git_repo/ --tmp=/tmp/compare-kmoir/ --diff
+
.../verify-cvs2svn.py --git .../cvs/tools/org.eclipse.cdt/ .../path_to_git_repo/ --tmp=/tmp/compare-kmoir/ --diff

Revision as of 09:33, 13 June 2011

This is a modified version of the steps described by the CDT team in bug bug 316208

Recipe for test conversion for p2

Steps to reproduce:

Copy the existing repository to a temp location

mkdir ~/cvs; cd ~/cvs

cp /home/data/cvs/rt/org.eclipse.equinox.p2 .

Remove broken symlinks in the repo from all to the components we moved above

  find cvs/ -type l|xargs -n 1 rm

Note: This didn't apply to us.

Move old content into old and exclude old content from migration. Need to create exclude list, preliminary one is here here

Run cvs2git to do the conversion

  http://cvs2svn.tigris.org/cvs2git.html
 Get latest cvs2git:
 svn co --username=guest --password="" http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk 
.../cvs2svn/cvs2git --options=cvs2git.options
   (To do: Add options file link)

Import the cvs2git output into git

  cd /gitroot/p2
  mkdir org.eclipse.equinox.p2/org.eclipse.equinox.p2.git
  cd org.eclipse.equinox.p2/org.eclipse.equinox.p2.git
  git init
  cat ~/cvs2svn-tmp/git-blob.dat ~/cvs2svn-tmp/git-dump.dat | git fast-import

Move tags into place

 python ..../cvs2svn/contrib/git-move-refs.py   

Prune + Repack the repository

git prune
git repack -a -d --depth=250 --window=250
git gc --aggressive
git repack -a -d --depth=250 --window=250

Verify repo

 mkdir /tmp/compare-kmoir/
.../verify-cvs2svn.py --git .../cvs/tools/org.eclipse.cdt/ .../path_to_git_repo/ --tmp=/tmp/compare-kmoir/ --diff