Patchwork D2120: py3: replace file() with open() in test-mq-qimport.t

login
register
mail settings
Submitter phabricator
Date Feb. 11, 2018, 12:40 p.m.
Message ID <differential-rev-PHID-DREV-y6uyu5sdamzapata2yov-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27535/
State Superseded
Headers show

Comments

phabricator - Feb. 11, 2018, 12:40 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  file() is not present in Python 3.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-mq-qimport.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-mq-qimport.t b/tests/test-mq-qimport.t
--- a/tests/test-mq-qimport.t
+++ b/tests/test-mq-qimport.t
@@ -6,7 +6,7 @@ 
   > args = sys.argv[2:]
   > assert (len(args) % 2) == 0
   > 
-  > f = file(path, 'wb')
+  > f = open(path, 'wb')
   > for i in xrange(len(args)/2):
   >    count, s = args[2*i:2*i+2]
   >    count = int(count)