changeset 17053:0e4171fdb9d4

convert: check for failed svn import in debugsvnlog and abort cleanly 'hg debugsvnlog' failed with a crash when using the uninitialized transport in get_log_child if the import of the svn libraries had failed. 'convert' should never get as far as launching 'hg debugsvnlog' if the svn libraries are missing, but by launching a subprocess there is risk that the environment is mangled so the second import fails. It is in principle also possible to launch the command manually.
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 29 Jun 2012 01:51:48 +0200
parents 1bd18c415eec
children 125ff5654b72
files hgext/convert/subversion.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Thu Jun 28 03:41:37 2012 +0200
+++ b/hgext/convert/subversion.py	Fri Jun 29 01:51:48 2012 +0200
@@ -120,6 +120,10 @@
     """Fetch SVN log in a subprocess and channel them back to parent to
     avoid memory collection issues.
     """
+    if svn is None:
+        raise util.Abort(_('debugsvnlog could not load Subversion python '
+                           'bindings'))
+
     util.setbinary(sys.stdin)
     util.setbinary(sys.stdout)
     args = decodeargs(sys.stdin.read())