diff -r bd56597b2254 -r 8c466bcb0879 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Mon Aug 10 18:08:15 2020 -0700 +++ b/mercurial/cmdutil.py Mon Aug 10 21:46:47 2020 -0700 @@ -3493,9 +3493,9 @@ return repo.status(match=scmutil.match(repo[None], pats, opts)) -def revert(ui, repo, ctx, parents, *pats, **opts): +def revert(ui, repo, ctx, *pats, **opts): opts = pycompat.byteskwargs(opts) - parent, p2 = parents + parent, p2 = repo.dirstate.parents() node = ctx.node() mf = ctx.manifest() @@ -3781,7 +3781,6 @@ match = scmutil.match(repo[None], pats) _performrevert( repo, - parents, ctx, names, uipathfn, @@ -3807,7 +3806,6 @@ def _performrevert( repo, - parents, ctx, names, uipathfn, @@ -3823,7 +3821,7 @@ Make sure you have the working directory locked when calling this function. """ - parent, p2 = parents + parent, p2 = repo.dirstate.parents() node = ctx.node() excluded_files = []