convert/svn: better handling of hg recursive call failure stable
authorPatrick Mezard <pmezard@gmail.com>
Mon, 14 Dec 2009 22:09:49 +0100
branchstable
changeset 10071 661980567246
parent 10070 9d1195b2f00d
child 10072 c0237e23151b
child 10074 ad5ef62b5a98
convert/svn: better handling of hg recursive call failure
hgext/convert/subversion.py
--- a/hgext/convert/subversion.py	Mon Dec 14 21:21:34 2009 +0200
+++ b/hgext/convert/subversion.py	Mon Dec 14 22:09:49 2009 +0100
@@ -912,7 +912,11 @@
         cmd = '%s debugsvnlog' % util.shellquote(hgexe)
         stdin, stdout = util.popen2(cmd)
         stdin.write(arg)
-        stdin.close()
+        try:
+            stdin.close()
+        except IOError:
+            raise util.Abort(_('Mercurial failed to run itself, check'
+                               ' hg executable is in PATH'))
         return logstream(stdout)
 
 pre_revprop_change = '''#!/bin/sh