Patchwork D11433: dirstatE: stop using `_normallookup` in the adddrop extension

login
register
mail settings
Submitter phabricator
Date Sept. 16, 2021, 2:44 p.m.
Message ID <differential-rev-PHID-DREV-6lr5q5nitaegddf546n5-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49749/
State Superseded
Headers show

Comments

phabricator - Sept. 16, 2021, 2:44 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  That extensions is just trying to produce "corrupted" dirstate.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-rebuildstate.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-rebuildstate.t b/tests/test-rebuildstate.t
--- a/tests/test-rebuildstate.t
+++ b/tests/test-rebuildstate.t
@@ -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