Mercurial > hg-stable
comparison mercurial/revlog.py @ 40011:f5d819d84461
storageutil: pass nodes into emitrevisions()
The main emitrevisions() uses nodes. So it makes sense to use
nodes for the helper API.
Not bothering with API since this function was introduced a few
commits ago.
Differential Revision: https://phab.mercurial-scm.org/D4805
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 28 Sep 2018 16:34:53 -0700 |
parents | 842ffcf1d42f |
children | 55db747a21ad |
comparison
equal
deleted
inserted
replaced
40010:631c6f5058b9 | 40011:f5d819d84461 |
---|---|
2190 nodesorder) | 2190 nodesorder) |
2191 | 2191 |
2192 if nodesorder is None and not self._generaldelta: | 2192 if nodesorder is None and not self._generaldelta: |
2193 nodesorder = 'storage' | 2193 nodesorder = 'storage' |
2194 | 2194 |
2195 frev = self.rev | |
2196 | |
2197 if nodesorder == 'nodes': | |
2198 revs = [frev(n) for n in nodes] | |
2199 elif nodesorder == 'storage': | |
2200 revs = sorted(frev(n) for n in nodes) | |
2201 else: | |
2202 assert self._generaldelta | |
2203 revs = set(frev(n) for n in nodes) | |
2204 revs = dagop.linearize(revs, self.parentrevs) | |
2205 | |
2206 return storageutil.emitrevisions( | 2195 return storageutil.emitrevisions( |
2207 self, revs, revlogrevisiondelta, | 2196 self, nodes, nodesorder, revlogrevisiondelta, |
2208 deltaparentfn=self.deltaparent, | 2197 deltaparentfn=self.deltaparent, |
2209 candeltafn=self.candelta, | 2198 candeltafn=self.candelta, |
2210 rawsizefn=self.rawsize, | 2199 rawsizefn=self.rawsize, |
2211 revdifffn=self.revdiff, | 2200 revdifffn=self.revdiff, |
2212 flagsfn=self.flags, | 2201 flagsfn=self.flags, |