mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
unionrepo: fix wrong rev being checked in iscensored (issue5024)
This commit is contained in:
parent
75370c2faf
commit
5e2327758b
@ -182,7 +182,8 @@ class unionfilelog(unionrevlog, filelog.filelog):
|
||||
"""Check if a revision is censored."""
|
||||
if rev <= self.repotiprev:
|
||||
return filelog.filelog.iscensored(self, rev)
|
||||
return self.revlog2.iscensored(rev)
|
||||
node = self.node(rev)
|
||||
return self.revlog2.iscensored(self.revlog2.rev(node))
|
||||
|
||||
class unionpeer(localrepo.localpeer):
|
||||
def canpush(self):
|
||||
|
@ -148,3 +148,22 @@ union repos can be cloned ... and clones works correctly
|
||||
2:68c0685446a3 repo1-2
|
||||
1:8a58db72e69d repo1-1
|
||||
0:f093fec0529b repo1-0
|
||||
|
||||
union repos should use the correct rev number (issue5024)
|
||||
|
||||
$ hg init a
|
||||
$ cd a
|
||||
$ echo a0 >> f
|
||||
$ hg ci -Aqm a0
|
||||
$ cd ..
|
||||
$ hg init b
|
||||
$ cd b
|
||||
$ echo b0 >> f
|
||||
$ hg ci -Aqm b0
|
||||
$ echo b1 >> f
|
||||
$ hg ci -qm b1
|
||||
$ cd ..
|
||||
|
||||
"hg files -v" to call fctx.size() -> fctx.iscensored()
|
||||
$ hg files -R union:b+a -r2 -v
|
||||
3 b/f (glob)
|
||||
|
Loading…
Reference in New Issue
Block a user