Patchwork D11793: test: use a different timestamp for the updated file

login
register
mail settings
Submitter phabricator
Date Nov. 24, 2021, 11:15 a.m.
Message ID <differential-rev-PHID-DREV-fj3nssurlopcxgevgtuj-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50116/
State New
Headers show

Comments

phabricator - Nov. 24, 2021, 11:15 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  In the test we want to trigger a write after the underlying dirstate changed. To
  do so, we need a write. And as we are about to make dirstate update smarter we
  need to meddle with the script a bit to make sure there will be a write.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-dirstate-race.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-dirstate-race.t b/tests/test-dirstate-race.t
--- a/tests/test-dirstate-race.t
+++ b/tests/test-dirstate-race.t
@@ -148,6 +148,8 @@ 
   > 
   > hg update -q -C 0
   > hg cat -r 1 b > b
+  > # make sure the timestamps is not ambiguous and a write will be issued
+  > touch -t 198606251012 b
   > EOF
 
 "hg status" below should excludes "e", of which exec flag is set, for