##// END OF EJS Templates
commandserver: use absolute_import
Yuya Nishihara -
r27351:28e50c4b default
parent child Browse files
Show More
@@ -1,354 +1,366 b''
1 # commandserver.py - communicate with Mercurial's API over a pipe
1 # commandserver.py - communicate with Mercurial's API over a pipe
2 #
2 #
3 # Copyright Matt Mackall <mpm@selenic.com>
3 # Copyright Matt Mackall <mpm@selenic.com>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 from i18n import _
8 from __future__ import absolute_import
9
10 import SocketServer
11 import errno
12 import os
9 import struct
13 import struct
10 import sys, os, errno, traceback, SocketServer
14 import sys
11 import dispatch, encoding, util, error
15 import traceback
16
17 from .i18n import _
18 from . import (
19 dispatch,
20 encoding,
21 error,
22 util,
23 )
12
24
13 logfile = None
25 logfile = None
14
26
15 def log(*args):
27 def log(*args):
16 if not logfile:
28 if not logfile:
17 return
29 return
18
30
19 for a in args:
31 for a in args:
20 logfile.write(str(a))
32 logfile.write(str(a))
21
33
22 logfile.flush()
34 logfile.flush()
23
35
24 class channeledoutput(object):
36 class channeledoutput(object):
25 """
37 """
26 Write data to out in the following format:
38 Write data to out in the following format:
27
39
28 data length (unsigned int),
40 data length (unsigned int),
29 data
41 data
30 """
42 """
31 def __init__(self, out, channel):
43 def __init__(self, out, channel):
32 self.out = out
44 self.out = out
33 self.channel = channel
45 self.channel = channel
34
46
35 def write(self, data):
47 def write(self, data):
36 if not data:
48 if not data:
37 return
49 return
38 self.out.write(struct.pack('>cI', self.channel, len(data)))
50 self.out.write(struct.pack('>cI', self.channel, len(data)))
39 self.out.write(data)
51 self.out.write(data)
40 self.out.flush()
52 self.out.flush()
41
53
42 def __getattr__(self, attr):
54 def __getattr__(self, attr):
43 if attr in ('isatty', 'fileno'):
55 if attr in ('isatty', 'fileno'):
44 raise AttributeError(attr)
56 raise AttributeError(attr)
45 return getattr(self.out, attr)
57 return getattr(self.out, attr)
46
58
47 class channeledinput(object):
59 class channeledinput(object):
48 """
60 """
49 Read data from in_.
61 Read data from in_.
50
62
51 Requests for input are written to out in the following format:
63 Requests for input are written to out in the following format:
52 channel identifier - 'I' for plain input, 'L' line based (1 byte)
64 channel identifier - 'I' for plain input, 'L' line based (1 byte)
53 how many bytes to send at most (unsigned int),
65 how many bytes to send at most (unsigned int),
54
66
55 The client replies with:
67 The client replies with:
56 data length (unsigned int), 0 meaning EOF
68 data length (unsigned int), 0 meaning EOF
57 data
69 data
58 """
70 """
59
71
60 maxchunksize = 4 * 1024
72 maxchunksize = 4 * 1024
61
73
62 def __init__(self, in_, out, channel):
74 def __init__(self, in_, out, channel):
63 self.in_ = in_
75 self.in_ = in_
64 self.out = out
76 self.out = out
65 self.channel = channel
77 self.channel = channel
66
78
67 def read(self, size=-1):
79 def read(self, size=-1):
68 if size < 0:
80 if size < 0:
69 # if we need to consume all the clients input, ask for 4k chunks
81 # if we need to consume all the clients input, ask for 4k chunks
70 # so the pipe doesn't fill up risking a deadlock
82 # so the pipe doesn't fill up risking a deadlock
71 size = self.maxchunksize
83 size = self.maxchunksize
72 s = self._read(size, self.channel)
84 s = self._read(size, self.channel)
73 buf = s
85 buf = s
74 while s:
86 while s:
75 s = self._read(size, self.channel)
87 s = self._read(size, self.channel)
76 buf += s
88 buf += s
77
89
78 return buf
90 return buf
79 else:
91 else:
80 return self._read(size, self.channel)
92 return self._read(size, self.channel)
81
93
82 def _read(self, size, channel):
94 def _read(self, size, channel):
83 if not size:
95 if not size:
84 return ''
96 return ''
85 assert size > 0
97 assert size > 0
86
98
87 # tell the client we need at most size bytes
99 # tell the client we need at most size bytes
88 self.out.write(struct.pack('>cI', channel, size))
100 self.out.write(struct.pack('>cI', channel, size))
89 self.out.flush()
101 self.out.flush()
90
102
91 length = self.in_.read(4)
103 length = self.in_.read(4)
92 length = struct.unpack('>I', length)[0]
104 length = struct.unpack('>I', length)[0]
93 if not length:
105 if not length:
94 return ''
106 return ''
95 else:
107 else:
96 return self.in_.read(length)
108 return self.in_.read(length)
97
109
98 def readline(self, size=-1):
110 def readline(self, size=-1):
99 if size < 0:
111 if size < 0:
100 size = self.maxchunksize
112 size = self.maxchunksize
101 s = self._read(size, 'L')
113 s = self._read(size, 'L')
102 buf = s
114 buf = s
103 # keep asking for more until there's either no more or
115 # keep asking for more until there's either no more or
104 # we got a full line
116 # we got a full line
105 while s and s[-1] != '\n':
117 while s and s[-1] != '\n':
106 s = self._read(size, 'L')
118 s = self._read(size, 'L')
107 buf += s
119 buf += s
108
120
109 return buf
121 return buf
110 else:
122 else:
111 return self._read(size, 'L')
123 return self._read(size, 'L')
112
124
113 def __iter__(self):
125 def __iter__(self):
114 return self
126 return self
115
127
116 def next(self):
128 def next(self):
117 l = self.readline()
129 l = self.readline()
118 if not l:
130 if not l:
119 raise StopIteration
131 raise StopIteration
120 return l
132 return l
121
133
122 def __getattr__(self, attr):
134 def __getattr__(self, attr):
123 if attr in ('isatty', 'fileno'):
135 if attr in ('isatty', 'fileno'):
124 raise AttributeError(attr)
136 raise AttributeError(attr)
125 return getattr(self.in_, attr)
137 return getattr(self.in_, attr)
126
138
127 class server(object):
139 class server(object):
128 """
140 """
129 Listens for commands on fin, runs them and writes the output on a channel
141 Listens for commands on fin, runs them and writes the output on a channel
130 based stream to fout.
142 based stream to fout.
131 """
143 """
132 def __init__(self, ui, repo, fin, fout):
144 def __init__(self, ui, repo, fin, fout):
133 self.cwd = os.getcwd()
145 self.cwd = os.getcwd()
134
146
135 # developer config: cmdserver.log
147 # developer config: cmdserver.log
136 logpath = ui.config("cmdserver", "log", None)
148 logpath = ui.config("cmdserver", "log", None)
137 if logpath:
149 if logpath:
138 global logfile
150 global logfile
139 if logpath == '-':
151 if logpath == '-':
140 # write log on a special 'd' (debug) channel
152 # write log on a special 'd' (debug) channel
141 logfile = channeledoutput(fout, 'd')
153 logfile = channeledoutput(fout, 'd')
142 else:
154 else:
143 logfile = open(logpath, 'a')
155 logfile = open(logpath, 'a')
144
156
145 if repo:
157 if repo:
146 # the ui here is really the repo ui so take its baseui so we don't
158 # the ui here is really the repo ui so take its baseui so we don't
147 # end up with its local configuration
159 # end up with its local configuration
148 self.ui = repo.baseui
160 self.ui = repo.baseui
149 self.repo = repo
161 self.repo = repo
150 self.repoui = repo.ui
162 self.repoui = repo.ui
151 else:
163 else:
152 self.ui = ui
164 self.ui = ui
153 self.repo = self.repoui = None
165 self.repo = self.repoui = None
154
166
155 self.cerr = channeledoutput(fout, 'e')
167 self.cerr = channeledoutput(fout, 'e')
156 self.cout = channeledoutput(fout, 'o')
168 self.cout = channeledoutput(fout, 'o')
157 self.cin = channeledinput(fin, fout, 'I')
169 self.cin = channeledinput(fin, fout, 'I')
158 self.cresult = channeledoutput(fout, 'r')
170 self.cresult = channeledoutput(fout, 'r')
159
171
160 self.client = fin
172 self.client = fin
161
173
162 def _read(self, size):
174 def _read(self, size):
163 if not size:
175 if not size:
164 return ''
176 return ''
165
177
166 data = self.client.read(size)
178 data = self.client.read(size)
167
179
168 # is the other end closed?
180 # is the other end closed?
169 if not data:
181 if not data:
170 raise EOFError
182 raise EOFError
171
183
172 return data
184 return data
173
185
174 def runcommand(self):
186 def runcommand(self):
175 """ reads a list of \0 terminated arguments, executes
187 """ reads a list of \0 terminated arguments, executes
176 and writes the return code to the result channel """
188 and writes the return code to the result channel """
177
189
178 length = struct.unpack('>I', self._read(4))[0]
190 length = struct.unpack('>I', self._read(4))[0]
179 if not length:
191 if not length:
180 args = []
192 args = []
181 else:
193 else:
182 args = self._read(length).split('\0')
194 args = self._read(length).split('\0')
183
195
184 # copy the uis so changes (e.g. --config or --verbose) don't
196 # copy the uis so changes (e.g. --config or --verbose) don't
185 # persist between requests
197 # persist between requests
186 copiedui = self.ui.copy()
198 copiedui = self.ui.copy()
187 uis = [copiedui]
199 uis = [copiedui]
188 if self.repo:
200 if self.repo:
189 self.repo.baseui = copiedui
201 self.repo.baseui = copiedui
190 # clone ui without using ui.copy because this is protected
202 # clone ui without using ui.copy because this is protected
191 repoui = self.repoui.__class__(self.repoui)
203 repoui = self.repoui.__class__(self.repoui)
192 repoui.copy = copiedui.copy # redo copy protection
204 repoui.copy = copiedui.copy # redo copy protection
193 uis.append(repoui)
205 uis.append(repoui)
194 self.repo.ui = self.repo.dirstate._ui = repoui
206 self.repo.ui = self.repo.dirstate._ui = repoui
195 self.repo.invalidateall()
207 self.repo.invalidateall()
196
208
197 for ui in uis:
209 for ui in uis:
198 # any kind of interaction must use server channels
210 # any kind of interaction must use server channels
199 ui.setconfig('ui', 'nontty', 'true', 'commandserver')
211 ui.setconfig('ui', 'nontty', 'true', 'commandserver')
200
212
201 req = dispatch.request(args[:], copiedui, self.repo, self.cin,
213 req = dispatch.request(args[:], copiedui, self.repo, self.cin,
202 self.cout, self.cerr)
214 self.cout, self.cerr)
203
215
204 ret = (dispatch.dispatch(req) or 0) & 255 # might return None
216 ret = (dispatch.dispatch(req) or 0) & 255 # might return None
205
217
206 # restore old cwd
218 # restore old cwd
207 if '--cwd' in args:
219 if '--cwd' in args:
208 os.chdir(self.cwd)
220 os.chdir(self.cwd)
209
221
210 self.cresult.write(struct.pack('>i', int(ret)))
222 self.cresult.write(struct.pack('>i', int(ret)))
211
223
212 def getencoding(self):
224 def getencoding(self):
213 """ writes the current encoding to the result channel """
225 """ writes the current encoding to the result channel """
214 self.cresult.write(encoding.encoding)
226 self.cresult.write(encoding.encoding)
215
227
216 def serveone(self):
228 def serveone(self):
217 cmd = self.client.readline()[:-1]
229 cmd = self.client.readline()[:-1]
218 if cmd:
230 if cmd:
219 handler = self.capabilities.get(cmd)
231 handler = self.capabilities.get(cmd)
220 if handler:
232 if handler:
221 handler(self)
233 handler(self)
222 else:
234 else:
223 # clients are expected to check what commands are supported by
235 # clients are expected to check what commands are supported by
224 # looking at the servers capabilities
236 # looking at the servers capabilities
225 raise error.Abort(_('unknown command %s') % cmd)
237 raise error.Abort(_('unknown command %s') % cmd)
226
238
227 return cmd != ''
239 return cmd != ''
228
240
229 capabilities = {'runcommand' : runcommand,
241 capabilities = {'runcommand' : runcommand,
230 'getencoding' : getencoding}
242 'getencoding' : getencoding}
231
243
232 def serve(self):
244 def serve(self):
233 hellomsg = 'capabilities: ' + ' '.join(sorted(self.capabilities))
245 hellomsg = 'capabilities: ' + ' '.join(sorted(self.capabilities))
234 hellomsg += '\n'
246 hellomsg += '\n'
235 hellomsg += 'encoding: ' + encoding.encoding
247 hellomsg += 'encoding: ' + encoding.encoding
236 hellomsg += '\n'
248 hellomsg += '\n'
237 hellomsg += 'pid: %d' % os.getpid()
249 hellomsg += 'pid: %d' % os.getpid()
238
250
239 # write the hello msg in -one- chunk
251 # write the hello msg in -one- chunk
240 self.cout.write(hellomsg)
252 self.cout.write(hellomsg)
241
253
242 try:
254 try:
243 while self.serveone():
255 while self.serveone():
244 pass
256 pass
245 except EOFError:
257 except EOFError:
246 # we'll get here if the client disconnected while we were reading
258 # we'll get here if the client disconnected while we were reading
247 # its request
259 # its request
248 return 1
260 return 1
249
261
250 return 0
262 return 0
251
263
252 def _protectio(ui):
264 def _protectio(ui):
253 """ duplicates streams and redirect original to null if ui uses stdio """
265 """ duplicates streams and redirect original to null if ui uses stdio """
254 ui.flush()
266 ui.flush()
255 newfiles = []
267 newfiles = []
256 nullfd = os.open(os.devnull, os.O_RDWR)
268 nullfd = os.open(os.devnull, os.O_RDWR)
257 for f, sysf, mode in [(ui.fin, sys.stdin, 'rb'),
269 for f, sysf, mode in [(ui.fin, sys.stdin, 'rb'),
258 (ui.fout, sys.stdout, 'wb')]:
270 (ui.fout, sys.stdout, 'wb')]:
259 if f is sysf:
271 if f is sysf:
260 newfd = os.dup(f.fileno())
272 newfd = os.dup(f.fileno())
261 os.dup2(nullfd, f.fileno())
273 os.dup2(nullfd, f.fileno())
262 f = os.fdopen(newfd, mode)
274 f = os.fdopen(newfd, mode)
263 newfiles.append(f)
275 newfiles.append(f)
264 os.close(nullfd)
276 os.close(nullfd)
265 return tuple(newfiles)
277 return tuple(newfiles)
266
278
267 def _restoreio(ui, fin, fout):
279 def _restoreio(ui, fin, fout):
268 """ restores streams from duplicated ones """
280 """ restores streams from duplicated ones """
269 ui.flush()
281 ui.flush()
270 for f, uif in [(fin, ui.fin), (fout, ui.fout)]:
282 for f, uif in [(fin, ui.fin), (fout, ui.fout)]:
271 if f is not uif:
283 if f is not uif:
272 os.dup2(f.fileno(), uif.fileno())
284 os.dup2(f.fileno(), uif.fileno())
273 f.close()
285 f.close()
274
286
275 class pipeservice(object):
287 class pipeservice(object):
276 def __init__(self, ui, repo, opts):
288 def __init__(self, ui, repo, opts):
277 self.ui = ui
289 self.ui = ui
278 self.repo = repo
290 self.repo = repo
279
291
280 def init(self):
292 def init(self):
281 pass
293 pass
282
294
283 def run(self):
295 def run(self):
284 ui = self.ui
296 ui = self.ui
285 # redirect stdio to null device so that broken extensions or in-process
297 # redirect stdio to null device so that broken extensions or in-process
286 # hooks will never cause corruption of channel protocol.
298 # hooks will never cause corruption of channel protocol.
287 fin, fout = _protectio(ui)
299 fin, fout = _protectio(ui)
288 try:
300 try:
289 sv = server(ui, self.repo, fin, fout)
301 sv = server(ui, self.repo, fin, fout)
290 return sv.serve()
302 return sv.serve()
291 finally:
303 finally:
292 _restoreio(ui, fin, fout)
304 _restoreio(ui, fin, fout)
293
305
294 class _requesthandler(SocketServer.StreamRequestHandler):
306 class _requesthandler(SocketServer.StreamRequestHandler):
295 def handle(self):
307 def handle(self):
296 ui = self.server.ui
308 ui = self.server.ui
297 repo = self.server.repo
309 repo = self.server.repo
298 sv = server(ui, repo, self.rfile, self.wfile)
310 sv = server(ui, repo, self.rfile, self.wfile)
299 try:
311 try:
300 try:
312 try:
301 sv.serve()
313 sv.serve()
302 # handle exceptions that may be raised by command server. most of
314 # handle exceptions that may be raised by command server. most of
303 # known exceptions are caught by dispatch.
315 # known exceptions are caught by dispatch.
304 except error.Abort as inst:
316 except error.Abort as inst:
305 ui.warn(_('abort: %s\n') % inst)
317 ui.warn(_('abort: %s\n') % inst)
306 except IOError as inst:
318 except IOError as inst:
307 if inst.errno != errno.EPIPE:
319 if inst.errno != errno.EPIPE:
308 raise
320 raise
309 except KeyboardInterrupt:
321 except KeyboardInterrupt:
310 pass
322 pass
311 except: # re-raises
323 except: # re-raises
312 # also write traceback to error channel. otherwise client cannot
324 # also write traceback to error channel. otherwise client cannot
313 # see it because it is written to server's stderr by default.
325 # see it because it is written to server's stderr by default.
314 traceback.print_exc(file=sv.cerr)
326 traceback.print_exc(file=sv.cerr)
315 raise
327 raise
316
328
317 class unixservice(object):
329 class unixservice(object):
318 """
330 """
319 Listens on unix domain socket and forks server per connection
331 Listens on unix domain socket and forks server per connection
320 """
332 """
321 def __init__(self, ui, repo, opts):
333 def __init__(self, ui, repo, opts):
322 self.ui = ui
334 self.ui = ui
323 self.repo = repo
335 self.repo = repo
324 self.address = opts['address']
336 self.address = opts['address']
325 if not util.safehasattr(SocketServer, 'UnixStreamServer'):
337 if not util.safehasattr(SocketServer, 'UnixStreamServer'):
326 raise error.Abort(_('unsupported platform'))
338 raise error.Abort(_('unsupported platform'))
327 if not self.address:
339 if not self.address:
328 raise error.Abort(_('no socket path specified with --address'))
340 raise error.Abort(_('no socket path specified with --address'))
329
341
330 def init(self):
342 def init(self):
331 class cls(SocketServer.ForkingMixIn, SocketServer.UnixStreamServer):
343 class cls(SocketServer.ForkingMixIn, SocketServer.UnixStreamServer):
332 ui = self.ui
344 ui = self.ui
333 repo = self.repo
345 repo = self.repo
334 self.server = cls(self.address, _requesthandler)
346 self.server = cls(self.address, _requesthandler)
335 self.ui.status(_('listening at %s\n') % self.address)
347 self.ui.status(_('listening at %s\n') % self.address)
336 self.ui.flush() # avoid buffering of status message
348 self.ui.flush() # avoid buffering of status message
337
349
338 def run(self):
350 def run(self):
339 try:
351 try:
340 self.server.serve_forever()
352 self.server.serve_forever()
341 finally:
353 finally:
342 os.unlink(self.address)
354 os.unlink(self.address)
343
355
344 _servicemap = {
356 _servicemap = {
345 'pipe': pipeservice,
357 'pipe': pipeservice,
346 'unix': unixservice,
358 'unix': unixservice,
347 }
359 }
348
360
349 def createservice(ui, repo, opts):
361 def createservice(ui, repo, opts):
350 mode = opts['cmdserver']
362 mode = opts['cmdserver']
351 try:
363 try:
352 return _servicemap[mode](ui, repo, opts)
364 return _servicemap[mode](ui, repo, opts)
353 except KeyError:
365 except KeyError:
354 raise error.Abort(_('unknown mode %s') % mode)
366 raise error.Abort(_('unknown mode %s') % mode)
@@ -1,213 +1,212 b''
1 #require test-repo
1 #require test-repo
2
2
3 $ cd "$TESTDIR"/..
3 $ cd "$TESTDIR"/..
4
4
5 $ hg files 'set:(**.py)' | xargs python contrib/check-py3-compat.py
5 $ hg files 'set:(**.py)' | xargs python contrib/check-py3-compat.py
6 contrib/casesmash.py not using absolute_import
6 contrib/casesmash.py not using absolute_import
7 contrib/check-code.py not using absolute_import
7 contrib/check-code.py not using absolute_import
8 contrib/check-code.py requires print_function
8 contrib/check-code.py requires print_function
9 contrib/check-config.py not using absolute_import
9 contrib/check-config.py not using absolute_import
10 contrib/check-config.py requires print_function
10 contrib/check-config.py requires print_function
11 contrib/debugcmdserver.py not using absolute_import
11 contrib/debugcmdserver.py not using absolute_import
12 contrib/debugcmdserver.py requires print_function
12 contrib/debugcmdserver.py requires print_function
13 contrib/debugshell.py not using absolute_import
13 contrib/debugshell.py not using absolute_import
14 contrib/fixpax.py not using absolute_import
14 contrib/fixpax.py not using absolute_import
15 contrib/fixpax.py requires print_function
15 contrib/fixpax.py requires print_function
16 contrib/hgclient.py not using absolute_import
16 contrib/hgclient.py not using absolute_import
17 contrib/hgclient.py requires print_function
17 contrib/hgclient.py requires print_function
18 contrib/hgfixes/fix_bytes.py not using absolute_import
18 contrib/hgfixes/fix_bytes.py not using absolute_import
19 contrib/hgfixes/fix_bytesmod.py not using absolute_import
19 contrib/hgfixes/fix_bytesmod.py not using absolute_import
20 contrib/hgfixes/fix_leftover_imports.py not using absolute_import
20 contrib/hgfixes/fix_leftover_imports.py not using absolute_import
21 contrib/import-checker.py not using absolute_import
21 contrib/import-checker.py not using absolute_import
22 contrib/import-checker.py requires print_function
22 contrib/import-checker.py requires print_function
23 contrib/memory.py not using absolute_import
23 contrib/memory.py not using absolute_import
24 contrib/perf.py not using absolute_import
24 contrib/perf.py not using absolute_import
25 contrib/python-hook-examples.py not using absolute_import
25 contrib/python-hook-examples.py not using absolute_import
26 contrib/revsetbenchmarks.py not using absolute_import
26 contrib/revsetbenchmarks.py not using absolute_import
27 contrib/revsetbenchmarks.py requires print_function
27 contrib/revsetbenchmarks.py requires print_function
28 contrib/showstack.py not using absolute_import
28 contrib/showstack.py not using absolute_import
29 contrib/synthrepo.py not using absolute_import
29 contrib/synthrepo.py not using absolute_import
30 contrib/win32/hgwebdir_wsgi.py not using absolute_import
30 contrib/win32/hgwebdir_wsgi.py not using absolute_import
31 doc/check-seclevel.py not using absolute_import
31 doc/check-seclevel.py not using absolute_import
32 doc/gendoc.py not using absolute_import
32 doc/gendoc.py not using absolute_import
33 doc/hgmanpage.py not using absolute_import
33 doc/hgmanpage.py not using absolute_import
34 hgext/__init__.py not using absolute_import
34 hgext/__init__.py not using absolute_import
35 hgext/acl.py not using absolute_import
35 hgext/acl.py not using absolute_import
36 hgext/blackbox.py not using absolute_import
36 hgext/blackbox.py not using absolute_import
37 hgext/bugzilla.py not using absolute_import
37 hgext/bugzilla.py not using absolute_import
38 hgext/censor.py not using absolute_import
38 hgext/censor.py not using absolute_import
39 hgext/children.py not using absolute_import
39 hgext/children.py not using absolute_import
40 hgext/churn.py not using absolute_import
40 hgext/churn.py not using absolute_import
41 hgext/clonebundles.py not using absolute_import
41 hgext/clonebundles.py not using absolute_import
42 hgext/color.py not using absolute_import
42 hgext/color.py not using absolute_import
43 hgext/convert/__init__.py not using absolute_import
43 hgext/convert/__init__.py not using absolute_import
44 hgext/convert/bzr.py not using absolute_import
44 hgext/convert/bzr.py not using absolute_import
45 hgext/convert/common.py not using absolute_import
45 hgext/convert/common.py not using absolute_import
46 hgext/convert/convcmd.py not using absolute_import
46 hgext/convert/convcmd.py not using absolute_import
47 hgext/convert/cvs.py not using absolute_import
47 hgext/convert/cvs.py not using absolute_import
48 hgext/convert/cvsps.py not using absolute_import
48 hgext/convert/cvsps.py not using absolute_import
49 hgext/convert/darcs.py not using absolute_import
49 hgext/convert/darcs.py not using absolute_import
50 hgext/convert/filemap.py not using absolute_import
50 hgext/convert/filemap.py not using absolute_import
51 hgext/convert/git.py not using absolute_import
51 hgext/convert/git.py not using absolute_import
52 hgext/convert/gnuarch.py not using absolute_import
52 hgext/convert/gnuarch.py not using absolute_import
53 hgext/convert/hg.py not using absolute_import
53 hgext/convert/hg.py not using absolute_import
54 hgext/convert/monotone.py not using absolute_import
54 hgext/convert/monotone.py not using absolute_import
55 hgext/convert/p4.py not using absolute_import
55 hgext/convert/p4.py not using absolute_import
56 hgext/convert/subversion.py not using absolute_import
56 hgext/convert/subversion.py not using absolute_import
57 hgext/convert/transport.py not using absolute_import
57 hgext/convert/transport.py not using absolute_import
58 hgext/eol.py not using absolute_import
58 hgext/eol.py not using absolute_import
59 hgext/extdiff.py not using absolute_import
59 hgext/extdiff.py not using absolute_import
60 hgext/factotum.py not using absolute_import
60 hgext/factotum.py not using absolute_import
61 hgext/fetch.py not using absolute_import
61 hgext/fetch.py not using absolute_import
62 hgext/gpg.py not using absolute_import
62 hgext/gpg.py not using absolute_import
63 hgext/graphlog.py not using absolute_import
63 hgext/graphlog.py not using absolute_import
64 hgext/hgcia.py not using absolute_import
64 hgext/hgcia.py not using absolute_import
65 hgext/hgk.py not using absolute_import
65 hgext/hgk.py not using absolute_import
66 hgext/highlight/__init__.py not using absolute_import
66 hgext/highlight/__init__.py not using absolute_import
67 hgext/highlight/highlight.py not using absolute_import
67 hgext/highlight/highlight.py not using absolute_import
68 hgext/histedit.py not using absolute_import
68 hgext/histedit.py not using absolute_import
69 hgext/keyword.py not using absolute_import
69 hgext/keyword.py not using absolute_import
70 hgext/largefiles/__init__.py not using absolute_import
70 hgext/largefiles/__init__.py not using absolute_import
71 hgext/largefiles/basestore.py not using absolute_import
71 hgext/largefiles/basestore.py not using absolute_import
72 hgext/largefiles/lfcommands.py not using absolute_import
72 hgext/largefiles/lfcommands.py not using absolute_import
73 hgext/largefiles/lfutil.py not using absolute_import
73 hgext/largefiles/lfutil.py not using absolute_import
74 hgext/largefiles/localstore.py not using absolute_import
74 hgext/largefiles/localstore.py not using absolute_import
75 hgext/largefiles/overrides.py not using absolute_import
75 hgext/largefiles/overrides.py not using absolute_import
76 hgext/largefiles/proto.py not using absolute_import
76 hgext/largefiles/proto.py not using absolute_import
77 hgext/largefiles/remotestore.py not using absolute_import
77 hgext/largefiles/remotestore.py not using absolute_import
78 hgext/largefiles/reposetup.py not using absolute_import
78 hgext/largefiles/reposetup.py not using absolute_import
79 hgext/largefiles/uisetup.py not using absolute_import
79 hgext/largefiles/uisetup.py not using absolute_import
80 hgext/largefiles/wirestore.py not using absolute_import
80 hgext/largefiles/wirestore.py not using absolute_import
81 hgext/mq.py not using absolute_import
81 hgext/mq.py not using absolute_import
82 hgext/notify.py not using absolute_import
82 hgext/notify.py not using absolute_import
83 hgext/pager.py not using absolute_import
83 hgext/pager.py not using absolute_import
84 hgext/patchbomb.py not using absolute_import
84 hgext/patchbomb.py not using absolute_import
85 hgext/purge.py not using absolute_import
85 hgext/purge.py not using absolute_import
86 hgext/rebase.py not using absolute_import
86 hgext/rebase.py not using absolute_import
87 hgext/record.py not using absolute_import
87 hgext/record.py not using absolute_import
88 hgext/relink.py not using absolute_import
88 hgext/relink.py not using absolute_import
89 hgext/schemes.py not using absolute_import
89 hgext/schemes.py not using absolute_import
90 hgext/share.py not using absolute_import
90 hgext/share.py not using absolute_import
91 hgext/shelve.py not using absolute_import
91 hgext/shelve.py not using absolute_import
92 hgext/strip.py not using absolute_import
92 hgext/strip.py not using absolute_import
93 hgext/transplant.py not using absolute_import
93 hgext/transplant.py not using absolute_import
94 hgext/win32mbcs.py not using absolute_import
94 hgext/win32mbcs.py not using absolute_import
95 hgext/win32text.py not using absolute_import
95 hgext/win32text.py not using absolute_import
96 hgext/zeroconf/Zeroconf.py not using absolute_import
96 hgext/zeroconf/Zeroconf.py not using absolute_import
97 hgext/zeroconf/Zeroconf.py requires print_function
97 hgext/zeroconf/Zeroconf.py requires print_function
98 hgext/zeroconf/__init__.py not using absolute_import
98 hgext/zeroconf/__init__.py not using absolute_import
99 i18n/check-translation.py not using absolute_import
99 i18n/check-translation.py not using absolute_import
100 i18n/polib.py not using absolute_import
100 i18n/polib.py not using absolute_import
101 mercurial/byterange.py not using absolute_import
101 mercurial/byterange.py not using absolute_import
102 mercurial/cmdutil.py not using absolute_import
102 mercurial/cmdutil.py not using absolute_import
103 mercurial/commands.py not using absolute_import
103 mercurial/commands.py not using absolute_import
104 mercurial/commandserver.py not using absolute_import
105 mercurial/context.py not using absolute_import
104 mercurial/context.py not using absolute_import
106 mercurial/dirstate.py not using absolute_import
105 mercurial/dirstate.py not using absolute_import
107 mercurial/dispatch.py requires print_function
106 mercurial/dispatch.py requires print_function
108 mercurial/encoding.py not using absolute_import
107 mercurial/encoding.py not using absolute_import
109 mercurial/exchange.py not using absolute_import
108 mercurial/exchange.py not using absolute_import
110 mercurial/help.py not using absolute_import
109 mercurial/help.py not using absolute_import
111 mercurial/httpclient/__init__.py not using absolute_import
110 mercurial/httpclient/__init__.py not using absolute_import
112 mercurial/httpclient/_readers.py not using absolute_import
111 mercurial/httpclient/_readers.py not using absolute_import
113 mercurial/httpclient/socketutil.py not using absolute_import
112 mercurial/httpclient/socketutil.py not using absolute_import
114 mercurial/httpconnection.py not using absolute_import
113 mercurial/httpconnection.py not using absolute_import
115 mercurial/keepalive.py not using absolute_import
114 mercurial/keepalive.py not using absolute_import
116 mercurial/keepalive.py requires print_function
115 mercurial/keepalive.py requires print_function
117 mercurial/localrepo.py not using absolute_import
116 mercurial/localrepo.py not using absolute_import
118 mercurial/lsprof.py requires print_function
117 mercurial/lsprof.py requires print_function
119 mercurial/lsprofcalltree.py not using absolute_import
118 mercurial/lsprofcalltree.py not using absolute_import
120 mercurial/lsprofcalltree.py requires print_function
119 mercurial/lsprofcalltree.py requires print_function
121 mercurial/mail.py requires print_function
120 mercurial/mail.py requires print_function
122 mercurial/manifest.py not using absolute_import
121 mercurial/manifest.py not using absolute_import
123 mercurial/mdiff.py not using absolute_import
122 mercurial/mdiff.py not using absolute_import
124 mercurial/patch.py not using absolute_import
123 mercurial/patch.py not using absolute_import
125 mercurial/pvec.py not using absolute_import
124 mercurial/pvec.py not using absolute_import
126 mercurial/py3kcompat.py not using absolute_import
125 mercurial/py3kcompat.py not using absolute_import
127 mercurial/revlog.py not using absolute_import
126 mercurial/revlog.py not using absolute_import
128 mercurial/scmposix.py not using absolute_import
127 mercurial/scmposix.py not using absolute_import
129 mercurial/scmutil.py not using absolute_import
128 mercurial/scmutil.py not using absolute_import
130 mercurial/scmwindows.py not using absolute_import
129 mercurial/scmwindows.py not using absolute_import
131 mercurial/similar.py not using absolute_import
130 mercurial/similar.py not using absolute_import
132 mercurial/store.py not using absolute_import
131 mercurial/store.py not using absolute_import
133 mercurial/util.py not using absolute_import
132 mercurial/util.py not using absolute_import
134 mercurial/windows.py not using absolute_import
133 mercurial/windows.py not using absolute_import
135 setup.py not using absolute_import
134 setup.py not using absolute_import
136 tests/filterpyflakes.py requires print_function
135 tests/filterpyflakes.py requires print_function
137 tests/generate-working-copy-states.py requires print_function
136 tests/generate-working-copy-states.py requires print_function
138 tests/get-with-headers.py requires print_function
137 tests/get-with-headers.py requires print_function
139 tests/heredoctest.py requires print_function
138 tests/heredoctest.py requires print_function
140 tests/hypothesishelpers.py not using absolute_import
139 tests/hypothesishelpers.py not using absolute_import
141 tests/hypothesishelpers.py requires print_function
140 tests/hypothesishelpers.py requires print_function
142 tests/killdaemons.py not using absolute_import
141 tests/killdaemons.py not using absolute_import
143 tests/md5sum.py not using absolute_import
142 tests/md5sum.py not using absolute_import
144 tests/mockblackbox.py not using absolute_import
143 tests/mockblackbox.py not using absolute_import
145 tests/printenv.py not using absolute_import
144 tests/printenv.py not using absolute_import
146 tests/readlink.py not using absolute_import
145 tests/readlink.py not using absolute_import
147 tests/readlink.py requires print_function
146 tests/readlink.py requires print_function
148 tests/revlog-formatv0.py not using absolute_import
147 tests/revlog-formatv0.py not using absolute_import
149 tests/run-tests.py not using absolute_import
148 tests/run-tests.py not using absolute_import
150 tests/seq.py not using absolute_import
149 tests/seq.py not using absolute_import
151 tests/seq.py requires print_function
150 tests/seq.py requires print_function
152 tests/silenttestrunner.py not using absolute_import
151 tests/silenttestrunner.py not using absolute_import
153 tests/silenttestrunner.py requires print_function
152 tests/silenttestrunner.py requires print_function
154 tests/sitecustomize.py not using absolute_import
153 tests/sitecustomize.py not using absolute_import
155 tests/svn-safe-append.py not using absolute_import
154 tests/svn-safe-append.py not using absolute_import
156 tests/svnxml.py not using absolute_import
155 tests/svnxml.py not using absolute_import
157 tests/test-ancestor.py requires print_function
156 tests/test-ancestor.py requires print_function
158 tests/test-atomictempfile.py not using absolute_import
157 tests/test-atomictempfile.py not using absolute_import
159 tests/test-batching.py not using absolute_import
158 tests/test-batching.py not using absolute_import
160 tests/test-batching.py requires print_function
159 tests/test-batching.py requires print_function
161 tests/test-bdiff.py not using absolute_import
160 tests/test-bdiff.py not using absolute_import
162 tests/test-bdiff.py requires print_function
161 tests/test-bdiff.py requires print_function
163 tests/test-context.py not using absolute_import
162 tests/test-context.py not using absolute_import
164 tests/test-context.py requires print_function
163 tests/test-context.py requires print_function
165 tests/test-demandimport.py not using absolute_import
164 tests/test-demandimport.py not using absolute_import
166 tests/test-demandimport.py requires print_function
165 tests/test-demandimport.py requires print_function
167 tests/test-dispatch.py not using absolute_import
166 tests/test-dispatch.py not using absolute_import
168 tests/test-dispatch.py requires print_function
167 tests/test-dispatch.py requires print_function
169 tests/test-doctest.py not using absolute_import
168 tests/test-doctest.py not using absolute_import
170 tests/test-duplicateoptions.py not using absolute_import
169 tests/test-duplicateoptions.py not using absolute_import
171 tests/test-duplicateoptions.py requires print_function
170 tests/test-duplicateoptions.py requires print_function
172 tests/test-filecache.py not using absolute_import
171 tests/test-filecache.py not using absolute_import
173 tests/test-filecache.py requires print_function
172 tests/test-filecache.py requires print_function
174 tests/test-filelog.py not using absolute_import
173 tests/test-filelog.py not using absolute_import
175 tests/test-filelog.py requires print_function
174 tests/test-filelog.py requires print_function
176 tests/test-hg-parseurl.py not using absolute_import
175 tests/test-hg-parseurl.py not using absolute_import
177 tests/test-hg-parseurl.py requires print_function
176 tests/test-hg-parseurl.py requires print_function
178 tests/test-hgweb-auth.py not using absolute_import
177 tests/test-hgweb-auth.py not using absolute_import
179 tests/test-hgweb-auth.py requires print_function
178 tests/test-hgweb-auth.py requires print_function
180 tests/test-hgwebdir-paths.py not using absolute_import
179 tests/test-hgwebdir-paths.py not using absolute_import
181 tests/test-hybridencode.py not using absolute_import
180 tests/test-hybridencode.py not using absolute_import
182 tests/test-hybridencode.py requires print_function
181 tests/test-hybridencode.py requires print_function
183 tests/test-lrucachedict.py not using absolute_import
182 tests/test-lrucachedict.py not using absolute_import
184 tests/test-lrucachedict.py requires print_function
183 tests/test-lrucachedict.py requires print_function
185 tests/test-manifest.py not using absolute_import
184 tests/test-manifest.py not using absolute_import
186 tests/test-minirst.py not using absolute_import
185 tests/test-minirst.py not using absolute_import
187 tests/test-minirst.py requires print_function
186 tests/test-minirst.py requires print_function
188 tests/test-parseindex2.py not using absolute_import
187 tests/test-parseindex2.py not using absolute_import
189 tests/test-parseindex2.py requires print_function
188 tests/test-parseindex2.py requires print_function
190 tests/test-pathencode.py not using absolute_import
189 tests/test-pathencode.py not using absolute_import
191 tests/test-pathencode.py requires print_function
190 tests/test-pathencode.py requires print_function
192 tests/test-propertycache.py not using absolute_import
191 tests/test-propertycache.py not using absolute_import
193 tests/test-propertycache.py requires print_function
192 tests/test-propertycache.py requires print_function
194 tests/test-revlog-ancestry.py not using absolute_import
193 tests/test-revlog-ancestry.py not using absolute_import
195 tests/test-revlog-ancestry.py requires print_function
194 tests/test-revlog-ancestry.py requires print_function
196 tests/test-run-tests.py not using absolute_import
195 tests/test-run-tests.py not using absolute_import
197 tests/test-simplemerge.py not using absolute_import
196 tests/test-simplemerge.py not using absolute_import
198 tests/test-status-inprocess.py not using absolute_import
197 tests/test-status-inprocess.py not using absolute_import
199 tests/test-status-inprocess.py requires print_function
198 tests/test-status-inprocess.py requires print_function
200 tests/test-symlink-os-yes-fs-no.py not using absolute_import
199 tests/test-symlink-os-yes-fs-no.py not using absolute_import
201 tests/test-trusted.py not using absolute_import
200 tests/test-trusted.py not using absolute_import
202 tests/test-trusted.py requires print_function
201 tests/test-trusted.py requires print_function
203 tests/test-ui-color.py not using absolute_import
202 tests/test-ui-color.py not using absolute_import
204 tests/test-ui-color.py requires print_function
203 tests/test-ui-color.py requires print_function
205 tests/test-ui-config.py not using absolute_import
204 tests/test-ui-config.py not using absolute_import
206 tests/test-ui-config.py requires print_function
205 tests/test-ui-config.py requires print_function
207 tests/test-ui-verbosity.py not using absolute_import
206 tests/test-ui-verbosity.py not using absolute_import
208 tests/test-ui-verbosity.py requires print_function
207 tests/test-ui-verbosity.py requires print_function
209 tests/test-url.py not using absolute_import
208 tests/test-url.py not using absolute_import
210 tests/test-url.py requires print_function
209 tests/test-url.py requires print_function
211 tests/test-walkrepo.py requires print_function
210 tests/test-walkrepo.py requires print_function
212 tests/test-wireproto.py requires print_function
211 tests/test-wireproto.py requires print_function
213 tests/tinyproxy.py requires print_function
212 tests/tinyproxy.py requires print_function
General Comments 0
You need to be logged in to leave comments. Login now