# HG changeset patch # User Pierre-Yves David # Date 2021-07-08 01:50:08 # Node ID 2af9709ea13c7bf5efaf8e0ee2081db2ac729682 # Parent 00d70f61d856dccc80f68c1590c8292b673c81f2 largefile: use `set_untracked` in the `forget` override This is the new shinny API. Differential Revision: https://phab.mercurial-scm.org/D11110 diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -1380,10 +1380,7 @@ def cmdutilforget( with repo.wlock(): lfdirstate = lfutil.openlfdirstate(ui, repo) for f in forget: - if lfdirstate[f] == b'a': - lfdirstate.drop(f) - else: - lfdirstate.remove(f) + lfdirstate.set_untracked(f) lfdirstate.write() standins = [lfutil.standin(f) for f in forget] for f in standins: