raise util.Abort again if specified revision is not an integer.
authorThomas Arendsen Hein <thomas@intevation.de>
Tue, 07 Aug 2007 12:24:25 +0200
changeset 5145 0751c25ea0c0
parent 5144 07735e2d24cb
child 5146 7106f4899aa0
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.
hgext/convert/subversion.py
--- 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: