Hey,

here's a little patch to avoid problems when having the config in SVN.

Morty

-- 
Dipl.-Ing. Moritz 'Morty' Strübe (Wissenschaftlicher Mitarbeiter)
Lehrstuhl für Informatik 4 (Verteilte Systeme und Betriebssysteme)
Friedrich-Alexander-Universität Erlangen-Nürnberg
Martensstr. 1
91058 Erlangen

Tel   : +49 9131 85-25419
Fax   : +49 9131 85-28732
eMail : stru...@cs.fau.de
WWW   : https://www4.cs.fau.de/~morty


From 38fd22146549a63601e6c41ce0f0f82cab26b918 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Moritz=20=27Morty=27=20Str=C3=BCbe?= <mo...@gmx.net>
Date: Thu, 15 Jan 2015 14:32:00 +0100
Subject: [PATCH] Always cleanup the svn repo before updating

If there is a lock in the svn-repo, e.g. because the computer was shut
down at the wrong moment updating will fail.
---
 lib/get-config-dir-svn | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/get-config-dir-svn b/lib/get-config-dir-svn
index 72a492b..17e6468 100755
--- a/lib/get-config-dir-svn
+++ b/lib/get-config-dir-svn
@@ -55,6 +55,8 @@ if [ -d "$FAI/.svn" ] ; then
     if [ `svn info $FAI | grep '^URL:' | awk '{print $2}'` == "$svnurl" ]; then
         echo "Updating SVN in $FAI"
         cd $FAI
+        # Make sure the repo is clean and can be updated
+        svn cleanup
         svn up $user $pass | grep -v 'Updated to revision' > $LOGDIR/getconf.log
         task_error 881 ${PIPESTATUS[0]}
     else
-- 
1.9.1

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to