[Treepkg-commits] r195 - trunk/treepkg
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed May 6 15:54:04 CEST 2009
Author: bh
Date: 2009-05-06 15:54:04 +0200 (Wed, 06 May 2009)
New Revision: 195
Modified:
trunk/treepkg/subversion.py
Log:
Make treepkg.subversion.last_changed_revision raise SubversionError if
the last changed revision cannot be determined.
Modified: trunk/treepkg/subversion.py
===================================================================
--- trunk/treepkg/subversion.py 2009-05-06 13:52:26 UTC (rev 194)
+++ trunk/treepkg/subversion.py 2009-05-06 13:54:04 UTC (rev 195)
@@ -15,6 +15,9 @@
from util import extract_value_for_key
+class SubversionError(Exception):
+ pass
+
def list_url(url):
"""Runs svn list with the given url and returns files listed as a list"""
output = run.capture_output(cmdexpand("svn list $url", **locals()))
@@ -60,8 +63,11 @@
output = run.capture_output(cmdexpand("svn info $svn_working_copy",
**locals()),
env=env)
- return int(extract_value_for_key(output.splitlines(),
- "Last Changed Rev:"))
+ str_rev = extract_value_for_key(output.splitlines(), "Last Changed Rev:")
+ if str_rev is None:
+ raise SubversionError("Cannot determine last changed revision for %r"
+ % svn_working_copy)
+ return int(str_rev)
class SvnRepository(object):
More information about the Treepkg-commits
mailing list