Patchwork D1636: tests: use Python to write binary data in lfs test instead of shell

login
register
mail settings
Submitter phabricator
Date Dec. 10, 2017, 11:09 a.m.
Message ID <72ac6b3c152d0519f2453e1df0dd298e@localhost.localdomain>
Download mbox | patch
Permalink /patch/26198/
State Not Applicable
Headers show

Comments

phabricator - Dec. 10, 2017, 11:09 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc7d49b87c1ee: tests: use Python to write binary data in lfs test instead of shell (authored by durin42, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D1636?vs=4303&id=4340#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1636?vs=4303&id=4340

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

AFFECTED FILES
  tests/test-lfs.t

CHANGE DETAILS




To: durin42, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

diff --git a/tests/test-lfs.t b/tests/test-lfs.t
--- a/tests/test-lfs.t
+++ b/tests/test-lfs.t
@@ -232,9 +232,10 @@ 
   $ hg mv b1 a2
   $ hg commit -m b
   $ hg status
-  $ HEADER=$'\1\n'
-  $ printf '%sSTART-WITH-HG-FILELOG-METADATA' "$HEADER" > a2
-  $ printf '%sMETA\n' "$HEADER" > a1
+  >>> with open('a2', 'wb') as f:
+  ...     f.write(b'\1\nSTART-WITH-HG-FILELOG-METADATA')
+  >>> with open('a1', 'wb') as f:
+  ...     f.write(b'\1\nMETA\n')
   $ hg commit -m meta
   $ hg status
   $ hg log -T '{rev}: {file_copies} | {file_dels} | {file_adds}\n'