Commits

Brad Hall  committed adf4a08

Catch/abort on subversion exceptions in list_dir

Give the user an error message if they attempt to pull a non-existent SVN rev
instead of a backtrace

  • Participants
  • Parent commits 772280a

Comments (0)

Files changed (1)

File hgsubversion/wrappers.py

 
     layout = repo.ui.config('hgsubversion', 'layout', 'auto')
     if layout == 'auto':
-        rootlist = svn.list_dir('', revision=(stopat_rev or None))
+        try:
+            rootlist = svn.list_dir('', revision=(stopat_rev or None))
+        except svnwrap.SubversionException, e:
+            err = "%s (subversion error: %d)" % (e.args[0], e.args[1])
+            raise hgutil.Abort(err)
         if sum(map(lambda x: x in rootlist, ('branches', 'tags', 'trunk'))):
             layout = 'standard'
         else: