convert: improve exception reporting for SVN logstream stable
authorMatt Mackall <mpm@selenic.com>
Fri, 30 Dec 2011 15:47:58 -0600
branchstable
changeset 15750 03d04296cfab
parent 15749 6b84cdcb05b9
child 15751 742c766c8cea
child 15758 634404392449
convert: improve exception reporting for SVN logstream - catch all exceptions - pickle a stringified version of the exception - use a normal abort Hopefully this will result in less mysterious convert exceptions
hgext/convert/subversion.py
--- a/hgext/convert/subversion.py	Fri Dec 30 15:07:05 2011 -0600
+++ b/hgext/convert/subversion.py	Fri Dec 30 15:47:58 2011 -0600
@@ -106,11 +106,11 @@
                        discover_changed_paths,
                        strict_node_history,
                        receiver)
-    except SubversionException, (inst, num):
-        pickle.dump(num, fp, protocol)
     except IOError:
         # Caller may interrupt the iteration
         pickle.dump(None, fp, protocol)
+    except Exception, inst:
+        pickle.dump(str(inst), fp, protocol)
     else:
         pickle.dump(None, fp, protocol)
     fp.close()
@@ -145,7 +145,7 @@
             except:
                 if entry is None:
                     break
-                raise SubversionException("child raised exception", entry)
+                raise util.Abort(_("log stream exception '%s'") % entry)
             yield entry
 
     def close(self):