[PATCH in-crew] manifest: document return type of readfast()
Augie Fackler
raf at durin42.com
Tue May 5 09:55:40 CDT 2015
Martin and I (I think) wrote this while I was in CA last week, and
since it's just a docstring cleanup I've pushed it to crew, and am
copying the list for completeness.
On Tue, May 5, 2015 at 10:53 AM, Augie Fackler <raf at durin42.com> wrote:
> # HG changeset patch
> # User Augie Fackler <augie at google.com>
> # Date 1430238690 14400
> # Tue Apr 28 12:31:30 2015 -0400
> # Node ID a9bca07c5df4834db6f62921ffcad3d88c4d1572
> # Parent e5b507efb36e2b9ad8edb1a38459d26c934d74dd
> 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.
>
> diff --git a/mercurial/manifest.py b/mercurial/manifest.py
> --- a/mercurial/manifest.py
> +++ b/mercurial/manifest.py
> @@ -793,7 +793,13 @@ class manifest(revlog.revlog):
> 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):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list