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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 29 11:45:35 PST 2018


Author: martinl
Date: 2018-12-29 11:45:35 -0800 (Sat, 29 Dec 2018)
New Revision: 73885

Modified:
   grass-addons/tools/svn2git/migrate.sh
Log:
svn2git: fix tagging

Modified: grass-addons/tools/svn2git/migrate.sh
===================================================================
--- grass-addons/tools/svn2git/migrate.sh	2018-12-29 18:52:36 UTC (rev 73884)
+++ grass-addons/tools/svn2git/migrate.sh	2018-12-29 19:45:35 UTC (rev 73885)
@@ -2,7 +2,8 @@
 
 # Initialize git repo (preferably use AUTHORS.txt from SVN)
 
-mkdir grass-gis-git ; cd grass-gis-git
+mkdir grass-gis-git
+cd grass-gis-git
 git svn init --stdlayout https://svn.osgeo.org/grass/grass # --no-metadata 
 git svn --authors-file=../AUTHORS.txt fetch
 
@@ -19,9 +20,15 @@
 # Rename tags
 for i in `git branch -r | grep tags`; do
     b=`echo $i | sed 's#origin/##'`
-    j=`echo $i | sed 's#origin/tags/release_[0-9]\+_##g'`
+    if [ `echo $i | grep -c release` -gt 0 ] ; then
+        j=`echo $i | sed 's#origin/tags/release_[0-9]\+_##g'`
+    else
+        j=`echo $i | sed 's#origin/tags/##g'`
+    fi
     git branch $b $i
-    git tag -a $j -m "Tagging release $j"
+    d=`git log -1 --format=%cd --date=iso $b`
+    h=`git log -1 --format=%h --date=iso $b`
+    GIT_COMMITTER_DATE="$d" git tag -a $j -m "Tagging release $j" $h
 done
 git checkout master
 for i in `git branch | grep tags`; do
@@ -32,8 +39,8 @@
 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 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.txt for changes overview ...



More information about the grass-commit mailing list