Show More
@@ -332,7 +332,7 b' class cg1unpacker(object):' | |||
|
332 | 332 | for cset in xrange(clstart, clend): |
|
333 | 333 | mfnode = repo.changelog.read( |
|
334 | 334 | repo.changelog.node(cset))[0] |
|
335 |
mfest = repo.manifest.readdelta( |
|
|
335 | mfest = repo.manifestlog[mfnode].readdelta() | |
|
336 | 336 | # store file nodes we must see |
|
337 | 337 | for f, n in mfest.iteritems(): |
|
338 | 338 | needfiles.setdefault(f, set()).add(n) |
@@ -532,7 +532,8 b' class changectx(basectx):' | |||
|
532 | 532 | |
|
533 | 533 | @propertycache |
|
534 | 534 | def _manifestdelta(self): |
|
535 |
|
|
|
535 | mfnode = self._changeset.manifest | |
|
536 | return self._repo.manifestlog[mfnode].readdelta() | |
|
536 | 537 | |
|
537 | 538 | @propertycache |
|
538 | 539 | def _parents(self): |
@@ -993,6 +993,25 b' class manifestctx(object):' | |||
|
993 | 993 | self._data = manifestdict(text) |
|
994 | 994 | return self._data |
|
995 | 995 | |
|
996 | def readdelta(self): | |
|
997 | revlog = self._revlog | |
|
998 | if revlog._usemanifestv2: | |
|
999 | # Need to perform a slow delta | |
|
1000 | r0 = revlog.deltaparent(revlog.rev(self._node)) | |
|
1001 | m0 = manifestctx(revlog, revlog.node(r0)).read() | |
|
1002 | m1 = self.read() | |
|
1003 | md = manifestdict() | |
|
1004 | for f, ((n0, fl0), (n1, fl1)) in m0.diff(m1).iteritems(): | |
|
1005 | if n1: | |
|
1006 | md[f] = n1 | |
|
1007 | if fl1: | |
|
1008 | md.setflag(f, fl1) | |
|
1009 | return md | |
|
1010 | ||
|
1011 | r = revlog.rev(self._node) | |
|
1012 | d = mdiff.patchtext(revlog.revdiff(revlog.deltaparent(r), r)) | |
|
1013 | return manifestdict(d) | |
|
1014 | ||
|
996 | 1015 | class treemanifestctx(object): |
|
997 | 1016 | def __init__(self, revlog, dir, node): |
|
998 | 1017 | revlog = revlog.dirlog(dir) |
@@ -1033,6 +1052,20 b' class treemanifestctx(object):' | |||
|
1033 | 1052 | def node(self): |
|
1034 | 1053 | return self._node |
|
1035 | 1054 | |
|
1055 | def readdelta(self): | |
|
1056 | # Need to perform a slow delta | |
|
1057 | revlog = self._revlog | |
|
1058 | r0 = revlog.deltaparent(revlog.rev(self._node)) | |
|
1059 | m0 = treemanifestctx(revlog, revlog.node(r0), dir=self._dir).read() | |
|
1060 | m1 = self.read() | |
|
1061 | md = treemanifest(dir=self._dir) | |
|
1062 | for f, ((n0, fl0), (n1, fl1)) in m0.diff(m1).iteritems(): | |
|
1063 | if n1: | |
|
1064 | md[f] = n1 | |
|
1065 | if fl1: | |
|
1066 | md.setflag(f, fl1) | |
|
1067 | return md | |
|
1068 | ||
|
1036 | 1069 | class manifest(manifestrevlog): |
|
1037 | 1070 | def __init__(self, opener, dir='', dirlogcache=None): |
|
1038 | 1071 | '''The 'dir' and 'dirlogcache' arguments are for internal use by |
General Comments 0
You need to be logged in to leave comments.
Login now