diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -106,11 +106,11 @@ def get_log_child(fp, url, paths, start, 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): diff --git a/hgext/fetch.py b/hgext/fetch.py --- a/hgext/fetch.py +++ b/hgext/fetch.py @@ -83,7 +83,7 @@ def fetch(ui, repo, source='default', ** # Is this a simple fast-forward along the current branch? newheads = repo.branchheads(branch) newchildren = repo.changelog.nodesbetween([parent], newheads)[2] - if len(newheads) == 1: + if len(newheads) == 1 and len(newchildren): if newchildren[0] != parent: return hg.clean(repo, newchildren[0]) else: @@ -102,6 +102,9 @@ def fetch(ui, repo, source='default', ** (len(newheads) - 1)) return 1 + if not newheads: + return 0 + # Otherwise, let's merge. err = False if newheads: