diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -985,7 +985,7 @@ def computeoutgoing(repo, heads, common) common = [nullid] if not heads: heads = cl.heads() - return discovery.outgoing(cl, common, heads) + return discovery.outgoing(repo, common, heads) def getchangegroup(repo, source, heads=None, common=None, bundlecaps=None, version='01'): diff --git a/mercurial/discovery.py b/mercurial/discovery.py --- a/mercurial/discovery.py +++ b/mercurial/discovery.py @@ -76,10 +76,10 @@ class outgoing(object): The sets are computed on demand from the heads, unless provided upfront by discovery.''' - def __init__(self, revlog, commonheads, missingheads): + def __init__(self, repo, commonheads, missingheads): self.commonheads = commonheads self.missingheads = missingheads - self._revlog = revlog + self._revlog = repo.changelog self._common = None self._missing = None self.excluded = [] @@ -120,7 +120,7 @@ def outgoingbetween(repo, roots, heads): csets, roots, heads = cl.nodesbetween(roots, heads) included = set(csets) discbases = [n for n in discbases if n not in included] - return outgoing(cl, discbases, heads) + return outgoing(repo, discbases, heads) def findcommonoutgoing(repo, other, onlyheads=None, force=False, commoninc=None, portable=False): @@ -137,7 +137,7 @@ def findcommonoutgoing(repo, other, only If portable is given, compute more conservative common and missingheads, to make bundles created from the instance more portable.''' # declare an empty outgoing object to be filled later - og = outgoing(repo.changelog, None, None) + og = outgoing(repo, None, None) # get common set if not provided if commoninc is None: diff --git a/tests/test-bundle2-format.t b/tests/test-bundle2-format.t --- a/tests/test-bundle2-format.t +++ b/tests/test-bundle2-format.t @@ -112,7 +112,7 @@ Create an extension to test bundle2 API > bundled = repo.revs('%ld::%ld', revs, revs) > headmissing = [c.node() for c in repo.set('heads(%ld)', revs)] > headcommon = [c.node() for c in repo.set('parents(%ld) - %ld', revs, revs)] - > outgoing = discovery.outgoing(repo.changelog, headcommon, headmissing) + > outgoing = discovery.outgoing(repo, headcommon, headmissing) > cg = changegroup.getlocalchangegroup(repo, 'test:bundle2', outgoing, None) > bundler.newpart('changegroup', data=cg.getchunks(), > mandatory=False)