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. This patch also adds a b'' prefix to make sure we write bytes in Python 3. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2124 AFFECTED FILES tests/test-import-git.t CHANGE DETAILS diff --git a/tests/test-import-git.t b/tests/test-import-git.t --- a/tests/test-import-git.t +++ b/tests/test-import-git.t @@ -563,10 +563,10 @@ > Mc$`b*O5$Pw00T?_*Z=?k > > EOF - >>> fp = file('binary.diff', 'rb') + >>> fp = open('binary.diff', 'rb') >>> data = fp.read() >>> fp.close() - >>> file('binary.diff', 'wb').write(data.replace('\n', '\r\n')) + >>> open('binary.diff', 'wb').write(data.replace(b'\n', b'\r\n')) $ rm binary2 $ hg import --no-commit binary.diff applying binary.diff To: pulkit, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel