diff util.py @ 221:ced45b753ba7

util: better error messages when finding svn parent of a revision.
author Augie Fackler <durin42@gmail.com>
date Sat, 28 Mar 2009 17:59:55 -0500
parents df4611050286
children 330f0b15d417
line wrap: on
line diff
--- a/util.py
+++ b/util.py
@@ -3,6 +3,7 @@ import shutil
 
 from mercurial import hg
 from mercurial import node
+from mercurial import util
 
 svn_subcommands = { }
 def register_subcommand(name):
@@ -94,7 +95,8 @@ def outgoing_revisions(ui, repo, hg_edit
            and sourcerev.node() != node.nullid):
         outgoing_rev_hashes.append(sourcerev.node())
         sourcerev = sourcerev.parents()
-        assert len(sourcerev) == 1
+        if len(sourcerev) != 1:
+            raise util.Abort("Sorry, can't find svn parent of a merge revision.")
         sourcerev = sourcerev[0]
     if sourcerev.node() != node.nullid:
         return outgoing_rev_hashes