Index: tools/svndbadmin
===================================================================
--- tools/svndbadmin	(revision 93)
+++ tools/svndbadmin	(working copy)
@@ -61,6 +61,9 @@
 import svn.fs
 import svn.delta
 
+import libsvn._core
+import _mysql_exceptions
+
 import cvsdb
 
 class SvnRepo:
@@ -179,34 +182,41 @@
 
 def handle_revision(db, command, repo, rev):
     """Adds a particular revision of the repository to the checkin database."""
-    revision = repo[rev]
-    for (path, action, plus, minus) in revision.changes:
-        directory, file = os.path.split(path)
-        commit = cvsdb.CreateCommit()
-        commit.SetRepository(repo.path)
-        commit.SetDirectory(directory)
-        commit.SetFile(file)
-        commit.SetRevision(str(rev))
-        commit.SetAuthor(revision.author)
-        commit.SetDescription(revision.log)
-        commit.SetTime(revision.date)
-        commit.SetPlusCount(plus)
-        commit.SetMinusCount(minus)
-        commit.SetBranch(None)
+    try:
+        revision = repo[rev]
+        for (path, action, plus, minus) in revision.changes:
+	    directory, file = os.path.split(path)
+	    commit = cvsdb.CreateCommit()
+	    commit.SetRepository(repo.path)
+	    commit.SetDirectory(directory)
+	    commit.SetFile(file)
+	    commit.SetRevision(str(rev))
+	    commit.SetAuthor(revision.author)
+	    commit.SetDescription(revision.log)
+	    commit.SetTime(revision.date)
+	    commit.SetPlusCount(plus)
+	    commit.SetMinusCount(minus)
+	    commit.SetBranch(None)
 
-        if action == 'add':
-            commit.SetTypeAdd()
-        elif action == 'remove':
-            commit.SetTypeRemove()
-        elif action == 'change':
-            commit.SetTypeChange()
+	    if action == 'add':
+		commit.SetTypeAdd()
+	    elif action == 'remove':
+		commit.SetTypeRemove()
+	    elif action == 'change':
+		commit.SetTypeChange()
 
-        if command == 'update':
-            result = db.CheckCommit(commit)
-            if result: continue # already recorded
+	    if command == 'update':
+		result = db.CheckCommit(commit)
+		if result: continue # already recorded
 
-        # commit to database
-        db.AddCommit(commit)
+	    # commit to database
+	    db.AddCommit(commit)
+    except libsvn._core.SubversionException, sve:
+        sys.stderr.write('ERROR: subversion exception in %s r%d: %s\n'
+                         % (repo.path, rev, sve.__str__()))
+    except _mysql_exceptions.OperationalError, oe:
+        sys.stderr.write('ERROR: mysql error in %s r%d: %s\n'
+                         % (repo.path, rev, oe.__str__()))
     pass
 
 def main(pool, command, repository, rev=None):
