changeset 845:8cf8ff0f52fe

outgoing: fix for hg change cd956049fc14
author Augie Fackler <durin42@gmail.com>
date Sat, 21 Jan 2012 20:05:52 -0600
parents 95d040755254
children 7ca3d1b08d67
files hgsubversion/wrappers.py
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -1,6 +1,7 @@
 from hgext import rebase as hgrebase
 
 from mercurial import cmdutil
+from mercurial import discovery
 from mercurial import patch
 from mercurial import hg
 from mercurial import util as hgutil
@@ -90,7 +91,13 @@ def findcommonoutgoing(repo, other, only
     meta = repo.svnmeta(svn.uuid, svn.subdir)
     parent = repo.parents()[0].node()
     hashes = meta.revmap.hashes()
-    return util.outgoing_common_and_heads(repo, hashes, parent)
+    common, heads = util.outgoing_common_and_heads(repo, hashes, parent)
+    outobj = getattr(discovery, 'outgoing', None)
+    if outobj is not None:
+        # Mercurial 2.1 and later
+        return outobj(repo.changelog, common, heads)
+    # Mercurial 2.0 and earlier
+    return common, heads
 
 
 def findoutgoing(repo, dest=None, heads=None, force=False):