changeset 15758:634404392449 stable 2.0.2

merge with i18n
author Matt Mackall <mpm@selenic.com>
date Sun, 01 Jan 2012 13:37:30 -0600
parents 03d04296cfab (diff) f21de8d2c724 (current diff)
children 6568a8649ed9 10dc013bb0fd
files
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Sat Dec 31 15:23:05 2011 +0900
+++ b/hgext/convert/subversion.py	Sun Jan 01 13:37:30 2012 -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):
--- a/hgext/fetch.py	Sat Dec 31 15:23:05 2011 +0900
+++ b/hgext/fetch.py	Sun Jan 01 13:37:30 2012 -0600
@@ -83,7 +83,7 @@
         # 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 @@
                       (len(newheads) - 1))
             return 1
 
+        if not newheads:
+            return 0
+
         # Otherwise, let's merge.
         err = False
         if newheads: