Show More
@@ -219,7 +219,7 b' class FileRangeHandler(urllib2.FileHandl' | |||||
219 | if host: |
|
219 | if host: | |
220 | host, port = urllib.splitport(host) |
|
220 | host, port = urllib.splitport(host) | |
221 | if port or socket.gethostbyname(host) not in self.get_names(): |
|
221 | if port or socket.gethostbyname(host) not in self.get_names(): | |
222 | raise URLError('file not on local host') |
|
222 | raise urllib2.URLError('file not on local host') | |
223 | fo = open(localfile,'rb') |
|
223 | fo = open(localfile,'rb') | |
224 | brange = req.headers.get('Range',None) |
|
224 | brange = req.headers.get('Range',None) | |
225 | brange = range_header_to_tuple(brange) |
|
225 | brange = range_header_to_tuple(brange) | |
@@ -249,7 +249,6 b' from urllib import splitport, splituser,' | |||||
249 | import ftplib |
|
249 | import ftplib | |
250 | import socket |
|
250 | import socket | |
251 | import sys |
|
251 | import sys | |
252 | import ftplib |
|
|||
253 | import mimetypes |
|
252 | import mimetypes | |
254 | import mimetools |
|
253 | import mimetools | |
255 |
|
254 | |||
@@ -275,7 +274,7 b' class FTPRangeHandler(urllib2.FTPHandler' | |||||
275 | try: |
|
274 | try: | |
276 | host = socket.gethostbyname(host) |
|
275 | host = socket.gethostbyname(host) | |
277 | except socket.error, msg: |
|
276 | except socket.error, msg: | |
278 | raise URLError(msg) |
|
277 | raise urllib2.URLError(msg) | |
279 | path, attrs = splitattr(req.get_selector()) |
|
278 | path, attrs = splitattr(req.get_selector()) | |
280 | dirs = path.split('/') |
|
279 | dirs = path.split('/') | |
281 | dirs = map(unquote, dirs) |
|
280 | dirs = map(unquote, dirs) |
@@ -897,7 +897,7 b' def serve(ui, repo, **opts):' | |||||
897 | if not d: break |
|
897 | if not d: break | |
898 | fout.write(d) |
|
898 | fout.write(d) | |
899 |
|
899 | |||
900 | out.flush() |
|
900 | fout.flush() | |
901 |
|
901 | |||
902 | elif cmd == "addchangegroup": |
|
902 | elif cmd == "addchangegroup": | |
903 | if not lock: |
|
903 | if not lock: |
@@ -1,4 +1,4 b'' | |||||
1 |
import |
|
1 | import getopt | |
2 |
|
2 | |||
3 | def fancyopts(args, options, state): |
|
3 | def fancyopts(args, options, state): | |
4 | long=[] |
|
4 | long=[] |
@@ -764,7 +764,7 b' class localrepository:' | |||||
764 | mf1[f] = util.is_exec(self.wjoin(f), mf1.get(f, False)) |
|
764 | mf1[f] = util.is_exec(self.wjoin(f), mf1.get(f, False)) | |
765 | t = self.wfile(f).read() |
|
765 | t = self.wfile(f).read() | |
766 | except IOError: |
|
766 | except IOError: | |
767 | self.warn("trouble committing %s!\n" % f) |
|
767 | self.ui.warn("trouble committing %s!\n" % f) | |
768 | raise |
|
768 | raise | |
769 |
|
769 | |||
770 | meta = {} |
|
770 | meta = {} |
@@ -25,7 +25,7 b' def explain_exit(code):' | |||||
25 | val = os.WTERMSIG(code) |
|
25 | val = os.WTERMSIG(code) | |
26 | return "killed by signal %d" % val, val |
|
26 | return "killed by signal %d" % val, val | |
27 | elif os.WIFSTOPPED(code): |
|
27 | elif os.WIFSTOPPED(code): | |
28 | val = os.STOPSIG(code) |
|
28 | val = os.WSTOPSIG(code) | |
29 | return "stopped by signal %d" % val, val |
|
29 | return "stopped by signal %d" % val, val | |
30 | raise ValueError("invalid exit code") |
|
30 | raise ValueError("invalid exit code") | |
31 |
|
31 |
General Comments 0
You need to be logged in to leave comments.
Login now