Mercurial > hg
comparison mercurial/changegroup.py @ 24896:9183cb6886ef
changegroup: removed unused 'source' parameter from prune()
The parameter has been unused since it was introduced in 6ea1f858efd9
(bundle: refactor changegroup prune to be its own function,
2013-05-30), and Durham says it is not used by his extension either.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 28 Apr 2015 13:40:00 -0700 |
parents | 90f2b9de30f2 |
children | 5c35a6040352 |
comparison
equal
deleted
inserted
replaced
24895:7e67ddd08a2e | 24896:9183cb6886ef |
---|---|
348 yield c | 348 yield c |
349 | 349 |
350 yield self.close() | 350 yield self.close() |
351 | 351 |
352 # filter any nodes that claim to be part of the known set | 352 # filter any nodes that claim to be part of the known set |
353 def prune(self, revlog, missing, commonrevs, source): | 353 def prune(self, revlog, missing, commonrevs): |
354 rr, rl = revlog.rev, revlog.linkrev | 354 rr, rl = revlog.rev, revlog.linkrev |
355 return [n for n in missing if rl(rr(n)) not in commonrevs] | 355 return [n for n in missing if rl(rr(n)) not in commonrevs] |
356 | 356 |
357 def generate(self, commonrevs, clnodes, fastpathlinkrev, source): | 357 def generate(self, commonrevs, clnodes, fastpathlinkrev, source): |
358 '''yield a sequence of changegroup chunks (strings)''' | 358 '''yield a sequence of changegroup chunks (strings)''' |
405 fclnode = fclnodes.setdefault(n, clnode) | 405 fclnode = fclnodes.setdefault(n, clnode) |
406 if clrevorder[clnode] < clrevorder[fclnode]: | 406 if clrevorder[clnode] < clrevorder[fclnode]: |
407 fclnodes[n] = clnode | 407 fclnodes[n] = clnode |
408 return clnode | 408 return clnode |
409 | 409 |
410 mfnodes = self.prune(mf, mfs, commonrevs, source) | 410 mfnodes = self.prune(mf, mfs, commonrevs) |
411 size = 0 | 411 size = 0 |
412 for chunk in self.group(mfnodes, mf, lookupmf, units=_('manifests'), | 412 for chunk in self.group(mfnodes, mf, lookupmf, units=_('manifests'), |
413 reorder=reorder): | 413 reorder=reorder): |
414 size += len(chunk) | 414 size += len(chunk) |
415 yield chunk | 415 yield chunk |
458 # Lookup for filenodes, we collected the linkrev nodes above in the | 458 # Lookup for filenodes, we collected the linkrev nodes above in the |
459 # fastpath case and with lookupmf in the slowpath case. | 459 # fastpath case and with lookupmf in the slowpath case. |
460 def lookupfilelog(x): | 460 def lookupfilelog(x): |
461 return linkrevnodes[x] | 461 return linkrevnodes[x] |
462 | 462 |
463 filenodes = self.prune(filerevlog, linkrevnodes, commonrevs, source) | 463 filenodes = self.prune(filerevlog, linkrevnodes, commonrevs) |
464 if filenodes: | 464 if filenodes: |
465 progress(msgbundling, i + 1, item=fname, unit=msgfiles, | 465 progress(msgbundling, i + 1, item=fname, unit=msgfiles, |
466 total=total) | 466 total=total) |
467 h = self.fileheader(fname) | 467 h = self.fileheader(fname) |
468 size = len(h) | 468 size = len(h) |