[GRASS-SVN] r74071 - grass-addons/tools/svn2git

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 9 06:26:45 PST 2019


Author: martinl
Date: 2019-02-09 06:26:45 -0800 (Sat, 09 Feb 2019)
New Revision: 74071

Modified:
   grass-addons/tools/svn2git/0-migrate-fetch.sh
   grass-addons/tools/svn2git/1-migrate-branches-tags.sh
Log:
svn2git: loop rewrite message over all active branches


Modified: grass-addons/tools/svn2git/0-migrate-fetch.sh
===================================================================
--- grass-addons/tools/svn2git/0-migrate-fetch.sh	2019-02-09 14:17:49 UTC (rev 74070)
+++ grass-addons/tools/svn2git/0-migrate-fetch.sh	2019-02-09 14:26:45 UTC (rev 74071)
@@ -15,5 +15,5 @@
 # promo
 DIR=grass-promo-fetch
 mkdir $DIR ; cd $DIR
-git svn init https://svn.osgeo.org/grass/grass-addons
+git svn init https://svn.osgeo.org/grass/grass-promo
 git svn --authors-file=../AUTHORS.txt fetch

Modified: grass-addons/tools/svn2git/1-migrate-branches-tags.sh
===================================================================
--- grass-addons/tools/svn2git/1-migrate-branches-tags.sh	2019-02-09 14:17:49 UTC (rev 74070)
+++ grass-addons/tools/svn2git/1-migrate-branches-tags.sh	2019-02-09 14:26:45 UTC (rev 74071)
@@ -49,11 +49,19 @@
 done
 
 # Remove remote branches
-for i in `git branch -r | grep origin`; do git branch -dr $i; done
+for i in `git branch -r | grep origin`; do
+    git branch -dr $i
+done
 
 # Fix commit messages (#x -> https://trac.osgeo.org/...)
-git reset --hard HEAD && git checkout master
-#SCRIPT=`realpath $0` # realpath is a separate package and doesn't need to be installed
-#SCRIPTPATH=`dirname $SCRIPT`
-#git filter-branch --msg-filter "python  $SCRIPTPATH/../rewrite.py" -- --all
-# check out /tmp/log_touched.txt and /tmp/log_untoched.txt for changes overview ...
+git reset --hard HEAD
+SCRIPT=`realpath $0` # realpath is a separate package and doesn't need to be installed
+SCRIPTPATH=`dirname $SCRIPT`
+for b in `git branch | cut -c 3-`; do
+    git checkout $b
+    git filter-branch --msg-filter "python  $SCRIPTPATH/../rewrite.py" -- --all
+    # check out /tmp/log_touched.txt and /tmp/log_untoched.txt for changes overview ...
+    mv /tmp/log_touched.txt log_${b}_touched.txt
+    mv /tmp/log_untouched.txt log_${b}_untouched.txt
+done
+



More information about the grass-commit mailing list