From bb6e9f9777225ab390bb06173045532ff1938afd Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Thu, 9 Aug 2012 22:41:02 -0500 Subject: [PATCH] Delete check-replay-repo.sh This code was refactored to create the more-generally-callable diff-repo.sh script which allows comparing two arbitrary URLs. --- tests/check-replay-repo.sh | 61 -------------------------------------- 1 file changed, 61 deletions(-) delete mode 100755 tests/check-replay-repo.sh diff --git a/tests/check-replay-repo.sh b/tests/check-replay-repo.sh deleted file mode 100755 index f19161e..0000000 --- a/tests/check-replay-repo.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -# Compare the reference (make-ref-repo.sh) and replay (make-replay-repo.sh) -# repositories to check for any differences/problems with the svn2svn replay. - -PWD=$(pwd) -PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g') -WCREF="$PWD/_wc_ref" -WCDUP="$PWD/_wc_target" -found_diff=0 - -# Create a working-copy for the reference repo -# Note: We assume that the replay working-copy ("_wc_target") still exists from make-replay-repo.sh -#svn co -q $PWDURL/_repo_ref "$WCREF" -svn co -q $PWDURL/_repo_ref/trunk "$WCREF" -#svn co -q $PWDURL/_repo_ref/trunk/Module2/ProjectB "$WCREF" - -# Check if the final list of files is the same -echo ">> Checking file-list..." -cd "$WCREF" && FILESREF=$(find . -type f | grep -v "\.svn") && cd "$PWD" -cd "$WCDUP" && FILESDUP=$(find . -type f | grep -v "\.svn") && cd "$PWD" -if [ "$FILESREF" != "$FILESDUP" ]; then - echo "$FILESREF" > _files_ref.txt - echo "$FILESDUP" > _files_replay.txt - echo "<<< _files_reference.txt" - echo ">>> _files_replay.txt" - diff _files_ref.txt _files_replay.txt - rm _files_ref.txt _files_replay.txt - found_diff=1 -fi -echo "" - -# Check if the final file-contents is the same -echo ">> Checking file-contents..." -cd "$WCREF" -FILES=$(find . -type f | grep -v "\.svn") -cd "$PWD" -echo "$FILES" | while read file; do - fname=$(echo "$file" | sed 's/^\.\///') - FILEREF="$WCREF/$fname" - FILEDUP="$WCDUP/$fname" - if [ -f "$FILEDUP" ]; then - chksum1=$(md5sum "$FILEREF" | cut -c1-32) - chksum2=$(md5sum "$FILEDUP" | cut -c1-32) - if [ "$chksum1" != "$chksum2" ]; then - echo "Checksum mismatch: $fname" - echo " $chksum1 $FILEREF" - echo " $chksum2 $FILEDUP" - found_diff=1 - fi - else - echo "No such file: $FILEDUP" - found_diff=1 - fi -done -echo "" - -# Clean-up -rm -rf "$WCREF" - -# If we found any differences, exit with an error-code -[ "$found_diff" -eq 1 ] && exit 1 -- 2.43.0