Show More
@@ -824,7 +824,7 b' class basefilectx(object):' | |||
|
824 | 824 | """ |
|
825 | 825 | repo = self._repo |
|
826 | 826 | cl = repo.unfiltered().changelog |
|
827 |
m |
|
|
827 | mfl = repo.manifestlog | |
|
828 | 828 | # fetch the linkrev |
|
829 | 829 | fr = filelog.rev(fnode) |
|
830 | 830 | lkr = filelog.linkrev(fr) |
@@ -849,7 +849,7 b' class basefilectx(object):' | |||
|
849 | 849 | if path in ac[3]: # checking the 'files' field. |
|
850 | 850 | # The file has been touched, check if the content is |
|
851 | 851 | # similar to the one we search for. |
|
852 |
if fnode == m |
|
|
852 | if fnode == mfl[ac[0]].readfast().get(path): | |
|
853 | 853 | return a |
|
854 | 854 | # In theory, we should never get out of that loop without a result. |
|
855 | 855 | # But if manifest uses a buggy file revision (not children of the |
@@ -993,6 +993,14 b' class manifestctx(object):' | |||
|
993 | 993 | self._data = manifestdict(text) |
|
994 | 994 | return self._data |
|
995 | 995 | |
|
996 | def readfast(self): | |
|
997 | rl = self._revlog | |
|
998 | r = rl.rev(self._node) | |
|
999 | deltaparent = rl.deltaparent(r) | |
|
1000 | if deltaparent != revlog.nullrev and deltaparent in rl.parentrevs(r): | |
|
1001 | return self.readdelta() | |
|
1002 | return self.read() | |
|
1003 | ||
|
996 | 1004 | def readdelta(self): |
|
997 | 1005 | revlog = self._revlog |
|
998 | 1006 | if revlog._usemanifestv2: |
@@ -1066,6 +1074,14 b' class treemanifestctx(object):' | |||
|
1066 | 1074 | md.setflag(f, fl1) |
|
1067 | 1075 | return md |
|
1068 | 1076 | |
|
1077 | def readfast(self): | |
|
1078 | rl = self._revlog | |
|
1079 | r = rl.rev(self._node) | |
|
1080 | deltaparent = rl.deltaparent(r) | |
|
1081 | if deltaparent != revlog.nullrev and deltaparent in rl.parentrevs(r): | |
|
1082 | return self.readdelta() | |
|
1083 | return self.read() | |
|
1084 | ||
|
1069 | 1085 | class manifest(manifestrevlog): |
|
1070 | 1086 | def __init__(self, opener, dir='', dirlogcache=None): |
|
1071 | 1087 | '''The 'dir' and 'dirlogcache' arguments are for internal use by |
@@ -1149,20 +1165,6 b' class manifest(manifestrevlog):' | |||
|
1149 | 1165 | d = mdiff.patchtext(self.revdiff(self.deltaparent(r), r)) |
|
1150 | 1166 | return manifestdict(d) |
|
1151 | 1167 | |
|
1152 | def readfast(self, node): | |
|
1153 | '''use the faster of readdelta or read | |
|
1154 | ||
|
1155 | This will return a manifest which is either only the files | |
|
1156 | added/modified relative to p1, or all files in the | |
|
1157 | manifest. Which one is returned depends on the codepath used | |
|
1158 | to retrieve the data. | |
|
1159 | ''' | |
|
1160 | r = self.rev(node) | |
|
1161 | deltaparent = self.deltaparent(r) | |
|
1162 | if deltaparent != revlog.nullrev and deltaparent in self.parentrevs(r): | |
|
1163 | return self.readdelta(node) | |
|
1164 | return self.read(node) | |
|
1165 | ||
|
1166 | 1168 | def readshallowfast(self, node): |
|
1167 | 1169 | '''like readfast(), but calls readshallowdelta() instead of readdelta() |
|
1168 | 1170 | ''' |
General Comments 0
You need to be logged in to leave comments.
Login now