Show More
@@ -2192,19 +2192,8 b' class revlog(object):' | |||||
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, |
|
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, |
@@ -17,6 +17,7 b' from ..node import (' | |||||
17 | nullrev, |
|
17 | nullrev, | |
18 | ) |
|
18 | ) | |
19 | from .. import ( |
|
19 | from .. import ( | |
|
20 | dagop, | |||
20 | error, |
|
21 | error, | |
21 | mdiff, |
|
22 | mdiff, | |
22 | pycompat, |
|
23 | pycompat, | |
@@ -264,8 +265,8 b' def resolvestripinfo(minlinkrev, tiprev,' | |||||
264 |
|
265 | |||
265 | return strippoint, brokenrevs |
|
266 | return strippoint, brokenrevs | |
266 |
|
267 | |||
267 |
def emitrevisions(store, |
|
268 | def emitrevisions(store, nodes, nodesorder, resultcls, deltaparentfn=None, | |
268 | rawsizefn=None, revdifffn=None, flagsfn=None, |
|
269 | candeltafn=None, rawsizefn=None, revdifffn=None, flagsfn=None, | |
269 | sendfulltext=False, |
|
270 | sendfulltext=False, | |
270 | revisiondata=False, assumehaveparentrevisions=False, |
|
271 | revisiondata=False, assumehaveparentrevisions=False, | |
271 | deltaprevious=False): |
|
272 | deltaprevious=False): | |
@@ -277,8 +278,8 b' def emitrevisions(store, revs, resultcls' | |||||
277 | ``store`` |
|
278 | ``store`` | |
278 | Object conforming to ``ifilestorage`` interface. |
|
279 | Object conforming to ``ifilestorage`` interface. | |
279 |
|
280 | |||
280 |
`` |
|
281 | ``nodes`` | |
281 |
List of |
|
282 | List of revision nodes whose data to emit. | |
282 |
|
283 | |||
283 | ``resultcls`` |
|
284 | ``resultcls`` | |
284 | A type implementing the ``irevisiondelta`` interface that will be |
|
285 | A type implementing the ``irevisiondelta`` interface that will be | |
@@ -322,6 +323,7 b' def emitrevisions(store, revs, resultcls' | |||||
322 | ``sendfulltext`` |
|
323 | ``sendfulltext`` | |
323 | Whether to send fulltext revisions instead of deltas, if allowed. |
|
324 | Whether to send fulltext revisions instead of deltas, if allowed. | |
324 |
|
325 | |||
|
326 | ``nodesorder`` | |||
325 | ``revisiondata`` |
|
327 | ``revisiondata`` | |
326 | ``assumehaveparentrevisions`` |
|
328 | ``assumehaveparentrevisions`` | |
327 | ``deltaprevious`` |
|
329 | ``deltaprevious`` | |
@@ -329,6 +331,15 b' def emitrevisions(store, revs, resultcls' | |||||
329 | """ |
|
331 | """ | |
330 |
|
332 | |||
331 | fnode = store.node |
|
333 | fnode = store.node | |
|
334 | frev = store.rev | |||
|
335 | ||||
|
336 | if nodesorder == 'nodes': | |||
|
337 | revs = [frev(n) for n in nodes] | |||
|
338 | elif nodesorder == 'storage': | |||
|
339 | revs = sorted(frev(n) for n in nodes) | |||
|
340 | else: | |||
|
341 | revs = set(frev(n) for n in nodes) | |||
|
342 | revs = dagop.linearize(revs, store.parentrevs) | |||
332 |
|
343 | |||
333 | prevrev = None |
|
344 | prevrev = None | |
334 |
|
345 |
General Comments 0
You need to be logged in to leave comments.
Login now