Revision: 78326 http://sourceforge.net/p/brlcad/code/78326 Author: starseeker Date: 2021-02-25 18:50:27 +0000 (Thu, 25 Feb 2021) Log Message: ----------- Helper scripts for finding git commits relevant to individual SVN revisions.
Added Paths: ----------- brlcad/trunk/misc/repoconv/verify2/find.sh brlcad/trunk/misc/repoconv/verify2/find_date.sh brlcad/trunk/misc/repoconv/verify2/find_initial.sh Added: brlcad/trunk/misc/repoconv/verify2/find.sh =================================================================== --- brlcad/trunk/misc/repoconv/verify2/find.sh (rev 0) +++ brlcad/trunk/misc/repoconv/verify2/find.sh 2021-02-25 18:50:27 UTC (rev 78326) @@ -0,0 +1,20 @@ +#!/bin/bash +REV=$1 +rm -f files.txt shas.txt +svn diff -c$1 file:///home/user/brlcad_repo/brlcad|grep ^Index| awk '{print $2}'|sed -e 's/\// /'|awk '{print $2}' > files.txt +LOGMSG=$(svn log -c$1 file:///home/user/brlcad_repo/brlcad |tail +4|head -n 1) +while read p; do + git log --pretty=format:"%H;%s" --follow --full-history -- $p > logs + grep "$LOGMSG" logs | awk -F';' '{print $1}' > rsha1s.txt + while read s; do + echo "$s;$REV" >> full.txt + done < rsha1s.txt + rm rsha1s.txt logs +done < files.txt +cat full.txt |sort |uniq > shas.txt +rm full.txt files.txt +while read p; do + SHA1=$(echo $p | awk -F';' '{print $1}') + git log -1 --pretty=format:"%H;%s" $SHA1 +done < shas.txt +cat shas.txt Property changes on: brlcad/trunk/misc/repoconv/verify2/find.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 Added: brlcad/trunk/misc/repoconv/verify2/find_date.sh =================================================================== --- brlcad/trunk/misc/repoconv/verify2/find_date.sh (rev 0) +++ brlcad/trunk/misc/repoconv/verify2/find_date.sh 2021-02-25 18:50:27 UTC (rev 78326) @@ -0,0 +1,30 @@ +#!/bin/bash +REV=$1 +rm -f files.txt shas.txt +svn diff -c$1 file:///home/user/brlcad_repo/brlcad|grep ^Index| awk '{print $2}'|sed -e 's/\// /'|awk '{print $2}' > files.txt +LOGDATE=$(svn log -c$1 file:///home/cyapp/REPO_CONVERT_FINAL/brlcad_repo/brlcad | tail +2|head -n 1|awk -F'|' '{print $3}') +echo $LOGDATE +LOGYEAR=$(echo $LOGDATE | awk -F'-' '{print $1'}) +LOGMONTH=$(echo $LOGDATE | awk -F'-' '{print $2'}) +LOGDAY=$(echo $LOGDATE | awk -F'-' '{print $3'} | awk '{print $1}') +LOGDAY_PREV=$(expr $LOGDAY - 1) +while read p; do + git log --pretty=format:"%H;%s" --follow --since "$LOGYEAR-$LOGMONTH-$LOGDAY_PREV" --until "$LOGYEAR-$LOGMONTH-$LOGDAY" --full-history -- $p > logs + echo "" >> logs + cat logs + while read s; do + SHA1=$(echo $s | awk -F';' '{print $1}') + MSG=$(echo "$s" | awk -F';' '{print $2}') + if [ "$MSG" == "*** empty log message ***" ] + then + echo "$SHA1;$REV" >> full.txt + fi + done < logs +done < files.txt +cat full.txt |sort |uniq > shas.txt +rm full.txt files.txt +while read p; do + SHA1=$(echo $p | awk -F';' '{print $1}') + git log -1 --pretty=format:"%H;%s" $SHA1 +done < shas.txt +cat shas.txt Property changes on: brlcad/trunk/misc/repoconv/verify2/find_date.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 Added: brlcad/trunk/misc/repoconv/verify2/find_initial.sh =================================================================== --- brlcad/trunk/misc/repoconv/verify2/find_initial.sh (rev 0) +++ brlcad/trunk/misc/repoconv/verify2/find_initial.sh 2021-02-25 18:50:27 UTC (rev 78326) @@ -0,0 +1,12 @@ +#!/bin/bash +REV=$1 +rm -f files.txt shas.txt +svn diff -c$1 file:///home/user/brlcad_repo/brlcad|grep ^Index| awk '{print $2}'|sed -e 's/\// /'|awk '{print $2}' > files.txt +while read p; do + echo "$p" + SHA1=$(git log --follow --full-history --reverse -- $p | head -n 1|awk '{print $2}') + echo "$SHA1;$REV" >> full.txt +done < files.txt +cat full.txt |sort|uniq > shas.txt +rm full.txt +cat shas.txt Property changes on: brlcad/trunk/misc/repoconv/verify2/find_initial.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 brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits