Show More
@@ -1,244 +1,243 | |||
|
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 | 6 | doc/check-seclevel.py not using absolute_import |
|
7 | 7 | doc/gendoc.py not using absolute_import |
|
8 | 8 | doc/hgmanpage.py not using absolute_import |
|
9 | 9 | hgext/color.py not using absolute_import |
|
10 | 10 | hgext/eol.py not using absolute_import |
|
11 | 11 | hgext/extdiff.py not using absolute_import |
|
12 | 12 | hgext/factotum.py not using absolute_import |
|
13 | 13 | hgext/fetch.py not using absolute_import |
|
14 | 14 | hgext/fsmonitor/pywatchman/__init__.py not using absolute_import |
|
15 | 15 | hgext/fsmonitor/pywatchman/__init__.py requires print_function |
|
16 | 16 | hgext/fsmonitor/pywatchman/capabilities.py not using absolute_import |
|
17 | 17 | hgext/fsmonitor/pywatchman/pybser.py not using absolute_import |
|
18 | 18 | hgext/gpg.py not using absolute_import |
|
19 | 19 | hgext/graphlog.py not using absolute_import |
|
20 | 20 | hgext/hgcia.py not using absolute_import |
|
21 | 21 | hgext/hgk.py not using absolute_import |
|
22 | 22 | hgext/highlight/__init__.py not using absolute_import |
|
23 | 23 | hgext/highlight/highlight.py not using absolute_import |
|
24 | 24 | hgext/histedit.py not using absolute_import |
|
25 | 25 | hgext/largefiles/__init__.py not using absolute_import |
|
26 | 26 | hgext/largefiles/basestore.py not using absolute_import |
|
27 | 27 | hgext/largefiles/lfcommands.py not using absolute_import |
|
28 | 28 | hgext/largefiles/lfutil.py not using absolute_import |
|
29 | 29 | hgext/largefiles/localstore.py not using absolute_import |
|
30 | 30 | hgext/largefiles/overrides.py not using absolute_import |
|
31 | 31 | hgext/largefiles/proto.py not using absolute_import |
|
32 | 32 | hgext/largefiles/remotestore.py not using absolute_import |
|
33 | 33 | hgext/largefiles/reposetup.py not using absolute_import |
|
34 | 34 | hgext/largefiles/uisetup.py not using absolute_import |
|
35 | 35 | hgext/largefiles/wirestore.py not using absolute_import |
|
36 | 36 | hgext/mq.py not using absolute_import |
|
37 | 37 | hgext/rebase.py not using absolute_import |
|
38 | 38 | hgext/share.py not using absolute_import |
|
39 | 39 | hgext/win32text.py not using absolute_import |
|
40 | 40 | i18n/check-translation.py not using absolute_import |
|
41 | 41 | i18n/polib.py not using absolute_import |
|
42 | 42 | setup.py not using absolute_import |
|
43 | 43 | tests/heredoctest.py requires print_function |
|
44 | 44 | tests/killdaemons.py not using absolute_import |
|
45 | 45 | tests/md5sum.py not using absolute_import |
|
46 | 46 | tests/mockblackbox.py not using absolute_import |
|
47 | 47 | tests/printenv.py not using absolute_import |
|
48 | 48 | tests/readlink.py not using absolute_import |
|
49 | 49 | tests/readlink.py requires print_function |
|
50 | 50 | tests/revlog-formatv0.py not using absolute_import |
|
51 | 51 | tests/run-tests.py not using absolute_import |
|
52 | 52 | tests/sitecustomize.py not using absolute_import |
|
53 | 53 | tests/svn-safe-append.py not using absolute_import |
|
54 | 54 | tests/svnxml.py not using absolute_import |
|
55 | 55 | tests/test-atomictempfile.py not using absolute_import |
|
56 | 56 | tests/test-demandimport.py not using absolute_import |
|
57 | 57 | tests/test-demandimport.py requires print_function |
|
58 | 58 | tests/test-doctest.py not using absolute_import |
|
59 | 59 | tests/test-hgwebdir-paths.py not using absolute_import |
|
60 | 60 | tests/test-lrucachedict.py not using absolute_import |
|
61 | 61 | tests/test-lrucachedict.py requires print_function |
|
62 | 62 | tests/test-manifest.py not using absolute_import |
|
63 | tests/test-parseindex2.py not using absolute_import | |
|
64 | 63 | tests/test-parseindex2.py requires print_function |
|
65 | 64 | tests/test-pathencode.py not using absolute_import |
|
66 | 65 | tests/test-pathencode.py requires print_function |
|
67 | 66 | tests/test-propertycache.py not using absolute_import |
|
68 | 67 | tests/test-propertycache.py requires print_function |
|
69 | 68 | tests/test-revlog-ancestry.py not using absolute_import |
|
70 | 69 | tests/test-revlog-ancestry.py requires print_function |
|
71 | 70 | tests/test-run-tests.py not using absolute_import |
|
72 | 71 | tests/test-simplemerge.py not using absolute_import |
|
73 | 72 | tests/test-status-inprocess.py not using absolute_import |
|
74 | 73 | tests/test-status-inprocess.py requires print_function |
|
75 | 74 | tests/test-symlink-os-yes-fs-no.py not using absolute_import |
|
76 | 75 | tests/test-trusted.py not using absolute_import |
|
77 | 76 | tests/test-trusted.py requires print_function |
|
78 | 77 | tests/test-ui-color.py not using absolute_import |
|
79 | 78 | tests/test-url.py not using absolute_import |
|
80 | 79 | |
|
81 | 80 | #if py3exe |
|
82 | 81 | $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py |
|
83 | 82 | contrib/check-code.py: invalid syntax: (unicode error) 'unicodeescape' codec can't decode bytes in position *-*: malformed \N character escape (<unknown>, line *) (glob) |
|
84 | 83 | doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
85 | 84 | hgext/acl.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
86 | 85 | hgext/automv.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) |
|
87 | 86 | hgext/blackbox.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
88 | 87 | hgext/bugzilla.py: error importing module: <ImportError> No module named 'urlparse' (line *) (glob) |
|
89 | 88 | hgext/censor.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
90 | 89 | hgext/chgserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) |
|
91 | 90 | hgext/children.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
92 | 91 | hgext/churn.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
93 | 92 | hgext/clonebundles.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
94 | 93 | hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
95 | 94 | hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
96 | 95 | hgext/convert/common.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
97 | 96 | hgext/convert/convcmd.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
98 | 97 | hgext/convert/cvs.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
99 | 98 | hgext/convert/cvsps.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
100 | 99 | hgext/convert/darcs.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
101 | 100 | hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
102 | 101 | hgext/convert/git.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
103 | 102 | hgext/convert/gnuarch.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
104 | 103 | hgext/convert/hg.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
105 | 104 | hgext/convert/monotone.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
106 | 105 | hgext/convert/p*.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
107 | 106 | hgext/convert/subversion.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
108 | 107 | hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *) (glob) |
|
109 | 108 | hgext/eol.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
110 | 109 | hgext/extdiff.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
111 | 110 | hgext/factotum.py: error importing: <ImportError> No module named 'cStringIO' (error at url.py:*) (glob) |
|
112 | 111 | hgext/fetch.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) |
|
113 | 112 | hgext/fsmonitor/state.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
114 | 113 | hgext/fsmonitor/watchmanclient.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
115 | 114 | hgext/gpg.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
116 | 115 | hgext/graphlog.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
117 | 116 | hgext/hgcia.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
118 | 117 | hgext/hgk.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
119 | 118 | hgext/highlight/highlight.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
120 | 119 | hgext/histedit.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
121 | 120 | hgext/keyword.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
122 | 121 | hgext/largefiles/basestore.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
123 | 122 | hgext/largefiles/lfcommands.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
124 | 123 | hgext/largefiles/lfutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
125 | 124 | hgext/largefiles/localstore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) |
|
126 | 125 | hgext/largefiles/overrides.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
127 | 126 | hgext/largefiles/proto.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) |
|
128 | 127 | hgext/largefiles/remotestore.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) |
|
129 | 128 | hgext/largefiles/reposetup.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
130 | 129 | hgext/largefiles/uisetup.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob) |
|
131 | 130 | hgext/largefiles/wirestore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) |
|
132 | 131 | hgext/mq.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
133 | 132 | hgext/notify.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
134 | 133 | hgext/pager.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
135 | 134 | hgext/patchbomb.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
136 | 135 | hgext/purge.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
137 | 136 | hgext/rebase.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
138 | 137 | hgext/record.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
139 | 138 | hgext/relink.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
140 | 139 | hgext/schemes.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
141 | 140 | hgext/share.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
142 | 141 | hgext/shelve.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
143 | 142 | hgext/strip.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
144 | 143 | hgext/transplant.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
145 | 144 | hgext/win*text.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
146 | 145 | mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
147 | 146 | mercurial/bookmarks.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
148 | 147 | mercurial/branchmap.py: error importing: <ImportError> No module named 'Queue' (error at scmutil.py:*) (glob) |
|
149 | 148 | mercurial/bundle*.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
150 | 149 | mercurial/bundlerepo.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
151 | 150 | mercurial/byterange.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) |
|
152 | 151 | mercurial/changegroup.py: error importing: <ImportError> No module named 'Queue' (error at scmutil.py:*) (glob) |
|
153 | 152 | mercurial/changelog.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob) |
|
154 | 153 | mercurial/cmdutil.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
155 | 154 | mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
156 | 155 | mercurial/commandserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) |
|
157 | 156 | mercurial/config.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
158 | 157 | mercurial/context.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
159 | 158 | mercurial/copies.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
160 | 159 | mercurial/crecord.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
161 | 160 | mercurial/destutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
162 | 161 | mercurial/dirstate.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
163 | 162 | mercurial/discovery.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
164 | 163 | mercurial/dispatch.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
165 | 164 | mercurial/exchange.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) |
|
166 | 165 | mercurial/extensions.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
167 | 166 | mercurial/filelog.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob) |
|
168 | 167 | mercurial/filemerge.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
169 | 168 | mercurial/fileset.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
170 | 169 | mercurial/formatter.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
171 | 170 | mercurial/graphmod.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
172 | 171 | mercurial/help.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
173 | 172 | mercurial/hg.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
174 | 173 | mercurial/hgweb/common.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) |
|
175 | 174 | mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
176 | 175 | mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
177 | 176 | mercurial/hgweb/protocol.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
178 | 177 | mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
179 | 178 | mercurial/hgweb/server.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) |
|
180 | 179 | mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
181 | 180 | mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
182 | 181 | mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
183 | 182 | mercurial/hook.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
184 | 183 | mercurial/httpclient/_readers.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
185 | 184 | mercurial/httpconnection.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) |
|
186 | 185 | mercurial/httppeer.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
187 | 186 | mercurial/keepalive.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
188 | 187 | mercurial/localrepo.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
189 | 188 | mercurial/lock.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
190 | 189 | mercurial/mail.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
191 | 190 | mercurial/manifest.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob) |
|
192 | 191 | mercurial/match.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
193 | 192 | mercurial/mdiff.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob) |
|
194 | 193 | mercurial/merge.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
195 | 194 | mercurial/minirst.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
196 | 195 | mercurial/namespaces.py: error importing: <ImportError> No module named 'cStringIO' (error at patch.py:*) (glob) |
|
197 | 196 | mercurial/obsolete.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
198 | 197 | mercurial/patch.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
199 | 198 | mercurial/pathutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
200 | 199 | mercurial/peer.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
201 | 200 | mercurial/pure/mpatch.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
202 | 201 | mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
203 | 202 | mercurial/pushkey.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
204 | 203 | mercurial/pvec.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
205 | 204 | mercurial/registrar.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
206 | 205 | mercurial/repair.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
207 | 206 | mercurial/repoview.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
208 | 207 | mercurial/revlog.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob) |
|
209 | 208 | mercurial/revset.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
210 | 209 | mercurial/scmutil.py: error importing module: <ImportError> No module named 'Queue' (line *) (glob) |
|
211 | 210 | mercurial/scmwindows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) |
|
212 | 211 | mercurial/similar.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob) |
|
213 | 212 | mercurial/simplemerge.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob) |
|
214 | 213 | mercurial/sshpeer.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
215 | 214 | mercurial/sshserver.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
216 | 215 | mercurial/sslutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
217 | 216 | mercurial/statichttprepo.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) |
|
218 | 217 | mercurial/store.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
219 | 218 | mercurial/streamclone.py: error importing: <ImportError> No module named 'Queue' (error at scmutil.py:*) (glob) |
|
220 | 219 | mercurial/subrepo.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
221 | 220 | mercurial/tagmerge.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
222 | 221 | mercurial/tags.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
223 | 222 | mercurial/templatefilters.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
224 | 223 | mercurial/templatekw.py: error importing: <ImportError> No module named 'cStringIO' (error at patch.py:*) (glob) |
|
225 | 224 | mercurial/templater.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
226 | 225 | mercurial/transaction.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
227 | 226 | mercurial/ui.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
228 | 227 | mercurial/unionrepo.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob) |
|
229 | 228 | mercurial/url.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
230 | 229 | mercurial/util.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
231 | 230 | mercurial/verify.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob) |
|
232 | 231 | mercurial/win*.py: error importing module: <ImportError> No module named 'msvcrt' (line *) (glob) |
|
233 | 232 | mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) |
|
234 | 233 | mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
235 | 234 | tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
236 | 235 | tests/test-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
237 | 236 | tests/test-lrucachedict.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
238 | 237 | tests/test-parseindex*.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) |
|
239 | 238 | tests/test-propertycache.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) |
|
240 | 239 | tests/test-revlog-ancestry.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) |
|
241 | 240 | tests/test-status-inprocess.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) |
|
242 | 241 | tests/test-trusted.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
243 | 242 | |
|
244 | 243 | #endif |
@@ -1,203 +1,209 | |||
|
1 | 1 | """This unit test primarily tests parsers.parse_index2(). |
|
2 | 2 | |
|
3 | 3 | It also checks certain aspects of the parsers module as a whole. |
|
4 | 4 | """ |
|
5 | 5 | |
|
6 | from mercurial import parsers | |
|
7 |
from mercurial |
|
|
6 | from __future__ import absolute_import | |
|
7 | from mercurial import ( | |
|
8 | parsers, | |
|
9 | ) | |
|
10 | from mercurial.node import ( | |
|
11 | nullid, | |
|
12 | nullrev, | |
|
13 | ) | |
|
8 | 14 | import struct |
|
9 | 15 | import subprocess |
|
10 | 16 | import sys |
|
11 | 17 | |
|
12 | 18 | # original python implementation |
|
13 | 19 | def gettype(q): |
|
14 | 20 | return int(q & 0xFFFF) |
|
15 | 21 | |
|
16 | 22 | def offset_type(offset, type): |
|
17 | 23 | return long(long(offset) << 16 | type) |
|
18 | 24 | |
|
19 | 25 | indexformatng = ">Qiiiiii20s12x" |
|
20 | 26 | |
|
21 | 27 | def py_parseindex(data, inline) : |
|
22 | 28 | s = 64 |
|
23 | 29 | cache = None |
|
24 | 30 | index = [] |
|
25 | 31 | nodemap = {nullid: nullrev} |
|
26 | 32 | n = off = 0 |
|
27 | 33 | |
|
28 | 34 | l = len(data) - s |
|
29 | 35 | append = index.append |
|
30 | 36 | if inline: |
|
31 | 37 | cache = (0, data) |
|
32 | 38 | while off <= l: |
|
33 | 39 | e = struct.unpack(indexformatng, data[off:off + s]) |
|
34 | 40 | nodemap[e[7]] = n |
|
35 | 41 | append(e) |
|
36 | 42 | n += 1 |
|
37 | 43 | if e[1] < 0: |
|
38 | 44 | break |
|
39 | 45 | off += e[1] + s |
|
40 | 46 | else: |
|
41 | 47 | while off <= l: |
|
42 | 48 | e = struct.unpack(indexformatng, data[off:off + s]) |
|
43 | 49 | nodemap[e[7]] = n |
|
44 | 50 | append(e) |
|
45 | 51 | n += 1 |
|
46 | 52 | off += s |
|
47 | 53 | |
|
48 | 54 | e = list(index[0]) |
|
49 | 55 | type = gettype(e[0]) |
|
50 | 56 | e[0] = offset_type(0, type) |
|
51 | 57 | index[0] = tuple(e) |
|
52 | 58 | |
|
53 | 59 | # add the magic null revision at -1 |
|
54 | 60 | index.append((0, 0, 0, -1, -1, -1, -1, nullid)) |
|
55 | 61 | |
|
56 | 62 | return index, cache |
|
57 | 63 | |
|
58 | 64 | data_inlined = '\x00\x01\x00\x01\x00\x00\x00\x00\x00\x00\x01\x8c' \ |
|
59 | 65 | '\x00\x00\x04\x07\x00\x00\x00\x00\x00\x00\x15\x15\xff\xff\xff' \ |
|
60 | 66 | '\xff\xff\xff\xff\xff\xebG\x97\xb7\x1fB\x04\xcf\x13V\x81\tw\x1b' \ |
|
61 | 67 | 'w\xdduR\xda\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' \ |
|
62 | 68 | 'x\x9c\x9d\x93?O\xc30\x10\xc5\xf7|\x8a\xdb\x9a\xa8m\x06\xd8*\x95' \ |
|
63 | 69 | '\x81B\xa1\xa2\xa2R\xcb\x86Pd\x9a\x0b5$vd_\x04\xfd\xf6\x9c\xff@' \ |
|
64 | 70 | '\x11!\x0b\xd9\xec\xf7\xbbw\xe7gG6\xad6\x04\xdaN\xc0\x92\xa0$)' \ |
|
65 | 71 | '\xb1\x82\xa2\xd1%\x16\xa4\x8b7\xa9\xca\xd4-\xb2Y\x02\xfc\xc9' \ |
|
66 | 72 | '\xcaS\xf9\xaeX\xed\xb6\xd77Q\x02\x83\xd4\x19\xf5--Y\xea\xe1W' \ |
|
67 | 73 | '\xab\xed\x10\xceR\x0f_\xdf\xdf\r\xe1,\xf5\xf0\xcb\xf5 \xceR\x0f' \ |
|
68 | 74 | '_\xdc\x0e\x0e\xc3R\x0f_\xae\x96\x9b!\x9e\xa5\x1e\xbf\xdb,\x06' \ |
|
69 | 75 | '\xc7q\x9a/\x88\x82\xc3B\xea\xb5\xb4TJ\x93\xb6\x82\x0e\xe16\xe6' \ |
|
70 | 76 | 'KQ\xdb\xaf\xecG\xa3\xd1 \x01\xd3\x0b_^\xe8\xaa\xa0\xae\xad\xd1' \ |
|
71 | 77 | '&\xbef\x1bz\x08\xb0|\xc9Xz\x06\xf6Z\x91\x90J\xaa\x17\x90\xaa' \ |
|
72 | 78 | '\xd2\xa6\x11$5C\xcf\xba#\xa0\x03\x02*2\x92-\xfc\xb1\x94\xdf\xe2' \ |
|
73 | 79 | '\xae\xb8\'m\x8ey0^\x85\xd3\x82\xb4\xf0`:\x9c\x00\x8a\xfd\x01' \ |
|
74 | 80 | '\xb0\xc6\x86\x8b\xdd\xae\x80\xf3\xa9\x9fd\x16\n\x00R%\x1a\x06' \ |
|
75 | 81 | '\xe9\xd8b\x98\x1d\xf4\xf3+\x9bf\x01\xd8p\x1b\xf3.\xed\x9f^g\xc3' \ |
|
76 | 82 | '^\xd9W81T\xdb\xd5\x04sx|\xf2\xeb\xd6`%?x\xed"\x831\xbf\xf3\xdc' \ |
|
77 | 83 | 'b\xeb%gaY\xe1\xad\x9f\xb9f\'1w\xa9\xa5a\x83s\x82J\xb98\xbc4\x8b' \ |
|
78 | 84 | '\x83\x00\x9f$z\xb8#\xa5\xb1\xdf\x98\xd9\xec\x1b\x89O\xe3Ts\x9a4' \ |
|
79 | 85 | '\x17m\x8b\xfc\x8f\xa5\x95\x9a\xfc\xfa\xed,\xe5|\xa1\xfe\x15\xb9' \ |
|
80 | 86 | '\xbc\xb2\x93\x1f\xf2\x95\xff\xdf,\x1a\xc5\xe7\x17*\x93Oz:>\x0e' |
|
81 | 87 | |
|
82 | 88 | data_non_inlined = '\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01D\x19' \ |
|
83 | 89 | '\x00\x07e\x12\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff' \ |
|
84 | 90 | '\xff\xff\xff\xff\xd1\xf4\xbb\xb0\xbe\xfc\x13\xbd\x8c\xd3\x9d' \ |
|
85 | 91 | '\x0f\xcd\xd9;\x8c\x07\x8cJ/\x00\x00\x00\x00\x00\x00\x00\x00\x00' \ |
|
86 | 92 | '\x00\x00\x00\x00\x00\x00\x01D\x19\x00\x00\x00\x00\x00\xdf\x00' \ |
|
87 | 93 | '\x00\x01q\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\xff' \ |
|
88 | 94 | '\xff\xff\xff\xc1\x12\xb9\x04\x96\xa4Z1t\x91\xdfsJ\x90\xf0\x9bh' \ |
|
89 | 95 | '\x07l&\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' \ |
|
90 | 96 | '\x00\x01D\xf8\x00\x00\x00\x00\x01\x1b\x00\x00\x01\xb8\x00\x00' \ |
|
91 | 97 | '\x00\x01\x00\x00\x00\x02\x00\x00\x00\x01\xff\xff\xff\xff\x02\n' \ |
|
92 | 98 | '\x0e\xc6&\xa1\x92\xae6\x0b\x02i\xfe-\xe5\xbao\x05\xd1\xe7\x00' \ |
|
93 | 99 | '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01F' \ |
|
94 | 100 | '\x13\x00\x00\x00\x00\x01\xec\x00\x00\x03\x06\x00\x00\x00\x01' \ |
|
95 | 101 | '\x00\x00\x00\x03\x00\x00\x00\x02\xff\xff\xff\xff\x12\xcb\xeby1' \ |
|
96 | 102 | '\xb6\r\x98B\xcb\x07\xbd`\x8f\x92\xd9\xc4\x84\xbdK\x00\x00\x00' \ |
|
97 | 103 | '\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
98 | 104 | |
|
99 | 105 | def parse_index2(data, inline): |
|
100 | 106 | index, chunkcache = parsers.parse_index2(data, inline) |
|
101 | 107 | return list(index), chunkcache |
|
102 | 108 | |
|
103 | 109 | def importparsers(hexversion): |
|
104 | 110 | """Import mercurial.parsers with the given sys.hexversion.""" |
|
105 | 111 | # The file parsers.c inspects sys.hexversion to determine the version |
|
106 | 112 | # of the currently-running Python interpreter, so we monkey-patch |
|
107 | 113 | # sys.hexversion to simulate using different versions. |
|
108 | 114 | code = ("import sys; sys.hexversion=%s; " |
|
109 | 115 | "import mercurial.parsers" % hexversion) |
|
110 | 116 | cmd = "python -c \"%s\"" % code |
|
111 | 117 | # We need to do these tests inside a subprocess because parser.c's |
|
112 | 118 | # version-checking code happens inside the module init function, and |
|
113 | 119 | # when using reload() to reimport an extension module, "The init function |
|
114 | 120 | # of extension modules is not called a second time" |
|
115 | 121 | # (from http://docs.python.org/2/library/functions.html?#reload). |
|
116 | 122 | p = subprocess.Popen(cmd, shell=True, |
|
117 | 123 | stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
|
118 | 124 | return p.communicate() # returns stdout, stderr |
|
119 | 125 | |
|
120 | 126 | def printhexfail(testnumber, hexversion, stdout, expected): |
|
121 | 127 | try: |
|
122 | 128 | hexstring = hex(hexversion) |
|
123 | 129 | except TypeError: |
|
124 | 130 | hexstring = None |
|
125 | 131 | print ("FAILED: version test #%s with Python %s and patched " |
|
126 | 132 | "sys.hexversion %r (%r):\n Expected %s but got:\n-->'%s'\n" % |
|
127 | 133 | (testnumber, sys.version_info, hexversion, hexstring, expected, |
|
128 | 134 | stdout)) |
|
129 | 135 | |
|
130 | 136 | def testversionokay(testnumber, hexversion): |
|
131 | 137 | stdout, stderr = importparsers(hexversion) |
|
132 | 138 | if stdout: |
|
133 | 139 | printhexfail(testnumber, hexversion, stdout, expected="no stdout") |
|
134 | 140 | |
|
135 | 141 | def testversionfail(testnumber, hexversion): |
|
136 | 142 | stdout, stderr = importparsers(hexversion) |
|
137 | 143 | # We include versionerrortext to distinguish from other ImportErrors. |
|
138 | 144 | errtext = "ImportError: %s" % parsers.versionerrortext |
|
139 | 145 | if errtext not in stdout: |
|
140 | 146 | printhexfail(testnumber, hexversion, stdout, |
|
141 | 147 | expected="stdout to contain %r" % errtext) |
|
142 | 148 | |
|
143 | 149 | def makehex(major, minor, micro): |
|
144 | 150 | return int("%x%02x%02x00" % (major, minor, micro), 16) |
|
145 | 151 | |
|
146 | 152 | def runversiontests(): |
|
147 | 153 | """Check the version-detection logic when importing parsers.""" |
|
148 | 154 | info = sys.version_info |
|
149 | 155 | major, minor, micro = info[0], info[1], info[2] |
|
150 | 156 | # Test same major-minor versions. |
|
151 | 157 | testversionokay(1, makehex(major, minor, micro)) |
|
152 | 158 | testversionokay(2, makehex(major, minor, micro + 1)) |
|
153 | 159 | # Test different major-minor versions. |
|
154 | 160 | testversionfail(3, makehex(major + 1, minor, micro)) |
|
155 | 161 | testversionfail(4, makehex(major, minor + 1, micro)) |
|
156 | 162 | testversionfail(5, "'foo'") |
|
157 | 163 | |
|
158 | 164 | def runtest() : |
|
159 | 165 | # Only test the version-detection logic if it is present. |
|
160 | 166 | try: |
|
161 | 167 | parsers.versionerrortext |
|
162 | 168 | except AttributeError: |
|
163 | 169 | pass |
|
164 | 170 | else: |
|
165 | 171 | runversiontests() |
|
166 | 172 | |
|
167 | 173 | # Check that parse_index2() raises TypeError on bad arguments. |
|
168 | 174 | try: |
|
169 | 175 | parse_index2(0, True) |
|
170 | 176 | except TypeError: |
|
171 | 177 | pass |
|
172 | 178 | else: |
|
173 | 179 | print "Expected to get TypeError." |
|
174 | 180 | |
|
175 | 181 | # Check parsers.parse_index2() on an index file against the original |
|
176 | 182 | # Python implementation of parseindex, both with and without inlined data. |
|
177 | 183 | |
|
178 | 184 | py_res_1 = py_parseindex(data_inlined, True) |
|
179 | 185 | c_res_1 = parse_index2(data_inlined, True) |
|
180 | 186 | |
|
181 | 187 | py_res_2 = py_parseindex(data_non_inlined, False) |
|
182 | 188 | c_res_2 = parse_index2(data_non_inlined, False) |
|
183 | 189 | |
|
184 | 190 | if py_res_1 != c_res_1: |
|
185 | 191 | print "Parse index result (with inlined data) differs!" |
|
186 | 192 | |
|
187 | 193 | if py_res_2 != c_res_2: |
|
188 | 194 | print "Parse index result (no inlined data) differs!" |
|
189 | 195 | |
|
190 | 196 | ix = parsers.parse_index2(data_inlined, True)[0] |
|
191 | 197 | for i, r in enumerate(ix): |
|
192 | 198 | if r[7] == nullid: |
|
193 | 199 | i = -1 |
|
194 | 200 | try: |
|
195 | 201 | if ix[r[7]] != i: |
|
196 | 202 | print 'Reverse lookup inconsistent for %r' % r[7].encode('hex') |
|
197 | 203 | except TypeError: |
|
198 | 204 | # pure version doesn't support this |
|
199 | 205 | break |
|
200 | 206 | |
|
201 | 207 | print "done" |
|
202 | 208 | |
|
203 | 209 | runtest() |
General Comments 0
You need to be logged in to leave comments.
Login now