Mercurial > public > mercurial-scm > hg
diff mercurial/context.py @ 29939:80be4436e4cc
manifest: adds manifestctx.readfast
This adds a copy of manifest.readfast to manifestctx.readfast and adds a
consumer of it. It currently looks like duplicate code, but a future patch
causes these functions to diverge as tree concepts are added to the tree
version.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 13 Sep 2016 16:26:30 -0700 |
parents | a059b17352ef |
children | ff17dff99295 |
line wrap: on
line diff
--- a/mercurial/context.py Tue Sep 13 16:25:21 2016 -0700 +++ b/mercurial/context.py Tue Sep 13 16:26:30 2016 -0700 @@ -824,7 +824,7 @@ """ repo = self._repo cl = repo.unfiltered().changelog - ma = repo.manifest + mfl = repo.manifestlog # fetch the linkrev fr = filelog.rev(fnode) lkr = filelog.linkrev(fr) @@ -849,7 +849,7 @@ if path in ac[3]: # checking the 'files' field. # The file has been touched, check if the content is # similar to the one we search for. - if fnode == ma.readfast(ac[0]).get(path): + if fnode == mfl[ac[0]].readfast().get(path): return a # In theory, we should never get out of that loop without a result. # But if manifest uses a buggy file revision (not children of the