[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [repo-management] bin/anongit: Use a suffix to keep multiple deletions in one day for the same repo
From: Jeff Mitchell <mitchell () kde ! org>
Date: 2013-03-29 20:59:21
Message-ID: 20130329205921.1633EA604F () git ! kde ! org
[Download RAW message or body]
Git commit a20c5e51681e36684fb3978091b83da6bd8c683e by Jeff Mitchell.
Committed on 29/03/2013 at 21:58.
Pushed by mitchell into branch 'master'.
Use a suffix to keep multiple deletions in one day for the same repo separate. Mail \
sysadmin on delete action.
M +8 -3 bin/anongit/update_repo_mirrors.sh
http://commits.kde.org/repo-management/a20c5e51681e36684fb3978091b83da6bd8c683e
diff --git a/bin/anongit/update_repo_mirrors.sh b/bin/anongit/update_repo_mirrors.sh
index b86ddc9..4359cec 100755
--- a/bin/anongit/update_repo_mirrors.sh
+++ b/bin/anongit/update_repo_mirrors.sh
@@ -7,10 +7,12 @@ else
touch /tmp/update_repo.txt
fi
+hostname=$(cat /home/git/thisanongithost)
+
~/repo-management/bin/verify_new_projects_list.pl ~/projects-to-anongit.list \
~/projects-to-anongit.list.new if [ $? -ne 0 ]
then
- echo "Projects list file may have changed too much; not replacing current list and \
not continuing" | mail -r "sysadmin@kde.org" -s "WARNING: projects.list problem on \
$HOSTNAME" sysadmin@kde.org + echo "Projects list file may have changed too much; \
not replacing current list and not continuing" | mail -r "sysadmin@kde.org" -s \
"WARNING: projects.list problem on $hostname" sysadmin@kde.org rm \
/tmp/update_repo.txt exit 1
fi
@@ -26,7 +28,10 @@ if [ -s ~/diffout ]
# Remove each of the specified repos
for line in `cat ~/diffout`; do
echo "Removing repository $line"
- mv $line /deleted-repos/$(date +%Y-%m-%d)_$(basename $line)
+ suffix=$(mktemp -u XXXXXXX)
+ newpath="/deleted-repos/$(date +%Y-%m-%d)_$(basename $line)_$suffix"
+ mv $line $newpath
+ echo "Repository $line moved to $newpath on $hostname" | mail -r \
"sysadmin@kde.org" -s "REPO DELETION: $line" sysadmin@kde.org done
fi
rm ~/diffout
@@ -57,7 +62,7 @@ for line in `cat ~/projects-to-anongit.list`; do
git config transfer.fsckObjects true
if [ $? -ne 0 ]
then
- echo "Fresh mirror clone of git://git.kde.org/$line failed git fsck, not \
following through with rest of update" | mail -r "sysadmin@kde.org" -s "WARNING: git \
fsck problem on $HOSTNAME" sysadmin@kde.org + echo "Fresh mirror clone of \
git://git.kde.org/$line failed git fsck, not following through with rest of update" | \
mail -r "sysadmin@kde.org" -s "WARNING: git fsck problem on $hostname" \
sysadmin@kde.org rm /tmp/update_repo.txt
exit 1
fi
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic