D2121: py3: replace file() with open() in test-mq-missingfiles.t

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sun Feb 11 12:40:56 UTC 2018


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/D2121

AFFECTED FILES
  tests/test-mq-missingfiles.t

CHANGE DETAILS

diff --git a/tests/test-mq-missingfiles.t b/tests/test-mq-missingfiles.t
--- a/tests/test-mq-missingfiles.t
+++ b/tests/test-mq-missingfiles.t
@@ -9,7 +9,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)



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


More information about the Mercurial-devel mailing list