[PATCH stable] unionrepo: fix wrong rev being checked in iscensored (issue5024)

Sean Farley sean at farley.io
Sat Jan 9 19:03:58 CST 2016


Yuya Nishihara <yuya at tcha.org> writes:

> On Fri, 08 Jan 2016 10:10:28 -0800, Sean Farley wrote:
>> # HG changeset patch
>> # User Sean Farley <sean at farley.io>
>> # Date 1452106915 28800
>> #      Wed Jan 06 11:01:55 2016 -0800
>> # Branch stable
>> # Node ID 258348d91ba9fd91adecd9cb5c3333816dc2f76d
>> # Parent  7c598947fbbd78b26989326c61345c6e46855bdc
>> unionrepo: fix wrong rev being checked in iscensored (issue5024)
>> 
>> diff --git a/mercurial/unionrepo.py b/mercurial/unionrepo.py
>> --- a/mercurial/unionrepo.py
>> +++ b/mercurial/unionrepo.py
>> @@ -180,11 +180,12 @@ class unionfilelog(unionrevlog, filelog.
>>  
>>      def iscensored(self, rev):
>>          """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))
>
> Looks good, but can you add a test? ™

Sadly, I couldn't reproduce it simply. Could anyone help?


More information about the Mercurial-devel mailing list