git-migration: pld-git.sh - cleanup: only cvs2git now
glen
glen at pld-linux.org
Mon Feb 14 11:11:49 CET 2011
Author: glen Date: Mon Feb 14 10:11:49 2011 GMT
Module: git-migration Tag: HEAD
---- Log message:
- cleanup: only cvs2git now
---- Files affected:
git-migration:
pld-git.sh (1.26 -> 1.27)
---- Diffs:
================================================================
Index: git-migration/pld-git.sh
diff -u git-migration/pld-git.sh:1.26 git-migration/pld-git.sh:1.27
--- git-migration/pld-git.sh:1.26 Mon Feb 14 11:03:51 2011
+++ git-migration/pld-git.sh Mon Feb 14 11:11:44 2011
@@ -141,90 +141,8 @@
}
-# run git cvsimport on each package module
-# input: $CVSROOT
-# input: cvs.pkgs = list of packages
-# modifies: cvs.blacklist = list of problematic packages
-import_git-cvsimport() {
- set -$d
- local pkg
-
- cvs_pkgs
- cvs_users
-
- touch cvs.blacklist
- install -d git-import
- for pkg in ${@:-$(cat cvs.pkgs)}; do
- grep -qxF $pkg cvs.blacklist && continue
-
- # faster startup, skip existing ones for now
-# test -d git-import/$pkg && continue
-
- git cvsimport -d $CVSROOT -C git-import/$pkg -R -A cvs.users packages/$pkg || {
- rm -rf git-import/$pkg
- echo $pkg >> cvs.blacklist
- exit 1
- }
- done
-
- git_rewrite_commitlogs "$@"
-
- # do not need bare repo, if all we do is push to github
-# git_bare "$@"
-}
-
-# rewrite commit logs
-# historically old commits were in latin2, detect those and convert to utf8
-git_rewrite_commitlogs() {
- set -$d
- local msgconv=$(pwd)/msgconv.sh
-
- cvs_pkgs
- for pkg in ${@:-$(cat cvs.pkgs)}; do
- grep -qxF $pkg cvs.blacklist && continue
-
- cd gitroot/$pkg
- git filter-branch --msg-filter "$msgconv" --tag-name-filter cat -- --all
- cd ../../
- done
-}
-
-# create template dir of git_bare
-# we copy system template dir and remove samples from it
-git_templates() {
- set -$d
- [ -d templates ] && return
- cp -a /usr/share/git-core/templates templates
- find templates -name '*.sample' | xargs rm
- # clear
- > templates/info/exclude
- # clear
- > templates/description
-}
-
git_dirs() {
[ -s git.dirs ] || ls -1 git-import > git.dirs
-}
-
-# setup bare git repo for each imported git repo
-# i.e repos that should be used for serving git service
-# input: cvs.pkgs = list of packages
-git_bare() {
- set -$d
- local pkg
-
- git_templates
- cvs_pkgs
- install -d git
- for pkg in ${@:-$(cat cvs.pkgs)}; do
- grep -qxF $pkg cvs.blacklist && continue
- grep -qxF $pkg git.blacklist && continue
-
- test -d $gitdir/$pkg
-
- rm -rf gitroot/$pkg
- git clone --bare --mirror --template=templates git-import/$pkg gitroot/$pkg || echo $pkg >> git.blacklist
- done
}
# generate shortlog for each package
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/git-migration/pld-git.sh?r1=1.26&r2=1.27&f=u
More information about the pld-cvs-commit
mailing list