[PATCH 1 of 5] tests: test-archive.t use print_function

timeless timeless at fmr.im
Wed May 11 01:21:02 EDT 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1462562137 0
#      Fri May 06 19:15:37 2016 +0000
# Node ID 5e44aad4d3f93555d9ea24bb90074b58e232eec4
# Parent  a2806b270837492edb52a1146c12d9c1b5deed6d
# EXP-Topic runtests
# Available At bb://timeless/mercurial-crew
#              hg pull bb://timeless/mercurial-crew -r 5e44aad4d3f9
tests: test-archive.t use print_function

diff -r a2806b270837 -r 5e44aad4d3f9 tests/test-archive.t
--- a/tests/test-archive.t	Fri May 06 19:08:46 2016 +0000
+++ b/tests/test-archive.t	Fri May 06 19:15:37 2016 +0000
@@ -195,6 +195,7 @@
   > done
 
   $ cat > md5comp.py <<EOF
+  > from __future__ import print_function
   > try:
   >     from hashlib import md5
   > except ImportError:
@@ -203,7 +204,7 @@
   > f1, f2 = sys.argv[1:3]
   > h1 = md5(file(f1, 'rb').read()).hexdigest()
   > h2 = md5(file(f2, 'rb').read()).hexdigest()
-  > print h1 == h2 or "md5 differ: " + repr((h1, h2))
+  > print(h1 == h2 or "md5 differ: " + repr((h1, h2)))
   > EOF
 
 archive name is stored in the archive, so create similar archives and
@@ -343,8 +344,9 @@
   $ hg -R repo add repo/a
   $ hg -R repo commit -m '#0' -d '456789012 21600'
   $ cat > show_mtime.py <<EOF
+  > from __future__ import print_function
   > import sys, os
-  > print int(os.stat(sys.argv[1]).st_mtime)
+  > print(int(os.stat(sys.argv[1]).st_mtime))
   > EOF
 
   $ hg -R repo archive --prefix tar-extracted archive.tar


More information about the Mercurial-devel mailing list