Patchwork D11182: narrow: stop using `normallookup` during a test

login
register
mail settings
Submitter phabricator
Date July 19, 2021, 2:11 p.m.
Message ID <differential-rev-PHID-DREV-4t3wjn6k3azhm2oltjzl-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49496/
State Superseded
Headers show

Comments

phabricator - July 19, 2021, 2:11 p.m.
marmoute created this revision.
Herald added a reviewer: durin42.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-narrow-expanddirstate.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-narrow-expanddirstate.t b/tests/test-narrow-expanddirstate.t
--- a/tests/test-narrow-expanddirstate.t
+++ b/tests/test-narrow-expanddirstate.t
@@ -74,8 +74,14 @@ 
   >   narrowspec.copytoworkingcopy(repo)
   >   newmatcher = narrowspec.match(repo.root, includes, excludes)
   >   added = matchmod.differencematcher(newmatcher, currentmatcher)
-  >   for f in repo[b'.'].manifest().walk(added):
-  >     repo.dirstate.normallookup(f)
+  >   with repo.dirstate.parentchange():
+  >       for f in repo[b'.'].manifest().walk(added):
+  >           repo.dirstate.update_file(
+  >               f,
+  >               p1_tracked=True,
+  >               wc_tracked=True,
+  >               possibly_dirty=True,
+  >           )
   > 
   > def reposetup(ui, repo):
   >   class expandingrepo(repo.__class__):