Show More
@@ -80,8 +80,8 b' class manifest(revlog):' | |||||
80 | return self.mapcache[1] |
|
80 | return self.mapcache[1] | |
81 | text = self.revision(node) |
|
81 | text = self.revision(node) | |
82 | map = {} |
|
82 | map = {} | |
83 | self.listcache = text.splitlines(1) |
|
83 | self.listcache = (text, text.splitlines(1)) | |
84 | for l in self.listcache: |
|
84 | for l in self.listcache[1]: | |
85 | (f, n) = l.split('\0') |
|
85 | (f, n) = l.split('\0') | |
86 | map[f] = bin(n[:40]) |
|
86 | map[f] = bin(n[:40]) | |
87 | self.mapcache = (node, map) |
|
87 | self.mapcache = (node, map) | |
@@ -89,8 +89,8 b' class manifest(revlog):' | |||||
89 |
|
89 | |||
90 | def diff(self, a, b): |
|
90 | def diff(self, a, b): | |
91 | # this is sneaky, as we're not actually using a and b |
|
91 | # this is sneaky, as we're not actually using a and b | |
92 | if self.listcache: |
|
92 | if self.listcache and len(self.listcache[0]) == len(a): | |
93 | return mdiff.diff(self.listcache, self.addlist, 1) |
|
93 | return mdiff.diff(self.listcache[1], self.addlist, 1) | |
94 | else: |
|
94 | else: | |
95 | return mdiff.diff(a, b) |
|
95 | return mdiff.diff(a, b) | |
96 |
|
96 | |||
@@ -103,7 +103,7 b' class manifest(revlog):' | |||||
103 |
|
103 | |||
104 | n = self.addrevision(text, transaction, link, p1, p2) |
|
104 | n = self.addrevision(text, transaction, link, p1, p2) | |
105 | self.mapcache = (n, map) |
|
105 | self.mapcache = (n, map) | |
106 | self.listcache = self.addlist |
|
106 | self.listcache = (text, self.addlist) | |
107 |
|
107 | |||
108 | return n |
|
108 | return n | |
109 |
|
109 | |||
@@ -403,7 +403,6 b' class repository:' | |||||
403 | if co == cn: cn = -1 |
|
403 | if co == cn: cn = -1 | |
404 |
|
404 | |||
405 | edittext = "\n"+"".join(["HG: changed %s\n" % f for f in new]) |
|
405 | edittext = "\n"+"".join(["HG: changed %s\n" % f for f in new]) | |
406 | edittext += "".join(["HG: removed %s\n" % f for f in remove]) |
|
|||
407 | edittext = self.ui.edit(edittext) |
|
406 | edittext = self.ui.edit(edittext) | |
408 | n = self.changelog.add(node, new, edittext, tr, co, cn) |
|
407 | n = self.changelog.add(node, new, edittext, tr, co, cn) | |
409 |
|
408 | |||
@@ -446,6 +445,7 b' class repository:' | |||||
446 | new.sort() |
|
445 | new.sort() | |
447 |
|
446 | |||
448 | edittext = text + "\n"+"".join(["HG: changed %s\n" % f for f in new]) |
|
447 | edittext = text + "\n"+"".join(["HG: changed %s\n" % f for f in new]) | |
|
448 | edittext += "".join(["HG: removed %s\n" % f for f in remove]) | |||
449 | edittext = self.ui.edit(edittext) |
|
449 | edittext = self.ui.edit(edittext) | |
450 |
|
450 | |||
451 | n = self.changelog.add(mnode, new, edittext, tr) |
|
451 | n = self.changelog.add(mnode, new, edittext, tr) |
General Comments 0
You need to be logged in to leave comments.
Login now