##// END OF EJS Templates
fixpax: use absolute_import and print_function
Pulkit Goyal -
r28354:00f31778 default
parent child Browse files
Show More
@@ -11,7 +11,10 b' Suitable for fixing files bdist_mpkg out'
11 *.mpkg/Contents/Packages/*.pkg/Contents/Archive.pax.gz
11 *.mpkg/Contents/Packages/*.pkg/Contents/Archive.pax.gz
12 """
12 """
13
13
14 import sys, os, gzip
14 from __future__ import absolute_import, print_function
15 import gzip
16 import os
17 import sys
15
18
16 def fixpax(iname, oname):
19 def fixpax(iname, oname):
17 i = gzip.GzipFile(iname)
20 i = gzip.GzipFile(iname)
@@ -55,7 +58,7 b' def fixpax(iname, oname):'
55
58
56 if __name__ == '__main__':
59 if __name__ == '__main__':
57 for iname in sys.argv[1:]:
60 for iname in sys.argv[1:]:
58 print 'fixing file ownership in %s' % iname
61 print('fixing file ownership in %s' % iname)
59 oname = sys.argv[1] + '.tmp'
62 oname = sys.argv[1] + '.tmp'
60 fixpax(iname, oname)
63 fixpax(iname, oname)
61 os.rename(oname, iname)
64 os.rename(oname, iname)
@@ -6,8 +6,6 b''
6 contrib/check-code.py not using absolute_import
6 contrib/check-code.py not using absolute_import
7 contrib/check-code.py requires print_function
7 contrib/check-code.py requires print_function
8 contrib/debugshell.py not using absolute_import
8 contrib/debugshell.py not using absolute_import
9 contrib/fixpax.py not using absolute_import
10 contrib/fixpax.py requires print_function
11 contrib/hgclient.py not using absolute_import
9 contrib/hgclient.py not using absolute_import
12 contrib/hgclient.py requires print_function
10 contrib/hgclient.py requires print_function
13 contrib/hgfixes/fix_bytes.py not using absolute_import
11 contrib/hgfixes/fix_bytes.py not using absolute_import
General Comments 0
You need to be logged in to leave comments. Login now