mercurial/cmdutil.py
changeset 45375 8c466bcb0879
parent 45372 77b8588dd84e
child 45388 6ba7190ff863
--- 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 = []