[GRASS-SVN] r73427 - grass-addons/tools/svn2git
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Sep 26 14:38:49 PDT 2018
Author: martinl
Date: 2018-09-26 14:38:49 -0700 (Wed, 26 Sep 2018)
New Revision: 73427
Added:
grass-addons/tools/svn2git/migrate.sh
Modified:
grass-addons/tools/svn2git/readme.txt
Log:
svn2git: work in progress, draft of migrate.sh script addded
Added: grass-addons/tools/svn2git/migrate.sh
===================================================================
--- grass-addons/tools/svn2git/migrate.sh (rev 0)
+++ grass-addons/tools/svn2git/migrate.sh 2018-09-26 21:38:49 UTC (rev 73427)
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# Initialize git repo (preferably use AUTHORS.txt from SVN)
+
+mkdir grass-gis-git ; cd grass-gis-git
+git svn init --stdlayout --prefix=svn https://svn.osgeo.org/grass/grass
+git svn --authors-file=../AUTHORS.txt fetch
+
+# Create local branches
+git branch develbranch_6 origin/develbranch_6
+for branch in `git branch -r | grep releasebranch | sed 's# origin/##g'`; do
+ git branch $branch origin/$branch
+done
+git checkout develbranch_6
+git branch -D master
+git branch master origin/trunk
+git checkout master
+
+# 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'`
+ git branch $b $i
+ git tag -a $j -m "Tagging release $j"
+done
+git checkout master
+for i in `git branch | grep tags`; do
+ git branch -D $i
+done
+
+# Remove origin branches
+# for i in `git branch -r | grep origin`; do echo "git push origin --delete $i"; done
+
+# Fix commit messages (#x -> https://trac.osgeo.org/...)
+git reset --hard HEAD && git checkout master
+git filter-branch --msg-filter 'python ../rewrite.py' -- --all
+# check out /tmp/log.txt for changes overview ...
Property changes on: grass-addons/tools/svn2git/migrate.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/x-sh
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: grass-addons/tools/svn2git/readme.txt
===================================================================
--- grass-addons/tools/svn2git/readme.txt 2018-09-26 21:31:27 UTC (rev 73426)
+++ grass-addons/tools/svn2git/readme.txt 2018-09-26 21:38:49 UTC (rev 73427)
@@ -12,8 +12,4 @@
$ svn log --xml --quiet | grep author | sort -u | perl -pe 's/.*>(.*?)<.*/$1 = /' >> authors.txt
$ python3 svn-contributors-to-git.py
-1. Initialize git repo (preferably use AUTHORS.txt from SVN)
-
-$ mkdir grass-gis-git ; cd grass-gis-git
-$ git svn init --stdlayout https://svn.osgeo.org/grass/grass
-$ git svn --authors-file=path/to/grass_addons/tools/svn2git/AUTHORS.txt
+Run migrate.sh script...
More information about the grass-commit
mailing list