comparison mercurial/filelog.py @ 11540:2370e270a29a stable

filelog: test behaviour for data starting with "\1\n" Because "\1\n" is a separator for metadata, data starting with "\1\n" is handled specifically. It was not tested. size() call return incorrect data if original data had been "\1\n-escaped". There's no obvious way to fix it for now, just flag the error in the code and add an "expected failure" kind of test.
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Mon, 05 Jul 2010 18:43:46 +0900
parents a463e3c50212
children ab9fa7a85dd9
comparison
equal deleted inserted replaced
11539:a463e3c50212 11540:2370e270a29a
51 # for revisions with renames, we have to go the slow way 51 # for revisions with renames, we have to go the slow way
52 node = self.node(rev) 52 node = self.node(rev)
53 if self.renamed(node): 53 if self.renamed(node):
54 return len(self.read(node)) 54 return len(self.read(node))
55 55
56 # XXX if self.read(node).startswith("\1\n"), this returns (size+4)
56 return revlog.revlog.size(self, rev) 57 return revlog.revlog.size(self, rev)
57 58
58 def cmp(self, node, text): 59 def cmp(self, node, text):
59 """compare text with a given file revision 60 """compare text with a given file revision
60 61