Mercurial > public > mercurial-scm > hg
comparison mercurial/changegroup.py @ 27219:beb60a898dd0
changegroup: document manifest linkrev callback some more
Martin and I just got super-confused reading some code here, so I
think it's time for some more documentation.
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 03 Dec 2015 10:56:05 -0500 |
parents | de3335b4c8ef |
children | c08814b48ae5 |
comparison
equal
deleted
inserted
replaced
27218:de3335b4c8ef | 27219:beb60a898dd0 |
---|---|
651 fastpathlinkrev = fastpathlinkrev and not self._reorder | 651 fastpathlinkrev = fastpathlinkrev and not self._reorder |
652 # Callback for the manifest, used to collect linkrevs for filelog | 652 # Callback for the manifest, used to collect linkrevs for filelog |
653 # revisions. | 653 # revisions. |
654 # Returns the linkrev node (collected in lookupcl). | 654 # Returns the linkrev node (collected in lookupcl). |
655 def lookupmflinknode(x): | 655 def lookupmflinknode(x): |
656 """Callback for looking up the linknode for manifests. | |
657 | |
658 Returns the linkrev node for the specified manifest. | |
659 | |
660 SIDE EFFECT: | |
661 | |
662 fclnodes gets populated with the list of relevant | |
663 file nodes if we're not using fastpathlinkrev. | |
664 | |
665 Note that this means you can't trust fclnodes until | |
666 after manifests have been sent to the client. | |
667 """ | |
656 clnode = mfs[x] | 668 clnode = mfs[x] |
657 if not fastpathlinkrev: | 669 if not fastpathlinkrev: |
658 mdata = ml.readfast(x) | 670 mdata = ml.readfast(x) |
659 for f, n in mdata.iteritems(): | 671 for f, n in mdata.iteritems(): |
660 if f in changedfiles: | 672 if f in changedfiles: |