Show More
@@ -65,6 +65,27 b' class filelog(revlog):' | |||||
65 | return (m["copy"], bin(m["copyrev"])) |
|
65 | return (m["copy"], bin(m["copyrev"])) | |
66 | return False |
|
66 | return False | |
67 |
|
67 | |||
|
68 | def cmp(self, node, text): | |||
|
69 | """compare text with a given file revision""" | |||
|
70 | ||||
|
71 | # for renames, we have to go the slow way | |||
|
72 | if self.renamed(node): | |||
|
73 | t2 = self.read(node) | |||
|
74 | return t2 == text | |||
|
75 | ||||
|
76 | p1, p2 = self.parents(node) | |||
|
77 | h = hash(text, p1, p2) | |||
|
78 | ||||
|
79 | return h != node | |||
|
80 | ||||
|
81 | def makenode(self, node, text): | |||
|
82 | """calculate a file nodeid for text, descended or possibly | |||
|
83 | unchanged from node""" | |||
|
84 | ||||
|
85 | if self.cmp(node, text): | |||
|
86 | return hash(text, node, nullid) | |||
|
87 | return node | |||
|
88 | ||||
68 | def annotate(self, node): |
|
89 | def annotate(self, node): | |
69 |
|
90 | |||
70 | def decorate(text, rev): |
|
91 | def decorate(text, rev): |
@@ -668,8 +668,7 b' class localrepository(repo.repository):' | |||||
668 |
|
668 | |||
669 | def fcmp(fn, mf): |
|
669 | def fcmp(fn, mf): | |
670 | t1 = self.wread(fn) |
|
670 | t1 = self.wread(fn) | |
671 |
|
|
671 | return self.file(fn).cmp(mf.get(fn, nullid), t1) | |
672 | return cmp(t1, t2) |
|
|||
673 |
|
672 | |||
674 | def mfmatches(node): |
|
673 | def mfmatches(node): | |
675 | change = self.changelog.read(node) |
|
674 | change = self.changelog.read(node) |
General Comments 0
You need to be logged in to leave comments.
Login now