#! /bin/bash
+#
+# incremental import using git
+#
+# requires synced CVS files
+# commit IDs need to be updated after new full cvs2svn import
+#
+
# 1) off-line import via cvs2svn and rebasing, ...
#==> jra1mw.git
-# 1) prepare one-module CVS repo
+# 2) prepare one-module CVS repo
#mkdir jra1mw-cvssync.cvs
#export CVSROOT=`pwd`/jra1mw-cvssync.cvs
#mkdir empty
#cd ..
#rmdir empty
+# ==== import ====
+
# sync (fetch) files into jra1mw.cvs
-#...
+#
# sync fetched CVS repo to one-module CVS repo
rsync --archive --verbose jra1mw.cvs/ jra1mw-cvssync.cvs/jra1mw/
# import!
[ -d "jra1mw-cvssync.git/.git" ] || (echo "First run! Preparation steps and initial import must be done manually." && exit 1)
+unset CVSROOT
git cvsimport -d `pwd`/jra1mw-cvssync.cvs -C jra1mw-cvssync.git -a -k -z30 -A authors.txt jra1mw
# firsttime setup
#echo "jra1mw git repo for sync from LCG CVS." > jra1mw-cvssync.git/.git/description
-#cd jra1mw.git
-#git remote add cvssync `pwd`/jra1mw-cvssync.git
+#
+#git clone /var/www/html/git/jra1mw.git jra1mw-transfer
+#cd jra1mw-transfer
+#git remote add cvssync ../jra1mw-cvssync.git
#git fetch cvssync
-#for b in branch_RC31_3 branch_2_0 branch_2_1 branch_workflow master; do
+#for b in branch_RC31_3 branch_2_0 branch_2_1 branch_workflow; do
# echo $b
-# git checkout $b || break
-# git merge -s ours --stat cvssync/$b || break
+# git checkout -b $b cvssync/$b || break
#done
#cd -
-# merge changes
-cd jra1mw.git
-# rather manually (into FETCH_HEAD)
+cd jra1mw-transfer
git fetch cvssync
-# tady by např. komity do modulů prohlášených za smazané způsobily konflikty
-for b in branch_RC31_3 branch_2_0 branch_2_1 branch_workflow master; do
- echo $b
- git checkout $b || exit 1
- git merge cvssync/$b -- || exit 1
-done
+
+#git checkout branch_RC31_3
+#git cherry-pick `git log --format=%H 4316f8ac93d4cfa61b471676c2f81e70f62f1b69..cvssync/branch_RC31_3`
+#
+#git checkout branch_2_0
+#git cherry-pick `git log --format=%H 385a0a242b5e4666192f1198df92d7d451c79164..cvssync/branch_2_0`
+#
+git checkout branch_2_1
+git cherry-pick `git log --format=%H 46021c94148d9d688604bcdbec0344e946d70053..cvssync/branch_2_1`
+
+git checkout branch_workflow
+git cherry-pick `git log --format=%H a0a362418b99167f40d1328ea8a934b147372329..cvssync/branch_workflow`
+
+git checkout master
+git cherry-pick `git log --format=%H 493486149be0129dd115b64cf1d15933c1d09da7..cvssync/master`