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

REVISION SUMMARY
  All core users have been updated.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -708,6 +708,13 @@
 
     def add(self, f):
         '''Mark a file added.'''
+        if not self.pendingparentchange():
+            util.nouideprecwarn(
+                b"do not use `add` outside of update/merge context."
+                b" Use `set_tracked`",
+                b'6.0',
+                stacklevel=2,
+            )
         self._add(f)
 
     def _add(self, filename):



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to