Mercurial > hgsubversion
changeset 1498:cf82df69b794
Merge default heads.
Cleaned up some comments in wrappers as a result of duplicate work. Sigh.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sun, 12 Feb 2017 16:35:08 -0500 |
parents | 0991df151799 (current diff) e0eda6f2c2f2 (diff) |
children | 60690af283e5 |
files | hgsubversion/wrappers.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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