Login | Register
My pages Projects Community openCollabNet

Discussions > Commits > svn commit: r133 - trunk/repoguard/src/repoguard/core/transaction.py

repoguard
Discussion topic

Back to topic list

svn commit: r133 - trunk/repoguard/src/repoguard/core/transaction.py

Author schlauch
Full name Tobias Schlauch
Date 2012-09-19 13:05:47 PDT
Message Author: schlauch
Date: 2012-09-19 13:05:45-0700
New Revision: 133

Modified:
   trunk/repoguard/src/​repoguard/core/trans​action.py

Log:
Fixes ISSUE #48:
Explicitly handled an empty repository. We just return an empty output of the svnlook command.

Modified: trunk/repoguard/src/​repoguard/core/trans​action.py
Url: http://repoguard.tig​ris.org/source/brows​e/repoguard/trunk/re​poguard/src/repoguar​d/core/transaction.p​y?view=diff&path​rev=133&r1=132​&r2=133
====================​====================​====================​==================
--- trunk/repoguard/src/​repoguard/core/trans​action.py (original)
+++ trunk/repoguard/src/​repoguard/core/trans​action.py 2012-09-19 13:05:45-0700
@@ -64,7 +64,15 @@
         if command in self.cache:
             return self.cache[command]
         
- output = process.execute(command)
+ try:
+ output = process.execute(command)
+ except process.ProcessException, error:
+ if (error.exit_code == "E160006" # Nothing bad happened we just have an empty repository
+ and "Transaction '(null)'" in error.output):
+ output = ""
+ else:
+ raise
+
         if split:
             output = [x.strip() for x in output.split("\n") if x.strip()]

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r133 - trunk/repoguard/src/repoguard/core/transaction.py schlauch Tobias Schlauch 2012-09-19 13:05:47 PDT
Messages per page: