dirstate: stop using `_normallookup` in the adddrop extension
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 16 Sep 2021 14:14:33 +0200
changeset 47993 eb1f8d6e9419
parent 47992 14fa2e583422
child 47994 ccb9cc47b7b6
dirstate: stop using `_normallookup` in the adddrop extension That extension is just trying to produce a "corrupted" dirstate. Differential Revision: https://phab.mercurial-scm.org/D11433
tests/test-rebuildstate.t
--- a/tests/test-rebuildstate.t	Wed Sep 15 18:12:55 2021 +0200
+++ b/tests/test-rebuildstate.t	Thu Sep 16 14:14:33 2021 +0200
@@ -17,7 +17,13 @@
   >   try:
   >     for file in pats:
   >       if opts.get('normal_lookup'):
-  >         repo.dirstate._normallookup(file)
+  >         with repo.dirstate.parentchange():
+  >             repo.dirstate.update_file(
+  >                 file,
+  >                 p1_tracked=True,
+  >                 wc_tracked=True,
+  >                 possibly_dirty=True,
+  >             )
   >       else:
   >         repo.dirstate._map.dropfile(file)
   >         repo.dirstate._dirty = True