hgext/convert/subversion.py
branchstable
changeset 15750 03d04296cfab
parent 15599 c6be93a4c378
child 15751 742c766c8cea
equal deleted inserted replaced
15749:6b84cdcb05b9 15750:03d04296cfab
   104         t = transport.SvnRaTransport(url=url)
   104         t = transport.SvnRaTransport(url=url)
   105         svn.ra.get_log(t.ra, paths, start, end, limit,
   105         svn.ra.get_log(t.ra, paths, start, end, limit,
   106                        discover_changed_paths,
   106                        discover_changed_paths,
   107                        strict_node_history,
   107                        strict_node_history,
   108                        receiver)
   108                        receiver)
   109     except SubversionException, (inst, num):
       
   110         pickle.dump(num, fp, protocol)
       
   111     except IOError:
   109     except IOError:
   112         # Caller may interrupt the iteration
   110         # Caller may interrupt the iteration
   113         pickle.dump(None, fp, protocol)
   111         pickle.dump(None, fp, protocol)
       
   112     except Exception, inst:
       
   113         pickle.dump(str(inst), fp, protocol)
   114     else:
   114     else:
   115         pickle.dump(None, fp, protocol)
   115         pickle.dump(None, fp, protocol)
   116     fp.close()
   116     fp.close()
   117     # With large history, cleanup process goes crazy and suddenly
   117     # With large history, cleanup process goes crazy and suddenly
   118     # consumes *huge* amount of memory. The output file being closed,
   118     # consumes *huge* amount of memory. The output file being closed,
   143             try:
   143             try:
   144                 orig_paths, revnum, author, date, message = entry
   144                 orig_paths, revnum, author, date, message = entry
   145             except:
   145             except:
   146                 if entry is None:
   146                 if entry is None:
   147                     break
   147                     break
   148                 raise SubversionException("child raised exception", entry)
   148                 raise util.Abort(_("log stream exception '%s'") % entry)
   149             yield entry
   149             yield entry
   150 
   150 
   151     def close(self):
   151     def close(self):
   152         if self._stdout:
   152         if self._stdout:
   153             self._stdout.close()
   153             self._stdout.close()