Mercurial > hg-stable
diff mercurial/discovery.py @ 29815:7b9157aa752f
outgoing: pass a repo object to the constructor
We are to introduce more code constructing such object in the code base. It will
be more convenient to pass a repository object, all current users already
operate at the repository level anyway. More changes to the contructor argument
are coming in later changeset.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 09 Aug 2016 15:26:53 +0200 |
parents | 5684bc429e6a |
children | f09d0004481c |
line wrap: on
line diff
--- a/mercurial/discovery.py Tue Aug 16 08:21:16 2016 +0000 +++ b/mercurial/discovery.py Tue Aug 09 15:26:53 2016 +0200 @@ -76,10 +76,10 @@ 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 @@ 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 @@ 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: