D2118: py3: replace file() with open() in test-relink.t

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sun Feb 11 09:04:45 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2ea0e89bca1e: py3: replace file() with open() in test-relink.t (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2118?vs=5381&id=5407

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

AFFECTED FILES
  tests/test-relink.t

CHANGE DETAILS

diff --git a/tests/test-relink.t b/tests/test-relink.t
--- a/tests/test-relink.t
+++ b/tests/test-relink.t
@@ -49,7 +49,7 @@
 
 Test files are read in binary mode
 
-  $ $PYTHON -c "file('.hg/store/data/dummy.i', 'wb').write('a\r\nb\n')"
+  $ $PYTHON -c "open('.hg/store/data/dummy.i', 'wb').write(b'a\r\nb\n')"
   $ cd ..
 
 
@@ -68,7 +68,7 @@
   $ echo b >> b
   $ hg ci -m changeb
   created new head
-  $ $PYTHON -c "file('.hg/store/data/dummy.i', 'wb').write('a\nb\r\n')"
+  $ $PYTHON -c "open('.hg/store/data/dummy.i', 'wb').write(b'a\nb\r\n')"
 
 
 relink



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list