# HG changeset patch # User Augie Fackler # Date 1486935308 18000 # Node ID cf82df69b794e98cfee3c3bf6bc1a7e35437de81 # Parent 0991df151799d0c6a4780e4e1b9a6d3e1ee6483f# Parent e0eda6f2c2f2e5e1af993c0f36c9f7352e9d34c3 Merge default heads. Cleaned up some comments in wrappers as a result of duplicate work. Sigh. diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py --- a/hgsubversion/wrappers.py +++ b/hgsubversion/wrappers.py @@ -21,6 +21,7 @@ from mercurial import repair from mercurial import revset from mercurial import scmutil +import inspect import layouts import replay import pushmod @@ -135,10 +136,12 @@ 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 + argspec = inspect.getargspec(outobj.__init__) + if 'repo' in argspec[0]: + # Starting from Mercurial 3.9.1 outgoing.__init__ accepts + # `repo` object instead of a `changelog` return outobj(repo, common, heads) - # Mercurial 2.1 and later + # Mercurial 2.1 through 3.9 return outobj(repo.changelog, common, heads) # Mercurial 2.0 and earlier return common, heads