diff hgext/convert/subversion.py @ 9587:d80a251baf9a

convert/svn: better error when hg cannot call itself (issue1838)
author Patrick Mezard <pmezard@gmail.com>
date Thu, 15 Oct 2009 23:15:30 +0200
parents e3ce0c30798b
children a981ddb16b80
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Thu Oct 15 23:15:30 2009 +0200
+++ b/hgext/convert/subversion.py	Thu Oct 15 23:15:30 2009 +0200
@@ -115,7 +115,11 @@
 
     def __iter__(self):
         while True:
-            entry = pickle.load(self._stdout)
+            try:
+                entry = pickle.load(self._stdout)
+            except EOFError:
+                raise util.Abort(_('Mercurial failed to run itself, check'
+                                   ' hg executable is in PATH'))
             try:
                 orig_paths, revnum, author, date, message = entry
             except: