changeset 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 4374d819ccd5
files mercurial/changegroup.py
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changegroup.py	Wed Dec 02 14:32:17 2015 -0500
+++ b/mercurial/changegroup.py	Thu Dec 03 10:56:05 2015 -0500
@@ -653,6 +653,18 @@
         # revisions.
         # Returns the linkrev node (collected in lookupcl).
         def lookupmflinknode(x):
+            """Callback for looking up the linknode for manifests.
+
+            Returns the linkrev node for the specified manifest.
+
+            SIDE EFFECT:
+
+              fclnodes gets populated with the list of relevant
+              file nodes if we're not using fastpathlinkrev.
+
+            Note that this means you can't trust fclnodes until
+            after manifests have been sent to the client.
+            """
             clnode = mfs[x]
             if not fastpathlinkrev:
                 mdata = ml.readfast(x)