Patchwork D2116: py3: replace file() with open() in test-tag.t

login
register
mail settings
Submitter phabricator
Date Feb. 11, 2018, 2:04 p.m.
Message ID <fe9c4739743bf6025e7d8ff88839d2d0@localhost.localdomain>
Download mbox | patch
Permalink /patch/27557/
State Not Applicable
Headers show

Comments

phabricator - Feb. 11, 2018, 2:04 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGeed40f0f4c6f: py3: replace file() with open() in test-tag.t (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2116?vs=5379&id=5405

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

AFFECTED FILES
  tests/test-tag.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-tag.t b/tests/test-tag.t
--- a/tests/test-tag.t
+++ b/tests/test-tag.t
@@ -231,8 +231,8 @@ 
 doesn't end with EOL
 
   $ $PYTHON << EOF
-  > f = file('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close()
-  > f = file('.hg/localtags', 'w'); f.write(last); f.close()
+  > f = open('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close()
+  > f = open('.hg/localtags', 'w'); f.write(last); f.close()
   > EOF
   $ cat .hg/localtags; echo
   acb14030fe0a21b60322c440ad2d20cf7685a376 localblah
@@ -243,8 +243,8 @@ 
   
 
   $ $PYTHON << EOF
-  > f = file('.hgtags'); last = f.readlines()[-1][:-1]; f.close()
-  > f = file('.hgtags', 'w'); f.write(last); f.close()
+  > f = open('.hgtags'); last = f.readlines()[-1][:-1]; f.close()
+  > f = open('.hgtags', 'w'); f.write(last); f.close()
   > EOF
   $ hg ci -m'broken manual edit of .hgtags'
   $ cat .hgtags; echo