##// END OF EJS Templates
casesmash: use absolute_import
Pulkit Goyal -
r28351:42a7301f default
parent child Browse files
Show More
@@ -1,34 +1,38
1 import os, __builtin__
2 from mercurial import util
1 from __future__ import absolute_import
2 import __builtin__
3 import os
4 from mercurial import (
5 util,
6 )
3 7
4 8 def lowerwrap(scope, funcname):
5 9 f = getattr(scope, funcname)
6 10 def wrap(fname, *args, **kwargs):
7 11 d, base = os.path.split(fname)
8 12 try:
9 13 files = os.listdir(d or '.')
10 14 except OSError:
11 15 files = []
12 16 if base in files:
13 17 return f(fname, *args, **kwargs)
14 18 for fn in files:
15 19 if fn.lower() == base.lower():
16 20 return f(os.path.join(d, fn), *args, **kwargs)
17 21 return f(fname, *args, **kwargs)
18 22 scope.__dict__[funcname] = wrap
19 23
20 24 def normcase(path):
21 25 return path.lower()
22 26
23 27 os.path.normcase = normcase
24 28
25 29 for f in 'file open'.split():
26 30 lowerwrap(__builtin__, f)
27 31
28 32 for f in "chmod chown open lstat stat remove unlink".split():
29 33 lowerwrap(os, f)
30 34
31 35 for f in "exists lexists".split():
32 36 lowerwrap(os.path, f)
33 37
34 38 lowerwrap(util, 'posixfile')
@@ -1,167 +1,166
1 1 #require test-repo
2 2
3 3 $ cd "$TESTDIR"/..
4 4
5 5 $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
6 contrib/casesmash.py not using absolute_import
7 6 contrib/check-code.py not using absolute_import
8 7 contrib/check-code.py requires print_function
9 8 contrib/check-config.py not using absolute_import
10 9 contrib/check-config.py requires print_function
11 10 contrib/debugcmdserver.py not using absolute_import
12 11 contrib/debugcmdserver.py requires print_function
13 12 contrib/debugshell.py not using absolute_import
14 13 contrib/fixpax.py not using absolute_import
15 14 contrib/fixpax.py requires print_function
16 15 contrib/hgclient.py not using absolute_import
17 16 contrib/hgclient.py requires print_function
18 17 contrib/hgfixes/fix_bytes.py not using absolute_import
19 18 contrib/hgfixes/fix_bytesmod.py not using absolute_import
20 19 contrib/hgfixes/fix_leftover_imports.py not using absolute_import
21 20 contrib/import-checker.py not using absolute_import
22 21 contrib/import-checker.py requires print_function
23 22 contrib/memory.py not using absolute_import
24 23 contrib/perf.py not using absolute_import
25 24 contrib/python-hook-examples.py not using absolute_import
26 25 contrib/revsetbenchmarks.py not using absolute_import
27 26 contrib/revsetbenchmarks.py requires print_function
28 27 contrib/showstack.py not using absolute_import
29 28 contrib/synthrepo.py not using absolute_import
30 29 contrib/win32/hgwebdir_wsgi.py not using absolute_import
31 30 doc/check-seclevel.py not using absolute_import
32 31 doc/gendoc.py not using absolute_import
33 32 doc/hgmanpage.py not using absolute_import
34 33 hgext/__init__.py not using absolute_import
35 34 hgext/color.py not using absolute_import
36 35 hgext/convert/__init__.py not using absolute_import
37 36 hgext/convert/bzr.py not using absolute_import
38 37 hgext/convert/common.py not using absolute_import
39 38 hgext/convert/convcmd.py not using absolute_import
40 39 hgext/convert/cvs.py not using absolute_import
41 40 hgext/convert/cvsps.py not using absolute_import
42 41 hgext/convert/darcs.py not using absolute_import
43 42 hgext/convert/filemap.py not using absolute_import
44 43 hgext/convert/git.py not using absolute_import
45 44 hgext/convert/gnuarch.py not using absolute_import
46 45 hgext/convert/hg.py not using absolute_import
47 46 hgext/convert/monotone.py not using absolute_import
48 47 hgext/convert/p4.py not using absolute_import
49 48 hgext/convert/subversion.py not using absolute_import
50 49 hgext/convert/transport.py not using absolute_import
51 50 hgext/eol.py not using absolute_import
52 51 hgext/extdiff.py not using absolute_import
53 52 hgext/factotum.py not using absolute_import
54 53 hgext/fetch.py not using absolute_import
55 54 hgext/gpg.py not using absolute_import
56 55 hgext/graphlog.py not using absolute_import
57 56 hgext/hgcia.py not using absolute_import
58 57 hgext/hgk.py not using absolute_import
59 58 hgext/highlight/__init__.py not using absolute_import
60 59 hgext/highlight/highlight.py not using absolute_import
61 60 hgext/histedit.py not using absolute_import
62 61 hgext/largefiles/__init__.py not using absolute_import
63 62 hgext/largefiles/basestore.py not using absolute_import
64 63 hgext/largefiles/lfcommands.py not using absolute_import
65 64 hgext/largefiles/lfutil.py not using absolute_import
66 65 hgext/largefiles/localstore.py not using absolute_import
67 66 hgext/largefiles/overrides.py not using absolute_import
68 67 hgext/largefiles/proto.py not using absolute_import
69 68 hgext/largefiles/remotestore.py not using absolute_import
70 69 hgext/largefiles/reposetup.py not using absolute_import
71 70 hgext/largefiles/uisetup.py not using absolute_import
72 71 hgext/largefiles/wirestore.py not using absolute_import
73 72 hgext/mq.py not using absolute_import
74 73 hgext/notify.py not using absolute_import
75 74 hgext/patchbomb.py not using absolute_import
76 75 hgext/purge.py not using absolute_import
77 76 hgext/rebase.py not using absolute_import
78 77 hgext/record.py not using absolute_import
79 78 hgext/relink.py not using absolute_import
80 79 hgext/schemes.py not using absolute_import
81 80 hgext/share.py not using absolute_import
82 81 hgext/shelve.py not using absolute_import
83 82 hgext/strip.py not using absolute_import
84 83 hgext/transplant.py not using absolute_import
85 84 hgext/win32mbcs.py not using absolute_import
86 85 hgext/win32text.py not using absolute_import
87 86 i18n/check-translation.py not using absolute_import
88 87 i18n/polib.py not using absolute_import
89 88 setup.py not using absolute_import
90 89 tests/filterpyflakes.py requires print_function
91 90 tests/generate-working-copy-states.py requires print_function
92 91 tests/get-with-headers.py requires print_function
93 92 tests/heredoctest.py requires print_function
94 93 tests/hypothesishelpers.py not using absolute_import
95 94 tests/hypothesishelpers.py requires print_function
96 95 tests/killdaemons.py not using absolute_import
97 96 tests/md5sum.py not using absolute_import
98 97 tests/mockblackbox.py not using absolute_import
99 98 tests/printenv.py not using absolute_import
100 99 tests/readlink.py not using absolute_import
101 100 tests/readlink.py requires print_function
102 101 tests/revlog-formatv0.py not using absolute_import
103 102 tests/run-tests.py not using absolute_import
104 103 tests/seq.py not using absolute_import
105 104 tests/seq.py requires print_function
106 105 tests/silenttestrunner.py not using absolute_import
107 106 tests/silenttestrunner.py requires print_function
108 107 tests/sitecustomize.py not using absolute_import
109 108 tests/svn-safe-append.py not using absolute_import
110 109 tests/svnxml.py not using absolute_import
111 110 tests/test-ancestor.py requires print_function
112 111 tests/test-atomictempfile.py not using absolute_import
113 112 tests/test-batching.py not using absolute_import
114 113 tests/test-batching.py requires print_function
115 114 tests/test-bdiff.py not using absolute_import
116 115 tests/test-bdiff.py requires print_function
117 116 tests/test-context.py not using absolute_import
118 117 tests/test-context.py requires print_function
119 118 tests/test-demandimport.py not using absolute_import
120 119 tests/test-demandimport.py requires print_function
121 120 tests/test-dispatch.py not using absolute_import
122 121 tests/test-dispatch.py requires print_function
123 122 tests/test-doctest.py not using absolute_import
124 123 tests/test-duplicateoptions.py not using absolute_import
125 124 tests/test-duplicateoptions.py requires print_function
126 125 tests/test-filecache.py not using absolute_import
127 126 tests/test-filecache.py requires print_function
128 127 tests/test-filelog.py not using absolute_import
129 128 tests/test-filelog.py requires print_function
130 129 tests/test-hg-parseurl.py not using absolute_import
131 130 tests/test-hg-parseurl.py requires print_function
132 131 tests/test-hgweb-auth.py not using absolute_import
133 132 tests/test-hgweb-auth.py requires print_function
134 133 tests/test-hgwebdir-paths.py not using absolute_import
135 134 tests/test-hybridencode.py not using absolute_import
136 135 tests/test-hybridencode.py requires print_function
137 136 tests/test-lrucachedict.py not using absolute_import
138 137 tests/test-lrucachedict.py requires print_function
139 138 tests/test-manifest.py not using absolute_import
140 139 tests/test-minirst.py not using absolute_import
141 140 tests/test-minirst.py requires print_function
142 141 tests/test-parseindex2.py not using absolute_import
143 142 tests/test-parseindex2.py requires print_function
144 143 tests/test-pathencode.py not using absolute_import
145 144 tests/test-pathencode.py requires print_function
146 145 tests/test-propertycache.py not using absolute_import
147 146 tests/test-propertycache.py requires print_function
148 147 tests/test-revlog-ancestry.py not using absolute_import
149 148 tests/test-revlog-ancestry.py requires print_function
150 149 tests/test-run-tests.py not using absolute_import
151 150 tests/test-simplemerge.py not using absolute_import
152 151 tests/test-status-inprocess.py not using absolute_import
153 152 tests/test-status-inprocess.py requires print_function
154 153 tests/test-symlink-os-yes-fs-no.py not using absolute_import
155 154 tests/test-trusted.py not using absolute_import
156 155 tests/test-trusted.py requires print_function
157 156 tests/test-ui-color.py not using absolute_import
158 157 tests/test-ui-color.py requires print_function
159 158 tests/test-ui-config.py not using absolute_import
160 159 tests/test-ui-config.py requires print_function
161 160 tests/test-ui-verbosity.py not using absolute_import
162 161 tests/test-ui-verbosity.py requires print_function
163 162 tests/test-url.py not using absolute_import
164 163 tests/test-url.py requires print_function
165 164 tests/test-walkrepo.py requires print_function
166 165 tests/test-wireproto.py requires print_function
167 166 tests/tinyproxy.py requires print_function
General Comments 0
You need to be logged in to leave comments. Login now