git-migration: pld-git.sh - rewrite commitlogs (latin2 convert optionally)

glen glen at pld-linux.org
Sat Feb 5 15:19:40 CET 2011


Author: glen                         Date: Sat Feb  5 14:19:40 2011 GMT
Module: git-migration                 Tag: HEAD
---- Log message:
- rewrite commitlogs (latin2 convert optionally)

---- Files affected:
git-migration:
   pld-git.sh (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: git-migration/pld-git.sh
diff -u git-migration/pld-git.sh:1.5 git-migration/pld-git.sh:1.6
--- git-migration/pld-git.sh:1.5	Sat Feb  5 15:14:53 2011
+++ git-migration/pld-git.sh	Sat Feb  5 15:19:35 2011
@@ -85,6 +85,18 @@
 	done
 }
 
+# rewrite commit logs
+# historically old commits were in latin2, detect those and convert to utf8
+git_rewrite_commitlogs() {
+	local msgconv=$(pwd)/msgconv.sh
+
+	for pkg in ${@:-$(cat cvs.dirs)}; do
+		cd gitroot/$pkg
+		git filter-branch --msg-filter "$msgconv"
+		cd ../../
+	done
+}
+
 # create template dir of git_bare
 # we copy system template dir and remove samples from it
 git_templates() {
@@ -167,6 +179,7 @@
 cvs_rsync
 
 git_import "$@"
+git_rewrite_commitlogs "$@"
 
 # 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.5&r2=1.6&f=u



More information about the pld-cvs-commit mailing list