manifest: document return type of readfast()
authorAugie Fackler <augie@google.com>
Tue, 28 Apr 2015 12:31:30 -0400
changeset 24925 d9832a12a06e
parent 24923 e5f166961123
child 24926 3fe1e07f1a32
manifest: document return type of readfast() I keep having to ponder out what readfast() means, and it always surprises me. Document the return type in the docstring so that future readers won't have to puzzle this out again.
mercurial/manifest.py
--- a/mercurial/manifest.py	Sat Oct 11 01:17:40 2014 -0700
+++ b/mercurial/manifest.py	Tue Apr 28 12:31:30 2015 -0400
@@ -793,7 +793,13 @@
         return self._newmanifest(d)
 
     def readfast(self, node):
-        '''use the faster of readdelta or read'''
+        '''use the faster of readdelta or read
+
+        This will return a manifest which is either only the files
+        added/modified relative to p1, or all files in the
+        manifest. Which one is returned depends on the codepath used
+        to retrieve the data.
+        '''
         r = self.rev(node)
         deltaparent = self.deltaparent(r)
         if deltaparent != revlog.nullrev and deltaparent in self.parentrevs(r):