Revision: 76464
          http://sourceforge.net/p/brlcad/code/76464
Author:   starseeker
Date:     2020-07-24 12:58:09 +0000 (Fri, 24 Jul 2020)
Log Message:
-----------
Doing this manually right now, but make the scripts look more like what the 
final process is actually turning out to be.

Modified Paths:
--------------
    brlcad/trunk/misc/repoconv/CONVERT.sh
    brlcad/trunk/misc/repoconv/RESUME.sh

Modified: brlcad/trunk/misc/repoconv/CONVERT.sh
===================================================================
--- brlcad/trunk/misc/repoconv/CONVERT.sh       2020-07-24 12:48:52 UTC (rev 
76463)
+++ brlcad/trunk/misc/repoconv/CONVERT.sh       2020-07-24 12:58:09 UTC (rev 
76464)
@@ -146,24 +146,33 @@
 REPODERCSDIR="$PWD/repo_dercs"
 ./svnfexport ./brlcad_full_dercs.dump account-map $REPODERCSDIR
 
-# Clone the repo via a mirror (gets us a copy without internal git conversion
-# logs taking up space)
-echo "Mirroring to brlcad_git directory"
-mkdir brlcad_git && cd brlcad_git
-git clone --mirror file://$PWD/cvs_git .git
-git init
-git remote rm origin
+# Create an svn revision to author map
+svn log file://$REPODIR | grep "|" | grep "^r[0-9][0-9 ]" | grep -v \(no\ 
author\) | awk -F "|" '{print $1 $2}' | sed -e 's/r//' | sed -e 's/ $//' | sed 
-e 's/  / /' > rev_map
 
-echo "Do a file git gc --aggressive"
+# Create a fast export file of the conversion.  IMPORTANT - need
+# original ids if we're going to process the git notes down into
+# the commit messages.
+cd cvs_git && git fast-export --show-original-ids --all > ../brlcad_raw.fi && 
cd ..
+repowork -t -w -e brlcad_map -n -r cvs_git -s rev_map ~/brlcad_raw.fi 
brlcad_final.fi
+
+mkdir brlcad_final.git && cd brlcad_final.git && git init
+cat ../brlcad_final.fi | git fast-import
+
+# Compress the fast-import - by default, it is unoptimized
 git gc --aggressive
-
-echo "Clean up the one commit from CVS that never made it to the svn history"
 git reflog expire --expire-unreachable=now --all
 git gc --prune=now
+cd ..
 
-echo "Make the final tar.gz file (NOTE!!! we can't use git bundle for this, it 
drops all the notes with the svn rev info)"
-mv .git brlcad-git
-tar -czf ../brlcad-git.tar.gz brlcad-git
-mv brlcad-git .git
+# Package up the conversion
+tar -czf brlcad_final.tar.gz brlcad_final.git
 
-echo "Be aware that by default a checkout of the repo won't get the notes - it 
requires an extra step, see 
https://stackoverflow.com/questions/37941650/fetch-git-notes-when-cloning";
+# If uploading to github, it will look something like the following once the
+# repository has been created through the github website.  Note, in particular,
+# that UNLIKE the github instructions we push everything, not just master:
+#
+# cd brlcad_final.git
+# git remote add origin [email protected]:BRL-CAD/BRL-CAD.git
+# git push --all -u origin
+
+

Modified: brlcad/trunk/misc/repoconv/RESUME.sh
===================================================================
--- brlcad/trunk/misc/repoconv/RESUME.sh        2020-07-24 12:48:52 UTC (rev 
76463)
+++ brlcad/trunk/misc/repoconv/RESUME.sh        2020-07-24 12:58:09 UTC (rev 
76464)
@@ -28,13 +28,35 @@
 REPODERCSDIR="$PWD/repo_dercs"
 ./svnfexport ./brlcad_full_dercs.dump account-map $REPODERCSDIR
 
-echo "Do a file git gc --aggressive"
+# Clear previous "final" conversion
+rm -rf brlcad_final.git brlcad_final.tar.gz
+
+# Create an updated svn revision to author map
+svn log file://$REPODIR | grep "|" | grep "^r[0-9][0-9 ]" | grep -v \(no\ 
author\) | awk -F "|" '{print $1 $2}' | sed -e 's/r//' | sed -e 's/ $//' | sed 
-e 's/  / /' > rev_map
+
+# Create a fast export file of the conversion.  IMPORTANT - need
+# original ids if we're going to process the git notes down into
+# the commit messages.
+cd cvs_git && git fast-export --show-original-ids --all > ../brlcad_raw.fi && 
cd ..
+repowork -t -w -e brlcad_map -n -r cvs_git -s rev_map ~/brlcad_raw.fi 
brlcad_final.fi
+
+mkdir brlcad_final.git && cd brlcad_final.git && git init
+cat ../brlcad_final.fi | git fast-import
+
+# Compress the fast-import - by default, it is unoptimized
 git gc --aggressive
+git reflog expire --expire-unreachable=now --all
+git gc --prune=now
+cd ..
 
-echo "Make the final tar.gz file (NOTE!!! we can't use git bundle for this, it 
drops all the notes with the svn rev info)"
-mkdir brlcad-git
-mv .git brlcad-git
-tar -czf ../brlcad-git.tar.gz brlcad-git
-mv brlcad-git .git
+# Package up the conversion
+tar -czf brlcad_final.tar.gz brlcad_final.git
 
-echo "Be aware that by default a checkout of the repo won't get the notes - it 
requires an extra step, see 
https://stackoverflow.com/questions/37941650/fetch-git-notes-when-cloning";
+# If uploading to github, it will look something like the following once the
+# repository has been created through the github website.  Note, in particular,
+# that UNLIKE the github instructions we push everything, not just master:
+#
+# cd brlcad_final.git
+# git remote add origin [email protected]:BRL-CAD/BRL-CAD.git
+# git push --all -u origin
+

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to