764 if len(id) == 20 and id in self.nodemap: |
764 if len(id) == 20 and id in self.nodemap: |
765 return id |
765 return id |
766 |
766 |
767 raise RevlogError(_("No match found")) |
767 raise RevlogError(_("No match found")) |
768 |
768 |
|
769 def cmp(self, node, text): |
|
770 """compare text with a given file revision""" |
|
771 p1, p2 = self.parents(node) |
|
772 return hash(text, p1, p2) != node |
|
773 |
|
774 def makenode(self, node, text): |
|
775 """calculate a file nodeid for text, descended or possibly |
|
776 unchanged from node""" |
|
777 |
|
778 if self.cmp(node, text): |
|
779 return hash(text, node, nullid) |
|
780 return node |
|
781 |
769 def diff(self, a, b): |
782 def diff(self, a, b): |
770 """return a delta between two revisions""" |
783 """return a delta between two revisions""" |
771 return mdiff.textdiff(a, b) |
784 return mdiff.textdiff(a, b) |
772 |
785 |
773 def patches(self, t, pl): |
786 def patches(self, t, pl): |