comparison mercurial/manifest.py @ 1451:54e4b187f69c

Remove old manifest diff code, it's now buggy
author Matt Mackall <mpm@selenic.com>
date Tue, 25 Oct 2005 22:15:44 -0700
parents 9d2c2e6b32b5
children 80a3d6a0af71
comparison
equal deleted inserted replaced
1450:199bb2b4ed4a 1451:54e4b187f69c
36 def readflags(self, node): 36 def readflags(self, node):
37 if node == nullid: return {} # don't upset local cache 37 if node == nullid: return {} # don't upset local cache
38 if not self.mapcache or self.mapcache[0] != node: 38 if not self.mapcache or self.mapcache[0] != node:
39 self.read(node) 39 self.read(node)
40 return self.mapcache[2] 40 return self.mapcache[2]
41
42 def diff(self, a, b):
43 # this is sneaky, as we're not actually using a and b
44 if self.listcache and self.addlist and self.listcache[0] == a:
45 d = mdiff.diff(self.listcache[1], self.addlist, 1)
46 if mdiff.patch(a, d) != b:
47 raise AssertionError(_("sortdiff failed!"))
48 return d
49 else:
50 return mdiff.textdiff(a, b)
51 41
52 def add(self, map, flags, transaction, link, p1=None, p2=None, 42 def add(self, map, flags, transaction, link, p1=None, p2=None,
53 changed=None): 43 changed=None):
54 # directly generate the mdiff delta from the data collected during 44 # directly generate the mdiff delta from the data collected during
55 # the bisect loop below 45 # the bisect loop below