Show More
@@ -64,7 +64,7 b' class filelog(revlog.revlog):' | |||
|
64 | 64 | node = self.node(rev) |
|
65 | 65 | if self.renamed(node): |
|
66 | 66 | return len(self.read(node)) |
|
67 |
if self. |
|
|
67 | if self.iscensored(rev): | |
|
68 | 68 | return 0 |
|
69 | 69 | |
|
70 | 70 | # XXX if self.read(node).startswith("\1\n"), this returns (size+4) |
@@ -85,7 +85,7 b' class filelog(revlog.revlog):' | |||
|
85 | 85 | return False |
|
86 | 86 | |
|
87 | 87 | # censored files compare against the empty file |
|
88 |
if self. |
|
|
88 | if self.iscensored(self.rev(node)): | |
|
89 | 89 | return text != '' |
|
90 | 90 | |
|
91 | 91 | # renaming a file produces a different hash, even if the data |
@@ -104,6 +104,6 b' class filelog(revlog.revlog):' | |||
|
104 | 104 | raise error.CensoredNodeError(self.indexfile, node) |
|
105 | 105 | raise |
|
106 | 106 | |
|
107 |
def |
|
|
107 | def iscensored(self, rev): | |
|
108 | 108 | """Check if a file revision is censored.""" |
|
109 | 109 | return self.flags(rev) & revlog.REVIDX_ISCENSORED |
@@ -1419,6 +1419,10 b' class revlog(object):' | |||
|
1419 | 1419 | |
|
1420 | 1420 | return content |
|
1421 | 1421 | |
|
1422 | def iscensored(self, rev): | |
|
1423 | """Check if a file revision is censored.""" | |
|
1424 | return False | |
|
1425 | ||
|
1422 | 1426 | def getstrippoint(self, minlink): |
|
1423 | 1427 | """find the minimum rev that must be stripped to strip the linkrev |
|
1424 | 1428 |
@@ -160,6 +160,12 b' class unionfilelog(unionrevlog, filelog.' | |||
|
160 | 160 | def baserevdiff(self, rev1, rev2): |
|
161 | 161 | return filelog.filelog.revdiff(self, rev1, rev2) |
|
162 | 162 | |
|
163 | def iscensored(self, rev): | |
|
164 | """Check if a revision is censored.""" | |
|
165 | if rev <= self.repotiprev: | |
|
166 | return filelog.filelog.iscensored(self, rev) | |
|
167 | return self.revlog2.iscensored(rev) | |
|
168 | ||
|
163 | 169 | class unionpeer(localrepo.localpeer): |
|
164 | 170 | def canpush(self): |
|
165 | 171 | return False |
General Comments 0
You need to be logged in to leave comments.
Login now