Revision: 76567
http://sourceforge.net/p/brlcad/code/76567
Author: starseeker
Date: 2020-07-29 13:40:11 +0000 (Wed, 29 Jul 2020)
Log Message:
-----------
Flesh out the notes about subsequent steps.
Modified Paths:
--------------
brlcad/trunk/misc/CMakeLists.txt
brlcad/trunk/misc/repoconv/CONVERT.sh
brlcad/trunk/misc/repoconv/cvs_info.sh
Added Paths:
-----------
brlcad/trunk/misc/repoconv/domap.sh
Modified: brlcad/trunk/misc/CMakeLists.txt
===================================================================
--- brlcad/trunk/misc/CMakeLists.txt 2020-07-29 13:12:39 UTC (rev 76566)
+++ brlcad/trunk/misc/CMakeLists.txt 2020-07-29 13:40:11 UTC (rev 76567)
@@ -211,6 +211,7 @@
repoconv/cvs_authormap
repoconv/cvs_authormap_svnfexport.txt
repoconv/cvs_info.sh
+ repoconv/domap.sh
repoconv/email_fixups.txt
repoconv/cvs_repaired/sphflake.pix,v
repoconv/gitattributes
Modified: brlcad/trunk/misc/repoconv/CONVERT.sh
===================================================================
--- brlcad/trunk/misc/repoconv/CONVERT.sh 2020-07-29 13:12:39 UTC (rev
76566)
+++ brlcad/trunk/misc/repoconv/CONVERT.sh 2020-07-29 13:40:11 UTC (rev
76567)
@@ -98,7 +98,7 @@
diff -qrw -I '\$Id' -I '\$Revision' -I'\$Header' -I'$Source' -I'$Date'
-I'$Log' -I'$Locker' --exclude "terra.dsp" brlcad_cvs-r29886 brlcad_svn-r29886
# cleanup
-rm -rf brlcad_cvs
+#rm -rf brlcad_cvs
rm -rf brlcad_cvs-r29886
rm -rf brlcad_svn-r29886
rm brlcad_cvs-r29886.tar.gz
@@ -149,16 +149,38 @@
# 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
-# MANUAL: Generate mapping files with the cvs_info.sh script
-#
-# the domap.sh script is in the comments at the bottom of cvs_info.sh
-# cd cvs_git && ./domap.sh && mv msgtime_sha1_map ../ && rm domap.sh && rm
sha1.txt
+# MANUAL: Generate mapping files with the cvs_info.sh script. Need
+# two maps - one from the archival repo's msg+time key to the data
+# we need, and the other a map from that same key to the SHA1 commits
+# of the new repository. The "key" is a SHA1 hash of just the commit
+# message, with the Unix time appended to the string produced. It is
+# not guaranteed to be universally unique as a key, but it should be
+# for anything we care about (unless we've got two commits with the
+# same message and same timestamp in the history, and even then that
+# would be a practical problem only if those commits had different
+# CVS branches or authors.)
+rm -rf cvs_info && mkdir cvs_info && cp cvs_info.sh cvs_info/ && cd cvs_info
+./cvs_info.sh
+mv key_authormap .. && mv key_branchmap ..
+cd ..
+# With the basic maps generated from a basic (no authormap) cvs-fast-export
+# conversion of the CVS repository, generate the map for our target repo
+# (the output of the svnfexport process. This will produce the
msgtime_sha1_map
+# file used later in the process
+cd cvs_git && ../domap.sh && cd ..
-# MANUAL: Run verify on the CVS conversion and stage any differences found for
incorporation
-# mkdir cvs_info && cp cvs_info.sh cvs_info/ && cd cvs_info && ./cvs_info.sh
-#
-# If we need to do this, need the children map from git:
+# MANUAL: Run verify on the CVS conversion and stage any differences found for
+# incorporation - not sure if we're going to do this yet... Here's how to kick
+# off the process with just a CVS check.
+#mkdir verify && cd verify
+#g++ -O3 -o verify ../verify.cpp
+#cp -r ../brlcad_cvs .
+#cp -r ../cvs_git .
+#./verify --keymap ../msgtime_sha1_map --branchmap ../key_branchmap --cvs-repo
/home/user/verify/brlcad_cvs cvs_git
+# mkdir ../trees && cp *.fi ../trees/
+#cd ..
+# If we need to do this, will also need the children map from git:
# cd cvs_git && git rev-list --children --all > ../children && cd ..
# Create a fast export file of the conversion. IMPORTANT - need
@@ -165,8 +187,28 @@
# original ids if we're going to process the git notes down into
# the commit messages.
cd cvs_git && git checkout master && git fast-export --show-original-ids --all
> ../brlcad_raw.fi && cd ..
-repowork -t -e email_fixups.txt -n -r cvs_git -s rev_map --cvs-rebuild-ids
cvs_problem_sha1.txt --children children --keymap msgtime_sha1_map
--cvs-auth-map key_authormap --cvs-branch-map key_branchmap ~/brlcad_raw.fi
brlcad_final.fi
+# Build the repowork processing tool
+cd ../repowork && mkdir build && cd build && cmake .. && make -j5 && cd
../../repoconv
+
+# With the preliminaries complete, we use the repowork tool to finalize the
conversion:
+
+../repowork/build/repowork -t \
+ -e email_fixups.txt \
+ -n -r cvs_git \
+ -s rev_map \
+ --keymap msgtime_sha1_map --cvs-auth-map key_authormap
--cvs-branch-map key_branchmap \
+ ~/brlcad_raw.fi brlcad_final.fi
+
+# If we do rebuild CVS commits, the command becomes:
+#../repowork/build/repowork -t \
+# -e email_fixups.txt \
+# -n -r cvs_git \
+# -s rev_map \
+# --cvs-rebuild-ids cvs_problem_sha1.txt --children children \
+# --keymap msgtime_sha1_map --cvs-auth-map key_authormap
--cvs-branch-map key_branchmap \
+# ~/brlcad_raw.fi brlcad_final.fi
+
mkdir brlcad_final.git && cd brlcad_final.git && git init
cat ../brlcad_final.fi | git fast-import
Modified: brlcad/trunk/misc/repoconv/cvs_info.sh
===================================================================
--- brlcad/trunk/misc/repoconv/cvs_info.sh 2020-07-29 13:12:39 UTC (rev
76566)
+++ brlcad/trunk/misc/repoconv/cvs_info.sh 2020-07-29 13:40:11 UTC (rev
76567)
@@ -167,15 +167,6 @@
cd ..
-# To generate a map between the above keys and sha1 values, run the
-# following script from within the repository you wish to map to:
+# NOTE: to generate a map between the above keys and sha1 values, run the
+# domap.sh script from within the repository you wish to map to.
-# git log --all --pretty=format:"%H" > sha1s.txt
-#
-# while IFS="" read -r p || [ -n "$p" ]
-# do
-# MSGSHA1=$(git log -n1 --pretty=format:"%B" $p | sha1sum | head -c 40)
-# CDATE=$(git log -n1 --pretty=format:"%ct" $p)
-# echo $MSGSHA1$CDATE:$p >> msgtime_sha1_map
-# done < sha1s.txt
-
Added: brlcad/trunk/misc/repoconv/domap.sh
===================================================================
--- brlcad/trunk/misc/repoconv/domap.sh (rev 0)
+++ brlcad/trunk/misc/repoconv/domap.sh 2020-07-29 13:40:11 UTC (rev 76567)
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# To generate a map between the msg/time keys and sha1 values, run the
+# following script from within the repository you wish to map to (i.e.
+# the target repository to which the information in the original map
+# is to be applied:
+
+git log --all --pretty=format:"%H" > sha1s.txt
+
+while IFS="" read -r p || [ -n "$p" ]
+do
+ MSGSHA1=$(git log -n1 --pretty=format:"%B" $p | sha1sum | head -c 40)
+ CDATE=$(git log -n1 --pretty=format:"%ct" $p)
+ echo $MSGSHA1$CDATE:$p >> ../msgtime_sha1_map
+done < sha1s.txt
+
+rm sha1s.txt
Property changes on: brlcad/trunk/misc/repoconv/domap.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
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
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