comparison mercurial/localrepo.py @ 16866:91f3ac205816

revlog: ancestors(*revs) becomes ancestors(revs) (API) Accepting a variable number of arguments as the old API did is deeply ugly, particularly as it means the API can't be extended with new arguments. Partly as a result, we have at least three different implementations of the same ancestors algorithm (!?). Most callers were forced to call ancestors(*somelist), adding to both inefficiency and ugliness.
author Bryan O'Sullivan <bryano@fb.com>
date Fri, 01 Jun 2012 12:37:18 -0700
parents 357e6bcfb619
children a1eb17bed550
comparison
equal deleted inserted replaced
16865:a6543fdcf869 16866:91f3ac205816
1789 cl = self.changelog 1789 cl = self.changelog
1790 if not bases: 1790 if not bases:
1791 bases = [nullid] 1791 bases = [nullid]
1792 csets, bases, heads = cl.nodesbetween(bases, heads) 1792 csets, bases, heads = cl.nodesbetween(bases, heads)
1793 # We assume that all ancestors of bases are known 1793 # We assume that all ancestors of bases are known
1794 common = set(cl.ancestors(*[cl.rev(n) for n in bases])) 1794 common = set(cl.ancestors([cl.rev(n) for n in bases]))
1795 return self._changegroupsubset(common, csets, heads, source) 1795 return self._changegroupsubset(common, csets, heads, source)
1796 1796
1797 def getlocalbundle(self, source, outgoing): 1797 def getlocalbundle(self, source, outgoing):
1798 """Like getbundle, but taking a discovery.outgoing as an argument. 1798 """Like getbundle, but taking a discovery.outgoing as an argument.
1799 1799