diff -r 36b2a304216c -r e32dfff71529 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Tue Apr 03 15:08:14 2018 -0700 +++ b/mercurial/debugcommands.py Sun Apr 01 22:48:32 2018 -0700 @@ -2210,7 +2210,7 @@ treebystage = {} printedtree = None - tree = revsetlang.parse(expr, lookup=repo.__contains__) + tree = revsetlang.parse(expr, lookup=revset.lookupfn(repo)) for n, f in stages: treebystage[n] = tree = f(tree) if n in showalways or (n in showchanged and tree != printedtree):