git-migration: pld-git.sh - do filter-branch in one run, we cleanup cvs.pkg...
glen
glen at pld-linux.org
Mon Feb 14 11:03:56 CET 2011
Author: glen Date: Mon Feb 14 10:03:56 2011 GMT
Module: git-migration Tag: HEAD
---- Log message:
- do filter-branch in one run, we cleanup cvs.pkgs after each successful pkg anyway
---- Files affected:
git-migration:
pld-git.sh (1.25 -> 1.26)
---- Diffs:
================================================================
Index: git-migration/pld-git.sh
diff -u git-migration/pld-git.sh:1.25 git-migration/pld-git.sh:1.26
--- git-migration/pld-git.sh:1.25 Mon Feb 14 07:40:26 2011
+++ git-migration/pld-git.sh Mon Feb 14 11:03:51 2011
@@ -96,6 +96,7 @@
import_cvs2git() {
set -$d
local pkg
+ local tree_filter=$(pwd)/tree_filter.sh
[ -x /usr/bin/cvs2git ] || {
echo >&2 "cvs2git missing, install cvs2svn package"
@@ -121,17 +122,23 @@
git fast-import --export-marks=cvs2svn-tmp/cvs2git.marks < cvs2svn-tmp/git-blob.dat
git fast-import --import-marks=cvs2svn-tmp/cvs2git.marks < cvs2svn-tmp/git-dump.dat
./cvs2git_fixes.sh $pkg
+
+ # make final changes to converted repos by git-filter-branch
+ git filter-branch --tree-filter ". $tree_filter" -- --all
+
# add origin remote
git remote add origin git at github.com:pld-linux/$pkg.git
# do some space
git repack -a -d
> $GIT_DIR/description
rm -f $GIT_DIR/hooks/*
+
unset GIT_DIR
# remove from cvs.pkgs to mark it done (for this round)
sed -i -e "/^$pkg\$/d" cvs.pkgs
done
+
}
# run git cvsimport on each package module
@@ -182,19 +189,6 @@
done
}
-# make final changes to converted repos by git-filter-branch
-git_filter() {
- set -$d
-
- local tree_filter=$(pwd)/"tree_filter.sh"
-
- cvs_pkgs
- for pkg in ${@-:$(cat cvs.pkgs)}; do
- GIT_DIR=$gitdir/$pkg git filter-branch --tree-filter ". $tree_filter" -- --all
- done
- [ -d .git-rewrite ] && rm -r .git-rewrite
-}
-
# create template dir of git_bare
# we copy system template dir and remove samples from it
git_templates() {
@@ -292,7 +286,6 @@
#import_git-cvsimport "$@"
import_cvs2git "$@"
-git_filter "$@"
# missingusers needed only to analyze missing users file
#git_missingusers
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/git-migration/pld-git.sh?r1=1.25&r2=1.26&f=u
More information about the pld-cvs-commit
mailing list