D11110: largefile: use `set_untracked` in the `forget` override

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sun Jul 18 21:53:31 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is the new shinny API.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11110

AFFECTED FILES
  hgext/largefiles/overrides.py

CHANGE DETAILS

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 @@
     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:



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list