diff -r 6242a19004ca -r 5cc5a5561c3f mercurial/wireprotov2server.py --- a/mercurial/wireprotov2server.py Mon Jan 14 17:45:48 2019 -0500 +++ b/mercurial/wireprotov2server.py Thu Jan 10 15:57:13 2019 +0100 @@ -823,7 +823,7 @@ '%s key not present in changesetexplicitdepth revision ' 'specifier', (key,)) - for rev in repo.revs(b'ancestors(%ln, %d)', spec[b'nodes'], + for rev in repo.revs(b'ancestors(%ln, %s)', spec[b'nodes'], spec[b'depth'] - 1): node = cl.node(rev)