Patchwork D10763: tests: partially fix test-transaction-rollback-on-revlog-split.t on Windows

login
register
mail settings
Submitter phabricator
Date May 21, 2021, 4:38 a.m.
Message ID <differential-rev-PHID-DREV-mnpdav2fwnh45ovdnudb-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49083/
State Superseded
Headers show

Comments

phabricator - May 21, 2021, 4:38 a.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  For whatever reason, the extra space causes different output on Windows:
  
    $ printf '% 20d' '1' | xxd -
    0000000: 2020 2020 2020 2020 2020 2020 2020 2020
    0000010: 2020 2020 31                                 1
  
  vs WSL:
  
    /mnt/c/Users/Matt/hg/tests$ printf '% 20d' '1' | xxd -
    00000000: 2020 2020 2020 2020 2020 2020 2020 2020
    00000010: 2020 2031
  
  Without the space, they both agree the last word is 2031.  There are other
  failures on Windows that I don't understand that are introduced by 46b828b85eb7 <https://phab.mercurial-scm.org/rHG46b828b85eb72fa245617c2afbb30b824ff5f4eb>
  and 18415fc918a1 <https://phab.mercurial-scm.org/rHG18415fc918a14845f4507b1c8b366d9c67f6b902>.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-transaction-rollback-on-revlog-split.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-transaction-rollback-on-revlog-split.t b/tests/test-transaction-rollback-on-revlog-split.t
--- a/tests/test-transaction-rollback-on-revlog-split.t
+++ b/tests/test-transaction-rollback-on-revlog-split.t
@@ -28,9 +28,9 @@ 
 
   $ hg init troffset-computation --config format.revlog-compression=none
   $ cd troffset-computation
-  $ printf '% 20d' '1' > file
+  $ printf '%20d' '1' > file
   $ hg commit -Aqm_
-  $ printf '% 1024d' '1' > file
+  $ printf '%1024d' '1' > file
   $ hg commit -Aqm_
   $ dd if=/dev/zero of=file bs=1k count=128 > /dev/null 2>&1
   $ hg commit -Aqm_