##// END OF EJS Templates
unionrepo: fix wrong rev being checked in iscensored (issue5024)
Sean Farley -
r27723:bf86e3e8 stable
parent child Browse files
Show More
@@ -182,7 +182,8 b' class unionfilelog(unionrevlog, filelog.'
182 """Check if a revision is censored."""
182 """Check if a revision is censored."""
183 if rev <= self.repotiprev:
183 if rev <= self.repotiprev:
184 return filelog.filelog.iscensored(self, rev)
184 return filelog.filelog.iscensored(self, rev)
185 return self.revlog2.iscensored(rev)
185 node = self.node(rev)
186 return self.revlog2.iscensored(self.revlog2.rev(node))
186
187
187 class unionpeer(localrepo.localpeer):
188 class unionpeer(localrepo.localpeer):
188 def canpush(self):
189 def canpush(self):
@@ -148,3 +148,22 b' union repos can be cloned ... and clones'
148 2:68c0685446a3 repo1-2
148 2:68c0685446a3 repo1-2
149 1:8a58db72e69d repo1-1
149 1:8a58db72e69d repo1-1
150 0:f093fec0529b repo1-0
150 0:f093fec0529b repo1-0
151
152 union repos should use the correct rev number (issue5024)
153
154 $ hg init a
155 $ cd a
156 $ echo a0 >> f
157 $ hg ci -Aqm a0
158 $ cd ..
159 $ hg init b
160 $ cd b
161 $ echo b0 >> f
162 $ hg ci -Aqm b0
163 $ echo b1 >> f
164 $ hg ci -qm b1
165 $ cd ..
166
167 "hg files -v" to call fctx.size() -> fctx.iscensored()
168 $ hg files -R union:b+a -r2 -v
169 3 b/f (glob)
General Comments 0
You need to be logged in to leave comments. Login now