diff -r f5818ce4c2bd -r f7a2a246740c hgkw/keyword.py --- a/hgkw/keyword.py Sat Jan 06 14:35:24 2007 +0100 +++ b/hgkw/keyword.py Sun Jan 07 21:51:57 2007 +0100 @@ -246,7 +246,6 @@ self.hook("commit", node=hex(n), parent1=xp1, parent2=xp2) return n - class kwfilelog(filelog.filelog): def __init__(self, opener, path, repo, defversion=revlog.REVLOG_DEFAULT_VERSION): @@ -264,18 +263,11 @@ fileid=node, filelog=self), data) return data - def size(self, rev): - '''Overrides filelog's size() to use kwfilelog.read().''' - node = revlog.node(self, rev) - if super(kwfilelog, self).renamed(node): - return len(self.read(node)) - return revlog.size(self, rev) - def cmp(self, node, text): - '''Overrides filelog's cmp() to use kwfilelog.read().''' - if super(kwfilelog, self).renamed(node): - t2 = self.read(node) - return t2 != text + '''Removes keyword substitution for comparison.''' + if not util.binary(text): + text = re_kw.sub(r'$\1$', text) + return super(kwfilelog, self).cmp(node, text) filelog.filelog = kwfilelog repo.__class__ = kwrepo