# HG changeset patch # User Pierre-Yves David # Date 2021-07-07 23:20:46 # Node ID 791e2333d3d3ec7eb319d5ec671fa3d88af034d4 # Parent 14e2f4bd5f1630e13b1ed1d480d7ff4482f51b11 context: use `dirstate.set_tracked` for `revert` This is the new shiny API. Differential Revision: https://phab.mercurial-scm.org/D11016 diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -3686,7 +3686,7 @@ def _performrevert( if f not in newlyaddedandmodifiedfiles: prntstatusmsg(b'add', f) checkout(f) - repo.dirstate.add(f) + repo.dirstate.set_tracked(f) normal = repo.dirstate.normallookup if node == parent and p2 == repo.nullid: