##// END OF EJS Templates
py3: use unicode literals in pure/osutil.py...
Pulkit Goyal -
r29698:f15f3150 default
parent child Browse files
Show More
@@ -1,361 +1,361
1 1 # osutil.py - pure Python version of osutil.c
2 2 #
3 3 # Copyright 2009 Matt Mackall <mpm@selenic.com> and others
4 4 #
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2 or any later version.
7 7
8 8 from __future__ import absolute_import
9 9
10 10 import ctypes
11 11 import ctypes.util
12 12 import os
13 13 import socket
14 14 import stat as statmod
15 15 import sys
16 16
17 17 from . import policy
18 18 modulepolicy = policy.policy
19 19 policynocffi = policy.policynocffi
20 20
21 21 def _mode_to_kind(mode):
22 22 if statmod.S_ISREG(mode):
23 23 return statmod.S_IFREG
24 24 if statmod.S_ISDIR(mode):
25 25 return statmod.S_IFDIR
26 26 if statmod.S_ISLNK(mode):
27 27 return statmod.S_IFLNK
28 28 if statmod.S_ISBLK(mode):
29 29 return statmod.S_IFBLK
30 30 if statmod.S_ISCHR(mode):
31 31 return statmod.S_IFCHR
32 32 if statmod.S_ISFIFO(mode):
33 33 return statmod.S_IFIFO
34 34 if statmod.S_ISSOCK(mode):
35 35 return statmod.S_IFSOCK
36 36 return mode
37 37
38 38 def listdirpure(path, stat=False, skip=None):
39 39 '''listdir(path, stat=False) -> list_of_tuples
40 40
41 41 Return a sorted list containing information about the entries
42 42 in the directory.
43 43
44 44 If stat is True, each element is a 3-tuple:
45 45
46 46 (name, type, stat object)
47 47
48 48 Otherwise, each element is a 2-tuple:
49 49
50 50 (name, type)
51 51 '''
52 52 result = []
53 53 prefix = path
54 54 if not prefix.endswith(os.sep):
55 55 prefix += os.sep
56 56 names = os.listdir(path)
57 57 names.sort()
58 58 for fn in names:
59 59 st = os.lstat(prefix + fn)
60 60 if fn == skip and statmod.S_ISDIR(st.st_mode):
61 61 return []
62 62 if stat:
63 63 result.append((fn, _mode_to_kind(st.st_mode), st))
64 64 else:
65 65 result.append((fn, _mode_to_kind(st.st_mode)))
66 66 return result
67 67
68 68 ffi = None
69 69 if modulepolicy not in policynocffi and sys.platform == 'darwin':
70 70 try:
71 71 from _osutil_cffi import ffi, lib
72 72 except ImportError:
73 73 if modulepolicy == 'cffi': # strict cffi import
74 74 raise
75 75
76 76 if sys.platform == 'darwin' and ffi is not None:
77 77 listdir_batch_size = 4096
78 78 # tweakable number, only affects performance, which chunks
79 79 # of bytes do we get back from getattrlistbulk
80 80
81 81 attrkinds = [None] * 20 # we need the max no for enum VXXX, 20 is plenty
82 82
83 83 attrkinds[lib.VREG] = statmod.S_IFREG
84 84 attrkinds[lib.VDIR] = statmod.S_IFDIR
85 85 attrkinds[lib.VLNK] = statmod.S_IFLNK
86 86 attrkinds[lib.VBLK] = statmod.S_IFBLK
87 87 attrkinds[lib.VCHR] = statmod.S_IFCHR
88 88 attrkinds[lib.VFIFO] = statmod.S_IFIFO
89 89 attrkinds[lib.VSOCK] = statmod.S_IFSOCK
90 90
91 91 class stat_res(object):
92 92 def __init__(self, st_mode, st_mtime, st_size):
93 93 self.st_mode = st_mode
94 94 self.st_mtime = st_mtime
95 95 self.st_size = st_size
96 96
97 97 tv_sec_ofs = ffi.offsetof("struct timespec", "tv_sec")
98 98 buf = ffi.new("char[]", listdir_batch_size)
99 99
100 100 def listdirinternal(dfd, req, stat, skip):
101 101 ret = []
102 102 while True:
103 103 r = lib.getattrlistbulk(dfd, req, buf, listdir_batch_size, 0)
104 104 if r == 0:
105 105 break
106 106 if r == -1:
107 107 raise OSError(ffi.errno, os.strerror(ffi.errno))
108 108 cur = ffi.cast("val_attrs_t*", buf)
109 109 for i in range(r):
110 110 lgt = cur.length
111 111 assert lgt == ffi.cast('uint32_t*', cur)[0]
112 112 ofs = cur.name_info.attr_dataoffset
113 113 str_lgt = cur.name_info.attr_length
114 114 base_ofs = ffi.offsetof('val_attrs_t', 'name_info')
115 115 name = str(ffi.buffer(ffi.cast("char*", cur) + base_ofs + ofs,
116 116 str_lgt - 1))
117 117 tp = attrkinds[cur.obj_type]
118 118 if name == "." or name == "..":
119 119 continue
120 120 if skip == name and tp == statmod.S_ISDIR:
121 121 return []
122 122 if stat:
123 123 mtime = cur.time.tv_sec
124 124 mode = (cur.accessmask & ~lib.S_IFMT)| tp
125 125 ret.append((name, tp, stat_res(st_mode=mode, st_mtime=mtime,
126 126 st_size=cur.datalength)))
127 127 else:
128 128 ret.append((name, tp))
129 129 cur += lgt
130 130 return ret
131 131
132 132 def listdir(path, stat=False, skip=None):
133 133 req = ffi.new("struct attrlist*")
134 134 req.bitmapcount = lib.ATTR_BIT_MAP_COUNT
135 135 req.commonattr = (lib.ATTR_CMN_RETURNED_ATTRS |
136 136 lib.ATTR_CMN_NAME |
137 137 lib.ATTR_CMN_OBJTYPE |
138 138 lib.ATTR_CMN_ACCESSMASK |
139 139 lib.ATTR_CMN_MODTIME)
140 140 req.fileattr = lib.ATTR_FILE_DATALENGTH
141 141 dfd = lib.open(path, lib.O_RDONLY, 0)
142 142 if dfd == -1:
143 143 raise OSError(ffi.errno, os.strerror(ffi.errno))
144 144
145 145 try:
146 146 ret = listdirinternal(dfd, req, stat, skip)
147 147 finally:
148 148 try:
149 149 lib.close(dfd)
150 150 except BaseException:
151 151 pass # we ignore all the errors from closing, not
152 152 # much we can do about that
153 153 return ret
154 154 else:
155 155 listdir = listdirpure
156 156
157 157 if os.name != 'nt':
158 158 posixfile = open
159 159
160 160 _SCM_RIGHTS = 0x01
161 161 _socklen_t = ctypes.c_uint
162 162
163 163 if sys.platform == 'linux2':
164 164 # socket.h says "the type should be socklen_t but the definition of
165 165 # the kernel is incompatible with this."
166 166 _cmsg_len_t = ctypes.c_size_t
167 167 _msg_controllen_t = ctypes.c_size_t
168 168 _msg_iovlen_t = ctypes.c_size_t
169 169 else:
170 170 _cmsg_len_t = _socklen_t
171 171 _msg_controllen_t = _socklen_t
172 172 _msg_iovlen_t = ctypes.c_int
173 173
174 174 class _iovec(ctypes.Structure):
175 175 _fields_ = [
176 ('iov_base', ctypes.c_void_p),
177 ('iov_len', ctypes.c_size_t),
176 (u'iov_base', ctypes.c_void_p),
177 (u'iov_len', ctypes.c_size_t),
178 178 ]
179 179
180 180 class _msghdr(ctypes.Structure):
181 181 _fields_ = [
182 ('msg_name', ctypes.c_void_p),
183 ('msg_namelen', _socklen_t),
184 ('msg_iov', ctypes.POINTER(_iovec)),
185 ('msg_iovlen', _msg_iovlen_t),
186 ('msg_control', ctypes.c_void_p),
187 ('msg_controllen', _msg_controllen_t),
188 ('msg_flags', ctypes.c_int),
182 (u'msg_name', ctypes.c_void_p),
183 (u'msg_namelen', _socklen_t),
184 (u'msg_iov', ctypes.POINTER(_iovec)),
185 (u'msg_iovlen', _msg_iovlen_t),
186 (u'msg_control', ctypes.c_void_p),
187 (u'msg_controllen', _msg_controllen_t),
188 (u'msg_flags', ctypes.c_int),
189 189 ]
190 190
191 191 class _cmsghdr(ctypes.Structure):
192 192 _fields_ = [
193 ('cmsg_len', _cmsg_len_t),
194 ('cmsg_level', ctypes.c_int),
195 ('cmsg_type', ctypes.c_int),
196 ('cmsg_data', ctypes.c_ubyte * 0),
193 (u'cmsg_len', _cmsg_len_t),
194 (u'cmsg_level', ctypes.c_int),
195 (u'cmsg_type', ctypes.c_int),
196 (u'cmsg_data', ctypes.c_ubyte * 0),
197 197 ]
198 198
199 _libc = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
199 _libc = ctypes.CDLL(ctypes.util.find_library(u'c'), use_errno=True)
200 200 _recvmsg = getattr(_libc, 'recvmsg', None)
201 201 if _recvmsg:
202 202 _recvmsg.restype = getattr(ctypes, 'c_ssize_t', ctypes.c_long)
203 203 _recvmsg.argtypes = (ctypes.c_int, ctypes.POINTER(_msghdr),
204 204 ctypes.c_int)
205 205 else:
206 206 # recvmsg isn't always provided by libc; such systems are unsupported
207 207 def _recvmsg(sockfd, msg, flags):
208 208 raise NotImplementedError('unsupported platform')
209 209
210 210 def _CMSG_FIRSTHDR(msgh):
211 211 if msgh.msg_controllen < ctypes.sizeof(_cmsghdr):
212 212 return
213 213 cmsgptr = ctypes.cast(msgh.msg_control, ctypes.POINTER(_cmsghdr))
214 214 return cmsgptr.contents
215 215
216 216 # The pure version is less portable than the native version because the
217 217 # handling of socket ancillary data heavily depends on C preprocessor.
218 218 # Also, some length fields are wrongly typed in Linux kernel.
219 219 def recvfds(sockfd):
220 220 """receive list of file descriptors via socket"""
221 221 dummy = (ctypes.c_ubyte * 1)()
222 222 iov = _iovec(ctypes.cast(dummy, ctypes.c_void_p), ctypes.sizeof(dummy))
223 223 cbuf = ctypes.create_string_buffer(256)
224 224 msgh = _msghdr(None, 0,
225 225 ctypes.pointer(iov), 1,
226 226 ctypes.cast(cbuf, ctypes.c_void_p), ctypes.sizeof(cbuf),
227 227 0)
228 228 r = _recvmsg(sockfd, ctypes.byref(msgh), 0)
229 229 if r < 0:
230 230 e = ctypes.get_errno()
231 231 raise OSError(e, os.strerror(e))
232 232 # assumes that the first cmsg has fds because it isn't easy to write
233 233 # portable CMSG_NXTHDR() with ctypes.
234 234 cmsg = _CMSG_FIRSTHDR(msgh)
235 235 if not cmsg:
236 236 return []
237 237 if (cmsg.cmsg_level != socket.SOL_SOCKET or
238 238 cmsg.cmsg_type != _SCM_RIGHTS):
239 239 return []
240 240 rfds = ctypes.cast(cmsg.cmsg_data, ctypes.POINTER(ctypes.c_int))
241 241 rfdscount = ((cmsg.cmsg_len - _cmsghdr.cmsg_data.offset) /
242 242 ctypes.sizeof(ctypes.c_int))
243 243 return [rfds[i] for i in xrange(rfdscount)]
244 244
245 245 else:
246 246 import msvcrt
247 247
248 248 _kernel32 = ctypes.windll.kernel32
249 249
250 250 _DWORD = ctypes.c_ulong
251 251 _LPCSTR = _LPSTR = ctypes.c_char_p
252 252 _HANDLE = ctypes.c_void_p
253 253
254 254 _INVALID_HANDLE_VALUE = _HANDLE(-1).value
255 255
256 256 # CreateFile
257 257 _FILE_SHARE_READ = 0x00000001
258 258 _FILE_SHARE_WRITE = 0x00000002
259 259 _FILE_SHARE_DELETE = 0x00000004
260 260
261 261 _CREATE_ALWAYS = 2
262 262 _OPEN_EXISTING = 3
263 263 _OPEN_ALWAYS = 4
264 264
265 265 _GENERIC_READ = 0x80000000
266 266 _GENERIC_WRITE = 0x40000000
267 267
268 268 _FILE_ATTRIBUTE_NORMAL = 0x80
269 269
270 270 # open_osfhandle flags
271 271 _O_RDONLY = 0x0000
272 272 _O_RDWR = 0x0002
273 273 _O_APPEND = 0x0008
274 274
275 275 _O_TEXT = 0x4000
276 276 _O_BINARY = 0x8000
277 277
278 278 # types of parameters of C functions used (required by pypy)
279 279
280 280 _kernel32.CreateFileA.argtypes = [_LPCSTR, _DWORD, _DWORD, ctypes.c_void_p,
281 281 _DWORD, _DWORD, _HANDLE]
282 282 _kernel32.CreateFileA.restype = _HANDLE
283 283
284 284 def _raiseioerror(name):
285 285 err = ctypes.WinError()
286 286 raise IOError(err.errno, '%s: %s' % (name, err.strerror))
287 287
288 288 class posixfile(object):
289 289 '''a file object aiming for POSIX-like semantics
290 290
291 291 CPython's open() returns a file that was opened *without* setting the
292 292 _FILE_SHARE_DELETE flag, which causes rename and unlink to abort.
293 293 This even happens if any hardlinked copy of the file is in open state.
294 294 We set _FILE_SHARE_DELETE here, so files opened with posixfile can be
295 295 renamed and deleted while they are held open.
296 296 Note that if a file opened with posixfile is unlinked, the file
297 297 remains but cannot be opened again or be recreated under the same name,
298 298 until all reading processes have closed the file.'''
299 299
300 300 def __init__(self, name, mode='r', bufsize=-1):
301 301 if 'b' in mode:
302 302 flags = _O_BINARY
303 303 else:
304 304 flags = _O_TEXT
305 305
306 306 m0 = mode[0]
307 307 if m0 == 'r' and '+' not in mode:
308 308 flags |= _O_RDONLY
309 309 access = _GENERIC_READ
310 310 else:
311 311 # work around http://support.microsoft.com/kb/899149 and
312 312 # set _O_RDWR for 'w' and 'a', even if mode has no '+'
313 313 flags |= _O_RDWR
314 314 access = _GENERIC_READ | _GENERIC_WRITE
315 315
316 316 if m0 == 'r':
317 317 creation = _OPEN_EXISTING
318 318 elif m0 == 'w':
319 319 creation = _CREATE_ALWAYS
320 320 elif m0 == 'a':
321 321 creation = _OPEN_ALWAYS
322 322 flags |= _O_APPEND
323 323 else:
324 324 raise ValueError("invalid mode: %s" % mode)
325 325
326 326 fh = _kernel32.CreateFileA(name, access,
327 327 _FILE_SHARE_READ | _FILE_SHARE_WRITE | _FILE_SHARE_DELETE,
328 328 None, creation, _FILE_ATTRIBUTE_NORMAL, None)
329 329 if fh == _INVALID_HANDLE_VALUE:
330 330 _raiseioerror(name)
331 331
332 332 fd = msvcrt.open_osfhandle(fh, flags)
333 333 if fd == -1:
334 334 _kernel32.CloseHandle(fh)
335 335 _raiseioerror(name)
336 336
337 337 f = os.fdopen(fd, mode, bufsize)
338 338 # unfortunately, f.name is '<fdopen>' at this point -- so we store
339 339 # the name on this wrapper. We cannot just assign to f.name,
340 340 # because that attribute is read-only.
341 341 object.__setattr__(self, 'name', name)
342 342 object.__setattr__(self, '_file', f)
343 343
344 344 def __iter__(self):
345 345 return self._file
346 346
347 347 def __getattr__(self, name):
348 348 return getattr(self._file, name)
349 349
350 350 def __setattr__(self, name, value):
351 351 '''mimics the read-only attributes of Python file objects
352 352 by raising 'TypeError: readonly attribute' if someone tries:
353 353 f = posixfile('foo.txt')
354 354 f.name = 'bla' '''
355 355 return self._file.__setattr__(name, value)
356 356
357 357 def __enter__(self):
358 358 return self._file.__enter__()
359 359
360 360 def __exit__(self, exc_type, exc_value, exc_tb):
361 361 return self._file.__exit__(exc_type, exc_value, exc_tb)
@@ -1,176 +1,174
1 1 #require test-repo
2 2
3 3 $ . "$TESTDIR/helpers-testrepo.sh"
4 4 $ cd "$TESTDIR"/..
5 5
6 6 $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
7 7 hgext/fsmonitor/pywatchman/__init__.py not using absolute_import
8 8 hgext/fsmonitor/pywatchman/__init__.py requires print_function
9 9 hgext/fsmonitor/pywatchman/capabilities.py not using absolute_import
10 10 hgext/fsmonitor/pywatchman/pybser.py not using absolute_import
11 11 i18n/check-translation.py not using absolute_import
12 12 setup.py not using absolute_import
13 13 tests/test-demandimport.py not using absolute_import
14 14
15 15 #if py3exe
16 16 $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py
17 17 doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
18 18 hgext/acl.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
19 19 hgext/automv.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
20 20 hgext/blackbox.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
21 21 hgext/bugzilla.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
22 22 hgext/censor.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
23 23 hgext/chgserver.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
24 24 hgext/children.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
25 25 hgext/churn.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
26 26 hgext/clonebundles.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
27 27 hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
28 28 hgext/convert/bzr.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
29 29 hgext/convert/common.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
30 30 hgext/convert/convcmd.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
31 31 hgext/convert/cvs.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
32 32 hgext/convert/cvsps.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
33 33 hgext/convert/darcs.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
34 34 hgext/convert/filemap.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
35 35 hgext/convert/git.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
36 36 hgext/convert/gnuarch.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
37 37 hgext/convert/hg.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
38 38 hgext/convert/monotone.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
39 39 hgext/convert/p4.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
40 40 hgext/convert/subversion.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
41 41 hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *) (glob)
42 42 hgext/eol.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
43 43 hgext/extdiff.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
44 44 hgext/factotum.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
45 45 hgext/fetch.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
46 46 hgext/fsmonitor/state.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
47 47 hgext/fsmonitor/watchmanclient.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
48 48 hgext/gpg.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
49 49 hgext/graphlog.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
50 50 hgext/hgk.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
51 51 hgext/highlight/highlight.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
52 52 hgext/histedit.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
53 53 hgext/journal.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
54 54 hgext/keyword.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
55 55 hgext/largefiles/basestore.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
56 56 hgext/largefiles/lfcommands.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
57 57 hgext/largefiles/lfutil.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
58 58 hgext/largefiles/localstore.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
59 59 hgext/largefiles/overrides.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
60 60 hgext/largefiles/proto.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
61 61 hgext/largefiles/remotestore.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
62 62 hgext/largefiles/reposetup.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
63 63 hgext/largefiles/storefactory.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
64 64 hgext/largefiles/uisetup.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
65 65 hgext/largefiles/wirestore.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *) (glob)
66 66 hgext/mq.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
67 67 hgext/notify.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
68 68 hgext/pager.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
69 69 hgext/patchbomb.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
70 70 hgext/purge.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
71 71 hgext/rebase.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
72 72 hgext/record.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
73 73 hgext/relink.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
74 74 hgext/schemes.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
75 75 hgext/share.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
76 76 hgext/shelve.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
77 77 hgext/strip.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
78 78 hgext/transplant.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
79 79 hgext/win32mbcs.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
80 80 hgext/win32text.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
81 81 mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
82 82 mercurial/bookmarks.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
83 83 mercurial/branchmap.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
84 84 mercurial/bundle2.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
85 85 mercurial/bundlerepo.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
86 86 mercurial/byterange.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
87 87 mercurial/changegroup.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
88 88 mercurial/changelog.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
89 89 mercurial/cmdutil.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
90 90 mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
91 91 mercurial/commandserver.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
92 92 mercurial/config.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
93 93 mercurial/context.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
94 94 mercurial/copies.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
95 95 mercurial/crecord.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
96 96 mercurial/dagparser.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
97 97 mercurial/dagutil.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
98 98 mercurial/destutil.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
99 99 mercurial/dirstate.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
100 100 mercurial/discovery.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
101 101 mercurial/dispatch.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*) (glob)
102 102 mercurial/exchange.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
103 103 mercurial/extensions.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
104 104 mercurial/fancyopts.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
105 105 mercurial/filelog.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
106 106 mercurial/filemerge.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
107 107 mercurial/fileset.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
108 108 mercurial/formatter.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
109 109 mercurial/graphmod.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
110 110 mercurial/hbisect.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
111 111 mercurial/help.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
112 112 mercurial/hg.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
113 113 mercurial/hgweb/common.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
114 114 mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
115 115 mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
116 116 mercurial/hgweb/protocol.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
117 117 mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
118 118 mercurial/hgweb/server.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
119 119 mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
120 120 mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
121 121 mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
122 122 mercurial/hook.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
123 123 mercurial/httpconnection.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
124 124 mercurial/httppeer.py: error importing: <TypeError> str expected, not bytes (error at i18n.py:*) (glob)
125 mercurial/keepalive.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
126 mercurial/localrepo.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
127 mercurial/lock.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
128 mercurial/mail.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
125 mercurial/keepalive.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
126 mercurial/localrepo.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
127 mercurial/lock.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
128 mercurial/mail.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
129 129 mercurial/manifest.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
130 mercurial/match.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
130 mercurial/match.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
131 131 mercurial/mdiff.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
132 mercurial/merge.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
133 mercurial/minirst.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
134 mercurial/namespaces.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
132 mercurial/merge.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
133 mercurial/minirst.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
134 mercurial/namespaces.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
135 135 mercurial/obsolete.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
136 mercurial/patch.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
137 mercurial/pathutil.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
138 mercurial/peer.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
136 mercurial/patch.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
137 mercurial/pathutil.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
138 mercurial/peer.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
139 139 mercurial/pure/mpatch.py: error importing module: <ImportError> cannot import name 'pycompat' (line *) (glob)
140 140 mercurial/pure/osutil.py: error importing module: <ImportError> cannot import name 'policy' (line *) (glob)
141 141 mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'mercurial.pure.node' (line *) (glob)
142 mercurial/pushkey.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
143 mercurial/pvec.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
144 mercurial/registrar.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
142 mercurial/pushkey.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
143 mercurial/pvec.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
144 mercurial/registrar.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
145 145 mercurial/repair.py: error importing module: <SyntaxError> invalid syntax (bundle2.py, line *) (line *) (glob)
146 mercurial/repoview.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
147 mercurial/revlog.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
148 mercurial/revset.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
149 mercurial/scmposix.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
150 mercurial/scmutil.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
146 mercurial/repoview.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
147 mercurial/revlog.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
148 mercurial/revset.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
149 mercurial/scmutil.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
151 150 mercurial/scmwindows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob)
152 mercurial/similar.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
153 mercurial/simplemerge.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
154 mercurial/sshpeer.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
155 mercurial/sshserver.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
156 mercurial/sslutil.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
157 mercurial/statichttprepo.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
158 mercurial/store.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
159 mercurial/streamclone.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
160 mercurial/subrepo.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
161 mercurial/tagmerge.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
162 mercurial/tags.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
163 mercurial/templatefilters.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
164 mercurial/templatekw.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
165 mercurial/templater.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
166 mercurial/transaction.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
167 mercurial/ui.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
168 mercurial/unionrepo.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
169 mercurial/url.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
170 mercurial/util.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
171 mercurial/verify.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
151 mercurial/similar.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
152 mercurial/simplemerge.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
153 mercurial/sshpeer.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
154 mercurial/sshserver.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
155 mercurial/sslutil.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
156 mercurial/statichttprepo.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
157 mercurial/store.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
158 mercurial/streamclone.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
159 mercurial/subrepo.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
160 mercurial/tagmerge.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
161 mercurial/tags.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
162 mercurial/templatefilters.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
163 mercurial/templatekw.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
164 mercurial/templater.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
165 mercurial/transaction.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
166 mercurial/ui.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
167 mercurial/unionrepo.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
168 mercurial/url.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
169 mercurial/verify.py: error importing: <TypeError> attribute name must be string, not 'bytes' (error at mdiff.py:*) (glob)
172 170 mercurial/win32.py: error importing module: <ImportError> No module named 'msvcrt' (line *) (glob)
173 171 mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob)
174 172 mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle2.py, line *) (line *) (glob)
175 173
176 174 #endif
General Comments 0
You need to be logged in to leave comments. Login now