Mercurial > hgsubversion
changeset 1494:051a517b473b stable 1.8.7
findcommonoutgoing: adapt to change to take a repo rather than changelog
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sun, 12 Feb 2017 15:16:51 -0500 |
parents | bac709b5ff6c |
children | 3f47dd9a6352 |
files | hgsubversion/wrappers.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/wrappers.py +++ b/hgsubversion/wrappers.py @@ -1,3 +1,6 @@ +import inspect +import os + from hgext import rebase as hgrebase from mercurial import cmdutil @@ -19,7 +22,6 @@ from mercurial import revset from mercurial import scmutil import layouts -import os import replay import pushmod import stupid as stupidmod @@ -133,6 +135,9 @@ def findcommonoutgoing(repo, other, only common, heads = util.outgoing_common_and_heads(repo, hashes, parent) outobj = getattr(discovery, 'outgoing', None) if outobj is not None: + if 'repo' in inspect.getargspec(outobj.__init__).args: + # Mercurial 4.0 and later + return outobj(repo, common, heads) # Mercurial 2.1 and later return outobj(repo.changelog, common, heads) # Mercurial 2.0 and earlier