Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 1457:518da3c3b6ce
This implements the nodesbetween method, and it removes the newer method
and replaces it with calls to nodesbetween.
nodesbetween calculates all the changesets needed to have a complete
revision graph between a given set of base nodes and a given set of
head nodes.
author | Eric Hopper <hopper@omnifarious.org> |
---|---|
date | Fri, 07 Oct 2005 10:48:27 -0700 |
parents | d729850d52fa |
children | 1033892bbb87 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Wed Oct 05 19:27:35 2005 -0700 +++ b/mercurial/localrepo.py Fri Oct 07 10:48:27 2005 -0700 @@ -700,32 +700,6 @@ return r - def newer(self, nodes): - m = {} - nl = [] - pm = {} - cl = self.changelog - t = l = cl.count() - - # find the lowest numbered node - for n in nodes: - l = min(l, cl.rev(n)) - m[n] = 1 - - for i in xrange(l, t): - n = cl.node(i) - if n in m: # explicitly listed - pm[n] = 1 - nl.append(n) - continue - for p in cl.parents(n): - if p in pm: # parent listed - pm[n] = 1 - nl.append(n) - break - - return nl - def findincoming(self, remote, base=None, heads=None): m = self.changelog.nodemap search = [] @@ -922,7 +896,7 @@ genread = util.chunkbuffer def gengroup(): - nodes = self.newer(basenodes) + nodes = self.changelog.nodesbetween(basenodes)[0] # construct the link map linkmap = {}