Mercurial > hg
comparison mercurial/manifest.py @ 24925:d9832a12a06e
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.
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 28 Apr 2015 12:31:30 -0400 |
parents | 055b3cbe6c57 |
children | 48583a1e44f3 |
comparison
equal
deleted
inserted
replaced
24923:e5f166961123 | 24925:d9832a12a06e |
---|---|
791 r = self.rev(node) | 791 r = self.rev(node) |
792 d = mdiff.patchtext(self.revdiff(self.deltaparent(r), r)) | 792 d = mdiff.patchtext(self.revdiff(self.deltaparent(r), r)) |
793 return self._newmanifest(d) | 793 return self._newmanifest(d) |
794 | 794 |
795 def readfast(self, node): | 795 def readfast(self, node): |
796 '''use the faster of readdelta or read''' | 796 '''use the faster of readdelta or read |
797 | |
798 This will return a manifest which is either only the files | |
799 added/modified relative to p1, or all files in the | |
800 manifest. Which one is returned depends on the codepath used | |
801 to retrieve the data. | |
802 ''' | |
797 r = self.rev(node) | 803 r = self.rev(node) |
798 deltaparent = self.deltaparent(r) | 804 deltaparent = self.deltaparent(r) |
799 if deltaparent != revlog.nullrev and deltaparent in self.parentrevs(r): | 805 if deltaparent != revlog.nullrev and deltaparent in self.parentrevs(r): |
800 return self.readdelta(node) | 806 return self.readdelta(node) |
801 return self.read(node) | 807 return self.read(node) |