changeset 5145:0751c25ea0c0

raise util.Abort again if specified revision is not an integer. This was changed to NoRepo in 462cc56d898f, because specifying non-integer revisions for e.g. the Mercurial backend caused Abort to be raised in the subversion importer. Now util.Abort is raised again, but the check is done after verifying if it really is a subversion repository.
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 07 Aug 2007 12:24:25 +0200
parents 07735e2d24cb
children 7106f4899aa0
files hgext/convert/subversion.py
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Tue Aug 07 12:10:56 2007 +0200
+++ b/hgext/convert/subversion.py	Tue Aug 07 12:24:25 2007 +0200
@@ -108,11 +108,6 @@
         self.lastrevs = {}
 
         latest = None
-        if rev:
-            try:
-                latest = int(rev)
-            except ValueError:
-                raise NoRepo('svn: revision %s is not an integer' % rev)
         try:
             # Support file://path@rev syntax. Useful e.g. to convert
             # deleted branches.
@@ -137,6 +132,12 @@
         except SubversionException, e:
             raise NoRepo("couldn't open SVN repo %s" % self.url)
 
+        if rev:
+            try:
+                latest = int(rev)
+            except ValueError:
+                raise util.Abort('svn: revision %s is not an integer' % rev)
+
         try:
             self.get_blacklist()
         except IOError, e: