Mercurial > hg-stable
changeset 27750:443848eece18
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 13 Jan 2016 15:47:37 -0600 |
parents | 215b47449e47 (current diff) bf86e3e87123 (diff) |
children | a40e2f7fe49d |
files | mercurial/unionrepo.py |
diffstat | 2 files changed, 21 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/unionrepo.py Tue Jan 12 13:10:31 2016 -0800 +++ b/mercurial/unionrepo.py Wed Jan 13 15:47:37 2016 -0600 @@ -183,7 +183,8 @@ """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):
--- a/tests/test-unionrepo.t Tue Jan 12 13:10:31 2016 -0800 +++ b/tests/test-unionrepo.t Wed Jan 13 15:47:37 2016 -0600 @@ -148,3 +148,22 @@ 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)