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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 12 09:22:13 PST 2019


Author: martinl
Date: 2019-02-12 09:22:13 -0800 (Tue, 12 Feb 2019)
New Revision: 74082

Modified:
   grass-addons/tools/svn2git/0-migrate-fetch.sh
   grass-addons/tools/svn2git/1-migrate-branches-tags.sh
Log:
svn2git: use abs path in scripts

Modified: grass-addons/tools/svn2git/0-migrate-fetch.sh
===================================================================
--- grass-addons/tools/svn2git/0-migrate-fetch.sh	2019-02-12 17:21:44 UTC (rev 74081)
+++ grass-addons/tools/svn2git/0-migrate-fetch.sh	2019-02-12 17:22:13 UTC (rev 74082)
@@ -1,19 +1,22 @@
 #!/bin/sh
 
+SCRIPT=`realpath $0` # realpath is a separate package and doesn't need to be installed
+SCRIPTPATH=`dirname $SCRIPT`
+
 # core repo
 DIR=grass-fetch
 mkdir $DIR ; cd $DIR
 git svn init --stdlayout https://svn.osgeo.org/grass/grass
-git svn --authors-file=../AUTHORS.txt fetch
+git svn --authors-file=${SCRIPTPATH}/AUTHORS.txt fetch
 
 # addons repo
 DIR=grass-addons-fetch
 mkdir $DIR ; cd $DIR
 git svn init https://svn.osgeo.org/grass/grass-addons
-git svn --authors-file=../AUTHORS.txt fetch
+git svn --authors-file=${SCRIPTPATH}/AUTHORS.txt fetch
 
 # promo
 DIR=grass-promo-fetch
 mkdir $DIR ; cd $DIR
 git svn init https://svn.osgeo.org/grass/grass-promo
-git svn --authors-file=../AUTHORS.txt fetch
+git svn --authors-file=${SCRIPTPATH}/AUTHORS.txt fetch

Modified: grass-addons/tools/svn2git/1-migrate-branches-tags.sh
===================================================================
--- grass-addons/tools/svn2git/1-migrate-branches-tags.sh	2019-02-12 17:21:44 UTC (rev 74081)
+++ grass-addons/tools/svn2git/1-migrate-branches-tags.sh	2019-02-12 17:22:13 UTC (rev 74082)
@@ -1,5 +1,8 @@
 #!/bin/sh
 
+SCRIPT=`realpath $0` # realpath is a separate package and doesn't need to be installed
+SCRIPTPATH=`dirname $SCRIPT`
+
 # TO BE SET
 DIR=grass
 ### DIR=grass-legacy
@@ -55,11 +58,9 @@
 
 # Fix commit messages (#x -> https://trac.osgeo.org/...)
 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
+    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



More information about the grass-commit mailing list