mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
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
This commit is contained in:
parent
2fc5d7ef51
commit
f3ededa444
@ -106,11 +106,11 @@ def get_log_child(fp, url, paths, start, end, limit=0, discover_changed_paths=Tr
|
||||
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 @@ class logstream(object):
|
||||
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):
|
||||
|
Loading…
Reference in New Issue
Block a user