Show More
@@ -6,7 +6,6 b'' | |||||
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 | from __future__ import absolute_import |
|
7 | from __future__ import absolute_import | |
8 |
|
8 | |||
9 | import cStringIO |
|
|||
10 | import errno |
|
9 | import errno | |
11 | import os |
|
10 | import os | |
12 | import re |
|
11 | import re | |
@@ -24,7 +23,7 b' from . import (' | |||||
24 | cvsps, |
|
23 | cvsps, | |
25 | ) |
|
24 | ) | |
26 |
|
25 | |||
27 | StringIO = cStringIO.StringIO |
|
26 | stringio = util.stringio | |
28 | checktool = common.checktool |
|
27 | checktool = common.checktool | |
29 | commit = common.commit |
|
28 | commit = common.commit | |
30 | converter_source = common.converter_source |
|
29 | converter_source = common.converter_source | |
@@ -228,7 +227,7 b' class convert_cvs(converter_source):' | |||||
228 | # file-objects returned by socket.makefile() do not handle |
|
227 | # file-objects returned by socket.makefile() do not handle | |
229 | # large read() requests very well. |
|
228 | # large read() requests very well. | |
230 | chunksize = 65536 |
|
229 | chunksize = 65536 | |
231 |
output = |
|
230 | output = stringio() | |
232 | while count > 0: |
|
231 | while count > 0: | |
233 | data = fp.read(min(count, chunksize)) |
|
232 | data = fp.read(min(count, chunksize)) | |
234 | if not data: |
|
233 | if not data: |
@@ -18,7 +18,6 b'' | |||||
18 | # source. |
|
18 | # source. | |
19 | from __future__ import absolute_import |
|
19 | from __future__ import absolute_import | |
20 |
|
20 | |||
21 | import cStringIO |
|
|||
22 | import os |
|
21 | import os | |
23 | import re |
|
22 | import re | |
24 | import time |
|
23 | import time | |
@@ -36,6 +35,8 b' from mercurial import (' | |||||
36 | scmutil, |
|
35 | scmutil, | |
37 | util, |
|
36 | util, | |
38 | ) |
|
37 | ) | |
|
38 | stringio = util.stringio | |||
|
39 | ||||
39 | from mercurial.i18n import _ |
|
40 | from mercurial.i18n import _ | |
40 | from . import common |
|
41 | from . import common | |
41 | mapfile = common.mapfile |
|
42 | mapfile = common.mapfile | |
@@ -137,7 +138,7 b' class mercurial_sink(common.converter_si' | |||||
137 | self.before() |
|
138 | self.before() | |
138 |
|
139 | |||
139 | def _rewritetags(self, source, revmap, data): |
|
140 | def _rewritetags(self, source, revmap, data): | |
140 |
fp = |
|
141 | fp = stringio() | |
141 | for line in data.splitlines(): |
|
142 | for line in data.splitlines(): | |
142 | s = line.split(' ', 1) |
|
143 | s = line.split(' ', 1) | |
143 | if len(s) != 2: |
|
144 | if len(s) != 2: | |
@@ -152,7 +153,7 b' class mercurial_sink(common.converter_si' | |||||
152 | return fp.getvalue() |
|
153 | return fp.getvalue() | |
153 |
|
154 | |||
154 | def _rewritesubstate(self, source, data): |
|
155 | def _rewritesubstate(self, source, data): | |
155 |
fp = |
|
156 | fp = stringio() | |
156 | for line in data.splitlines(): |
|
157 | for line in data.splitlines(): | |
157 | s = line.split(' ', 1) |
|
158 | s = line.split(' ', 1) | |
158 | if len(s) != 2: |
|
159 | if len(s) != 2: |
@@ -4,7 +4,6 b'' | |||||
4 | from __future__ import absolute_import |
|
4 | from __future__ import absolute_import | |
5 |
|
5 | |||
6 | import cPickle as pickle |
|
6 | import cPickle as pickle | |
7 | import cStringIO |
|
|||
8 | import os |
|
7 | import os | |
9 | import re |
|
8 | import re | |
10 | import sys |
|
9 | import sys | |
@@ -24,7 +23,7 b' from mercurial.i18n import _' | |||||
24 |
|
23 | |||
25 | from . import common |
|
24 | from . import common | |
26 |
|
25 | |||
27 | StringIO = cStringIO.StringIO |
|
26 | stringio = util.stringio | |
28 | propertycache = util.propertycache |
|
27 | propertycache = util.propertycache | |
29 |
|
28 | |||
30 | commandline = common.commandline |
|
29 | commandline = common.commandline | |
@@ -986,7 +985,7 b' class svn_source(converter_source):' | |||||
986 | if self.module != new_module: |
|
985 | if self.module != new_module: | |
987 | self.module = new_module |
|
986 | self.module = new_module | |
988 | self.reparent(self.module) |
|
987 | self.reparent(self.module) | |
989 |
io = |
|
988 | io = stringio() | |
990 | info = svn.ra.get_file(self.ra, file, revnum, io) |
|
989 | info = svn.ra.get_file(self.ra, file, revnum, io) | |
991 | data = io.getvalue() |
|
990 | data = io.getvalue() | |
992 | # ra.get_file() seems to keep a reference on the input buffer |
|
991 | # ra.get_file() seems to keep a reference on the input buffer |
@@ -65,7 +65,6 b' You can set patchbomb to always ask for ' | |||||
65 | ''' |
|
65 | ''' | |
66 | from __future__ import absolute_import |
|
66 | from __future__ import absolute_import | |
67 |
|
67 | |||
68 | import cStringIO |
|
|||
69 | import email as emailmod |
|
68 | import email as emailmod | |
70 | import errno |
|
69 | import errno | |
71 | import os |
|
70 | import os | |
@@ -83,6 +82,7 b' from mercurial import (' | |||||
83 | scmutil, |
|
82 | scmutil, | |
84 | util, |
|
83 | util, | |
85 | ) |
|
84 | ) | |
|
85 | stringio = util.stringio | |||
86 | from mercurial.i18n import _ |
|
86 | from mercurial.i18n import _ | |
87 |
|
87 | |||
88 | cmdtable = {} |
|
88 | cmdtable = {} | |
@@ -228,7 +228,7 b' def _getpatches(repo, revs, **opts):' | |||||
228 | if r == prev and (repo[None].files() or repo[None].deleted()): |
|
228 | if r == prev and (repo[None].files() or repo[None].deleted()): | |
229 | ui.warn(_('warning: working directory has ' |
|
229 | ui.warn(_('warning: working directory has ' | |
230 | 'uncommitted changes\n')) |
|
230 | 'uncommitted changes\n')) | |
231 |
output = |
|
231 | output = stringio() | |
232 | cmdutil.export(repo, [r], fp=output, |
|
232 | cmdutil.export(repo, [r], fp=output, | |
233 | opts=patch.difffeatureopts(ui, opts, git=True)) |
|
233 | opts=patch.difffeatureopts(ui, opts, git=True)) | |
234 | yield output.getvalue().split('\n') |
|
234 | yield output.getvalue().split('\n') | |
@@ -721,7 +721,7 b' def email(ui, repo, *revs, **opts):' | |||||
721 | if not mbox: |
|
721 | if not mbox: | |
722 | # Exim does not remove the Bcc field |
|
722 | # Exim does not remove the Bcc field | |
723 | del m['Bcc'] |
|
723 | del m['Bcc'] | |
724 |
fp = |
|
724 | fp = stringio() | |
725 | generator = emailmod.Generator.Generator(fp, mangle_from_=False) |
|
725 | generator = emailmod.Generator.Generator(fp, mangle_from_=False) | |
726 | generator.flatten(m, 0) |
|
726 | generator.flatten(m, 0) | |
727 | sendmail(sender_addr, to + bcc + cc, fp.getvalue()) |
|
727 | sendmail(sender_addr, to + bcc + cc, fp.getvalue()) |
@@ -7,7 +7,6 b'' | |||||
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import cStringIO |
|
|||
11 | import gzip |
|
10 | import gzip | |
12 | import os |
|
11 | import os | |
13 | import struct |
|
12 | import struct | |
@@ -26,6 +25,7 b' from . import (' | |||||
26 | scmutil, |
|
25 | scmutil, | |
27 | util, |
|
26 | util, | |
28 | ) |
|
27 | ) | |
|
28 | stringio = util.stringio | |||
29 |
|
29 | |||
30 | # from unzip source code: |
|
30 | # from unzip source code: | |
31 | _UNX_IFREG = 0x8000 |
|
31 | _UNX_IFREG = 0x8000 | |
@@ -172,7 +172,7 b' class tarit(object):' | |||||
172 | i.size = 0 |
|
172 | i.size = 0 | |
173 | else: |
|
173 | else: | |
174 | i.mode = mode |
|
174 | i.mode = mode | |
175 |
data = |
|
175 | data = stringio(data) | |
176 | self.z.addfile(i, data) |
|
176 | self.z.addfile(i, data) | |
177 |
|
177 | |||
178 | def done(self): |
|
178 | def done(self): |
@@ -7,7 +7,6 b'' | |||||
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import cStringIO |
|
|||
11 | import errno |
|
10 | import errno | |
12 | import os |
|
11 | import os | |
13 | import re |
|
12 | import re | |
@@ -46,6 +45,7 b' from . import (' | |||||
46 | templater, |
|
45 | templater, | |
47 | util, |
|
46 | util, | |
48 | ) |
|
47 | ) | |
|
48 | stringio = util.stringio | |||
49 |
|
49 | |||
50 | def ishunk(x): |
|
50 | def ishunk(x): | |
51 | hunkclasses = (crecordmod.uihunk, patch.recordhunk) |
|
51 | hunkclasses = (crecordmod.uihunk, patch.recordhunk) | |
@@ -211,7 +211,7 b' def dorecord(ui, repo, commitfunc, cmdsu' | |||||
211 | util.copyfile(repo.wjoin(f), tmpname, copystat=True) |
|
211 | util.copyfile(repo.wjoin(f), tmpname, copystat=True) | |
212 | backups[f] = tmpname |
|
212 | backups[f] = tmpname | |
213 |
|
213 | |||
214 |
fp = |
|
214 | fp = stringio() | |
215 | for c in chunks: |
|
215 | for c in chunks: | |
216 | fname = c.filename() |
|
216 | fname = c.filename() | |
217 | if fname in backups: |
|
217 | if fname in backups: | |
@@ -3298,7 +3298,7 b' def _performrevert(repo, parents, ctx, a' | |||||
3298 |
|
3298 | |||
3299 | newlyaddedandmodifiedfiles = newandmodified(chunks, originalchunks) |
|
3299 | newlyaddedandmodifiedfiles = newandmodified(chunks, originalchunks) | |
3300 | # Apply changes |
|
3300 | # Apply changes | |
3301 |
fp = |
|
3301 | fp = stringio() | |
3302 | for c in chunks: |
|
3302 | for c in chunks: | |
3303 | c.write(fp) |
|
3303 | c.write(fp) | |
3304 | dopatch = fp.tell() |
|
3304 | dopatch = fp.tell() |
@@ -10,7 +10,6 b'' | |||||
10 |
|
10 | |||
11 | from __future__ import absolute_import |
|
11 | from __future__ import absolute_import | |
12 |
|
12 | |||
13 | import cStringIO |
|
|||
14 | import locale |
|
13 | import locale | |
15 | import os |
|
14 | import os | |
16 | import re |
|
15 | import re | |
@@ -25,6 +24,7 b' from . import (' | |||||
25 | patch as patchmod, |
|
24 | patch as patchmod, | |
26 | util, |
|
25 | util, | |
27 | ) |
|
26 | ) | |
|
27 | stringio = util.stringio | |||
28 |
|
28 | |||
29 | # This is required for ncurses to display non-ASCII characters in default user |
|
29 | # This is required for ncurses to display non-ASCII characters in default user | |
30 | # locale encoding correctly. --immerrr |
|
30 | # locale encoding correctly. --immerrr | |
@@ -238,7 +238,7 b' class uiheader(patchnode):' | |||||
238 |
|
238 | |||
239 |
|
239 | |||
240 | def prettystr(self): |
|
240 | def prettystr(self): | |
241 |
x = |
|
241 | x = stringio() | |
242 | self.pretty(x) |
|
242 | self.pretty(x) | |
243 | return x.getvalue() |
|
243 | return x.getvalue() | |
244 |
|
244 | |||
@@ -449,7 +449,7 b' class uihunk(patchnode):' | |||||
449 | pretty = write |
|
449 | pretty = write | |
450 |
|
450 | |||
451 | def prettystr(self): |
|
451 | def prettystr(self): | |
452 |
x = |
|
452 | x = stringio() | |
453 | self.pretty(x) |
|
453 | self.pretty(x) | |
454 | return x.getvalue() |
|
454 | return x.getvalue() | |
455 |
|
455 | |||
@@ -1506,7 +1506,7 b' are you sure you want to review/edit and' | |||||
1506 | return None |
|
1506 | return None | |
1507 |
|
1507 | |||
1508 | # write the initial patch |
|
1508 | # write the initial patch | |
1509 |
patch = |
|
1509 | patch = stringio() | |
1510 | patch.write(diffhelptext + hunkhelptext) |
|
1510 | patch.write(diffhelptext + hunkhelptext) | |
1511 | chunk.header.write(patch) |
|
1511 | chunk.header.write(patch) | |
1512 | chunk.write(patch) |
|
1512 | chunk.write(patch) |
@@ -990,8 +990,7 b' def _runcommand(ui, options, cmd, cmdfun' | |||||
990 | output = ui.config('profiling', 'output') |
|
990 | output = ui.config('profiling', 'output') | |
991 |
|
991 | |||
992 | if output == 'blackbox': |
|
992 | if output == 'blackbox': | |
993 |
|
|
993 | fp = util.stringio() | |
994 | fp = StringIO.StringIO() |
|
|||
995 | elif output: |
|
994 | elif output: | |
996 | path = ui.expandpath(output) |
|
995 | path = ui.expandpath(output) | |
997 | fp = open(path, 'wb') |
|
996 | fp = open(path, 'wb') |
@@ -7,7 +7,6 b'' | |||||
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import cStringIO |
|
|||
11 | import cgi |
|
10 | import cgi | |
12 | import urllib |
|
11 | import urllib | |
13 | import zlib |
|
12 | import zlib | |
@@ -20,6 +19,7 b' from .. import (' | |||||
20 | util, |
|
19 | util, | |
21 | wireproto, |
|
20 | wireproto, | |
22 | ) |
|
21 | ) | |
|
22 | stringio = util.stringio | |||
23 |
|
23 | |||
24 | HGTYPE = 'application/mercurial-0.1' |
|
24 | HGTYPE = 'application/mercurial-0.1' | |
25 | HGERRTYPE = 'application/hg-error' |
|
25 | HGERRTYPE = 'application/hg-error' | |
@@ -66,7 +66,7 b' class webproto(wireproto.abstractserverp' | |||||
66 | fp.write(s) |
|
66 | fp.write(s) | |
67 | def redirect(self): |
|
67 | def redirect(self): | |
68 | self.oldio = self.ui.fout, self.ui.ferr |
|
68 | self.oldio = self.ui.fout, self.ui.ferr | |
69 |
self.ui.ferr = self.ui.fout = |
|
69 | self.ui.ferr = self.ui.fout = stringio() | |
70 | def restore(self): |
|
70 | def restore(self): | |
71 | val = self.ui.fout.getvalue() |
|
71 | val = self.ui.fout.getvalue() | |
72 | self.ui.ferr, self.ui.fout = self.oldio |
|
72 | self.ui.ferr, self.ui.fout = self.oldio |
@@ -41,7 +41,6 b' from __future__ import absolute_import' | |||||
41 | # Many functions in this file have too many arguments. |
|
41 | # Many functions in this file have too many arguments. | |
42 | # pylint: disable=R0913 |
|
42 | # pylint: disable=R0913 | |
43 |
|
43 | |||
44 | import cStringIO |
|
|||
45 | import errno |
|
44 | import errno | |
46 | import httplib |
|
45 | import httplib | |
47 | import logging |
|
46 | import logging |
@@ -8,7 +8,6 b'' | |||||
8 |
|
8 | |||
9 | from __future__ import absolute_import |
|
9 | from __future__ import absolute_import | |
10 |
|
10 | |||
11 | import cStringIO |
|
|||
12 | import collections |
|
11 | import collections | |
13 | import copy |
|
12 | import copy | |
14 | import email |
|
13 | import email | |
@@ -37,6 +36,7 b' from . import (' | |||||
37 | scmutil, |
|
36 | scmutil, | |
38 | util, |
|
37 | util, | |
39 | ) |
|
38 | ) | |
|
39 | stringio = util.stringio | |||
40 |
|
40 | |||
41 | gitre = re.compile('diff --git a/(.*) b/(.*)') |
|
41 | gitre = re.compile('diff --git a/(.*) b/(.*)') | |
42 | tabsplitter = re.compile(r'(\t+|[^\t]+)') |
|
42 | tabsplitter = re.compile(r'(\t+|[^\t]+)') | |
@@ -60,7 +60,7 b' def split(stream):' | |||||
60 | return len(l) == 2 and ' ' not in l[0] |
|
60 | return len(l) == 2 and ' ' not in l[0] | |
61 |
|
61 | |||
62 | def chunk(lines): |
|
62 | def chunk(lines): | |
63 |
return |
|
63 | return stringio(''.join(lines)) | |
64 |
|
64 | |||
65 | def hgsplit(stream, cur): |
|
65 | def hgsplit(stream, cur): | |
66 | inheader = True |
|
66 | inheader = True | |
@@ -93,7 +93,7 b' def split(stream):' | |||||
93 |
|
93 | |||
94 | def mimesplit(stream, cur): |
|
94 | def mimesplit(stream, cur): | |
95 | def msgfp(m): |
|
95 | def msgfp(m): | |
96 |
fp = |
|
96 | fp = stringio() | |
97 | g = email.Generator.Generator(fp, mangle_from_=False) |
|
97 | g = email.Generator.Generator(fp, mangle_from_=False) | |
98 | g.flatten(m) |
|
98 | g.flatten(m) | |
99 | fp.seek(0) |
|
99 | fp.seek(0) | |
@@ -246,7 +246,7 b' def extract(ui, fileobj):' | |||||
246 |
|
246 | |||
247 | ui.debug('found patch at byte %d\n' % m.start(0)) |
|
247 | ui.debug('found patch at byte %d\n' % m.start(0)) | |
248 | diffs_seen += 1 |
|
248 | diffs_seen += 1 | |
249 |
cfp = |
|
249 | cfp = stringio() | |
250 | for line in payload[:m.start(0)].splitlines(): |
|
250 | for line in payload[:m.start(0)].splitlines(): | |
251 | if line.startswith('# HG changeset patch') and not hgpatch: |
|
251 | if line.startswith('# HG changeset patch') and not hgpatch: | |
252 | ui.debug('patch generated by hg export\n') |
|
252 | ui.debug('patch generated by hg export\n') | |
@@ -1057,7 +1057,7 b' the hunk is left unchanged.' | |||||
1057 | continue |
|
1057 | continue | |
1058 | # Remove comment lines |
|
1058 | # Remove comment lines | |
1059 | patchfp = open(patchfn) |
|
1059 | patchfp = open(patchfn) | |
1060 |
ncpatchfp = |
|
1060 | ncpatchfp = stringio() | |
1061 | for line in patchfp: |
|
1061 | for line in patchfp: | |
1062 | if not line.startswith('#'): |
|
1062 | if not line.startswith('#'): | |
1063 | ncpatchfp.write(line) |
|
1063 | ncpatchfp.write(line) | |
@@ -1440,7 +1440,8 b' def reversehunks(hunks):' | |||||
1440 | ... hunkscomingfromfilterpatch.extend(h.hunks) |
|
1440 | ... hunkscomingfromfilterpatch.extend(h.hunks) | |
1441 |
|
1441 | |||
1442 | >>> reversedhunks = reversehunks(hunkscomingfromfilterpatch) |
|
1442 | >>> reversedhunks = reversehunks(hunkscomingfromfilterpatch) | |
1443 | >>> fp = cStringIO.StringIO() |
|
1443 | >>> from . import util | |
|
1444 | >>> fp = util.stringio() | |||
1444 | >>> for c in reversedhunks: |
|
1445 | >>> for c in reversedhunks: | |
1445 | ... c.write(fp) |
|
1446 | ... c.write(fp) | |
1446 | >>> fp.seek(0) |
|
1447 | >>> fp.seek(0) | |
@@ -1553,7 +1554,7 b' def parsepatch(originalchunks):' | |||||
1553 | } |
|
1554 | } | |
1554 |
|
1555 | |||
1555 | p = parser() |
|
1556 | p = parser() | |
1556 |
fp = |
|
1557 | fp = stringio() | |
1557 | fp.write(''.join(originalchunks)) |
|
1558 | fp.write(''.join(originalchunks)) | |
1558 | fp.seek(0) |
|
1559 | fp.seek(0) | |
1559 |
|
1560 | |||
@@ -1732,7 +1733,7 b' def scangitpatch(lr, firstline):' | |||||
1732 | pos = lr.fp.tell() |
|
1733 | pos = lr.fp.tell() | |
1733 | fp = lr.fp |
|
1734 | fp = lr.fp | |
1734 | except IOError: |
|
1735 | except IOError: | |
1735 |
fp = |
|
1736 | fp = stringio(lr.fp.read()) | |
1736 | gitlr = linereader(fp) |
|
1737 | gitlr = linereader(fp) | |
1737 | gitlr.push(firstline) |
|
1738 | gitlr.push(firstline) | |
1738 | gitpatches = readgitpatch(gitlr) |
|
1739 | gitpatches = readgitpatch(gitlr) |
@@ -7,10 +7,10 b'' | |||||
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import cStringIO |
|
|||
11 | import struct |
|
10 | import struct | |
12 |
|
11 | |||
13 | StringIO = cStringIO.StringIO |
|
12 | from . import pycompat | |
|
13 | stringio = pycompat.stringio | |||
14 |
|
14 | |||
15 | class mpatchError(Exception): |
|
15 | class mpatchError(Exception): | |
16 | """error raised when a delta cannot be decoded |
|
16 | """error raised when a delta cannot be decoded | |
@@ -66,7 +66,7 b' def patches(a, bins):' | |||||
66 | if not tl: |
|
66 | if not tl: | |
67 | return a |
|
67 | return a | |
68 |
|
68 | |||
69 |
m = |
|
69 | m = stringio() | |
70 |
|
70 | |||
71 | # load our original text |
|
71 | # load our original text | |
72 | m.write(a) |
|
72 | m.write(a) |
@@ -7,11 +7,12 b'' | |||||
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import cStringIO |
|
|||
11 | import struct |
|
10 | import struct | |
12 | import zlib |
|
11 | import zlib | |
13 |
|
12 | |||
14 | from .node import nullid |
|
13 | from .node import nullid | |
|
14 | from . import pycompat | |||
|
15 | stringio = pycompat.stringio | |||
15 |
|
16 | |||
16 | _pack = struct.pack |
|
17 | _pack = struct.pack | |
17 | _unpack = struct.unpack |
|
18 | _unpack = struct.unpack | |
@@ -90,7 +91,7 b' def parse_dirstate(dmap, copymap, st):' | |||||
90 |
|
91 | |||
91 | def pack_dirstate(dmap, copymap, pl, now): |
|
92 | def pack_dirstate(dmap, copymap, pl, now): | |
92 | now = int(now) |
|
93 | now = int(now) | |
93 |
cs = |
|
94 | cs = stringio() | |
94 | write = cs.write |
|
95 | write = cs.write | |
95 | write("".join(pl)) |
|
96 | write("".join(pl)) | |
96 | for f, e in dmap.iteritems(): |
|
97 | for f, e in dmap.iteritems(): |
@@ -10,7 +10,6 b'' | |||||
10 | from __future__ import absolute_import |
|
10 | from __future__ import absolute_import | |
11 |
|
11 | |||
12 | import base64 |
|
12 | import base64 | |
13 | import cStringIO |
|
|||
14 | import httplib |
|
13 | import httplib | |
15 | import os |
|
14 | import os | |
16 | import socket |
|
15 | import socket | |
@@ -25,6 +24,7 b' from . import (' | |||||
25 | sslutil, |
|
24 | sslutil, | |
26 | util, |
|
25 | util, | |
27 | ) |
|
26 | ) | |
|
27 | stringio = util.stringio | |||
28 |
|
28 | |||
29 | class passwordmgr(urllib2.HTTPPasswordMgrWithDefaultRealm): |
|
29 | class passwordmgr(urllib2.HTTPPasswordMgrWithDefaultRealm): | |
30 | def __init__(self, ui): |
|
30 | def __init__(self, ui): | |
@@ -273,7 +273,7 b' def _generic_proxytunnel(self):' | |||||
273 | res.length = None |
|
273 | res.length = None | |
274 | res.chunked = 0 |
|
274 | res.chunked = 0 | |
275 | res.will_close = 1 |
|
275 | res.will_close = 1 | |
276 |
res.msg = httplib.HTTPMessage( |
|
276 | res.msg = httplib.HTTPMessage(stringio()) | |
277 | return False |
|
277 | return False | |
278 |
|
278 | |||
279 | res.msg = httplib.HTTPMessage(res.fp) |
|
279 | res.msg = httplib.HTTPMessage(res.fp) |
@@ -74,153 +74,129 b'' | |||||
74 | $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py |
|
74 | $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py | |
75 | contrib/check-code.py: invalid syntax: (unicode error) 'unicodeescape' codec can't decode bytes in position *-*: malformed \N character escape (<unknown>, line *) (glob) |
|
75 | contrib/check-code.py: invalid syntax: (unicode error) 'unicodeescape' codec can't decode bytes in position *-*: malformed \N character escape (<unknown>, line *) (glob) | |
76 | doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
76 | doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
77 | hgext/acl.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
78 | hgext/automv.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) |
|
77 | hgext/automv.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) | |
79 |
hgext/blackbox.py: error importing: < |
|
78 | hgext/blackbox.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
80 | hgext/bugzilla.py: error importing module: <ImportError> No module named 'urlparse' (line *) (glob) |
|
79 | hgext/bugzilla.py: error importing module: <ImportError> No module named 'urlparse' (line *) (glob) | |
81 |
hgext/censor.py: error importing: < |
|
80 | hgext/censor.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
82 | hgext/chgserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) |
|
81 | hgext/chgserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) | |
83 |
hgext/children.py: error importing: < |
|
82 | hgext/children.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
84 |
hgext/churn.py: error importing: < |
|
83 | hgext/churn.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
85 |
hgext/clonebundles.py: error importing: < |
|
84 | hgext/clonebundles.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
86 | hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
85 | hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
87 | hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
86 | hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
88 | hgext/convert/common.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
87 | hgext/convert/common.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) | |
89 |
hgext/convert/convcmd.py: error importing: < |
|
88 | hgext/convert/convcmd.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
90 |
hgext/convert/cvs.py: error importing module: < |
|
89 | hgext/convert/cvs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
91 | hgext/convert/cvsps.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
90 | hgext/convert/cvsps.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) | |
92 |
hgext/convert/darcs.py: error importing |
|
91 | hgext/convert/darcs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
93 | hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
92 | hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
94 |
hgext/convert/git.py: error importing |
|
93 | hgext/convert/git.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
95 |
hgext/convert/gnuarch.py: error importing |
|
94 | hgext/convert/gnuarch.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
96 |
hgext/convert/hg.py: error importing |
|
95 | hgext/convert/hg.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
97 |
hgext/convert/monotone.py: error importing |
|
96 | hgext/convert/monotone.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
98 |
hgext/convert/p*.py: error importing |
|
97 | hgext/convert/p*.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
99 | hgext/convert/subversion.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
98 | hgext/convert/subversion.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) | |
100 | hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *) (glob) |
|
99 | hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *) (glob) | |
101 |
hgext/eol.py: error importing: < |
|
100 | hgext/eol.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
102 |
hgext/extdiff.py: error importing: < |
|
101 | hgext/extdiff.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
103 |
hgext/factotum.py: error importing: <ImportError> No module named ' |
|
102 | hgext/factotum.py: error importing: <ImportError> No module named 'httplib' (error at url.py:*) (glob) | |
104 | hgext/fetch.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) |
|
103 | hgext/fetch.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) | |
105 | hgext/fsmonitor/state.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
104 | hgext/fsmonitor/watchmanclient.py: error importing module: <SystemError> Parent module 'hgext.fsmonitor' not loaded, cannot perform relative import (line *) (glob) | |
106 | hgext/fsmonitor/watchmanclient.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
105 | hgext/gpg.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) | |
107 |
hgext/gpg.py: error importing: < |
|
106 | hgext/graphlog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
108 |
hgext/ |
|
107 | hgext/hgcia.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
109 |
hgext/hg |
|
108 | hgext/hgk.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
110 | hgext/hgk.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
|||
111 | hgext/highlight/highlight.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
112 | hgext/histedit.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
109 | hgext/histedit.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
113 |
hgext/keyword.py: error importing: <ImportError> No module named ' |
|
110 | hgext/keyword.py: error importing: <ImportError> No module named 'BaseHTTPServer' (error at common.py:*) (glob) | |
114 |
hgext/largefiles/basestore.py: error importing: < |
|
111 | hgext/largefiles/basestore.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
115 |
hgext/largefiles/lfcommands.py: error importing: < |
|
112 | hgext/largefiles/lfcommands.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
116 |
hgext/largefiles/lfutil.py: error importing: < |
|
113 | hgext/largefiles/lfutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
117 | hgext/largefiles/localstore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) |
|
114 | hgext/largefiles/localstore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) | |
118 |
hgext/largefiles/overrides.py: error importing: < |
|
115 | hgext/largefiles/overrides.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
119 | hgext/largefiles/proto.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) |
|
116 | hgext/largefiles/proto.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) | |
120 | hgext/largefiles/remotestore.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) |
|
117 | hgext/largefiles/remotestore.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) | |
121 |
hgext/largefiles/reposetup.py: error importing: < |
|
118 | hgext/largefiles/reposetup.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
122 | hgext/largefiles/uisetup.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob) |
|
119 | hgext/largefiles/uisetup.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob) | |
123 | hgext/largefiles/wirestore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) |
|
120 | hgext/largefiles/wirestore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) | |
124 | hgext/mq.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
121 | hgext/mq.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) | |
125 |
hgext/notify.py: error importing: < |
|
122 | hgext/notify.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
126 |
hgext/pager.py: error importing: < |
|
123 | hgext/pager.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
127 | hgext/patchbomb.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
124 | hgext/patchbomb.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
128 |
hgext/purge.py: error importing: < |
|
125 | hgext/purge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
129 |
hgext/rebase.py: error importing: < |
|
126 | hgext/rebase.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
130 |
hgext/record.py: error importing: < |
|
127 | hgext/record.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
131 |
hgext/relink.py: error importing: < |
|
128 | hgext/relink.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
132 |
hgext/schemes.py: error importing: < |
|
129 | hgext/schemes.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
133 |
hgext/share.py: error importing: < |
|
130 | hgext/share.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
134 | hgext/shelve.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
131 | hgext/shelve.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
135 |
hgext/strip.py: error importing: < |
|
132 | hgext/strip.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
136 | hgext/transplant.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
133 | hgext/transplant.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
137 | hgext/win*text.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
138 | mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
134 | mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
139 |
mercurial/b |
|
135 | mercurial/branchmap.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
140 | mercurial/branchmap.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
141 | mercurial/bundle*.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
136 | mercurial/bundle*.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
142 | mercurial/bundlerepo.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
137 | mercurial/bundlerepo.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
143 | mercurial/byterange.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) |
|
138 | mercurial/byterange.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) | |
144 |
mercurial/changegroup.py: error importing: < |
|
139 | mercurial/changegroup.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
145 |
mercurial/changelog.py: error importing: < |
|
140 | mercurial/changelog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
146 |
mercurial/cmdutil.py: error importing |
|
141 | mercurial/cmdutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
147 | mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
142 | mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
148 | mercurial/commandserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) |
|
143 | mercurial/commandserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) | |
149 |
mercurial/con |
|
144 | mercurial/context.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
150 |
mercurial/co |
|
145 | mercurial/copies.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
151 |
mercurial/c |
|
146 | mercurial/crecord.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
152 | mercurial/crecord.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
147 | mercurial/dirstate.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
153 |
mercurial/d |
|
148 | mercurial/discovery.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
154 |
mercurial/di |
|
149 | mercurial/dispatch.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
155 | mercurial/discovery.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
156 | mercurial/dispatch.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
|||
157 | mercurial/exchange.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) |
|
150 | mercurial/exchange.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) | |
158 |
mercurial/extensions.py: error importing: < |
|
151 | mercurial/extensions.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
159 |
mercurial/filelog.py: error importing: < |
|
152 | mercurial/filelog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
160 |
mercurial/filemerge.py: error importing: < |
|
153 | mercurial/filemerge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
161 |
mercurial/fileset.py: error importing: < |
|
154 | mercurial/fileset.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
162 | mercurial/formatter.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
155 | mercurial/formatter.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) | |
163 |
mercurial/graphmod.py: error importing: < |
|
156 | mercurial/graphmod.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
164 |
mercurial/help.py: error importing: < |
|
157 | mercurial/help.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
165 |
mercurial/hg.py: error importing: < |
|
158 | mercurial/hg.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
166 | mercurial/hgweb/common.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) |
|
159 | mercurial/hgweb/common.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) | |
167 | mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
160 | mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
168 | mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
161 | mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
169 |
mercurial/hgweb/protocol.py: error importing module: < |
|
162 | mercurial/hgweb/protocol.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
170 | mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
163 | mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
171 | mercurial/hgweb/server.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) |
|
164 | mercurial/hgweb/server.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) | |
172 | mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
165 | mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
173 | mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
166 | mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
174 | mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
167 | mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
175 |
mercurial/hook.py: error importing: < |
|
168 | mercurial/hook.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
176 | mercurial/httpclient/_readers.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
169 | mercurial/httpclient/_readers.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) | |
177 | mercurial/httpconnection.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) |
|
170 | mercurial/httpconnection.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) | |
178 | mercurial/httppeer.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
171 | mercurial/httppeer.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) | |
179 | mercurial/keepalive.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
172 | mercurial/keepalive.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) | |
180 |
mercurial/localrepo.py: error importing: < |
|
173 | mercurial/localrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
181 |
mercurial/l |
|
174 | mercurial/mail.py: error importing module: <AttributeError> module 'email' has no attribute 'Header' (line *) (glob) | |
182 |
mercurial/ma |
|
175 | mercurial/manifest.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
183 |
mercurial/m |
|
176 | mercurial/merge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
184 |
mercurial/ |
|
177 | mercurial/namespaces.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
185 |
mercurial/ |
|
178 | mercurial/patch.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
186 |
mercurial/ |
|
179 | mercurial/pure/mpatch.py: error importing module: <ImportError> cannot import name 'pycompat' (line *) (glob) | |
187 |
mercurial/ |
|
180 | mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'mercurial.pure.node' (line *) (glob) | |
188 | mercurial/namespaces.py: error importing: <ImportError> No module named 'cStringIO' (error at patch.py:*) (glob) |
|
|||
189 | mercurial/obsolete.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
190 | mercurial/patch.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
|||
191 | mercurial/pathutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
192 | mercurial/peer.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
193 | mercurial/pure/mpatch.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
|||
194 | mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
|||
195 | mercurial/pushkey.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
196 | mercurial/pvec.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
197 | mercurial/registrar.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
198 | mercurial/repair.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
181 | mercurial/repair.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
199 |
mercurial/re |
|
182 | mercurial/revlog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
200 | mercurial/revlog.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob) |
|
183 | mercurial/revset.py: error importing module: <AttributeError> 'dict' object has no attribute 'iteritems' (line *) (glob) | |
201 |
mercurial/ |
|
184 | mercurial/scmutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
202 | mercurial/scmutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
203 | mercurial/scmwindows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) |
|
185 | mercurial/scmwindows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) | |
204 |
mercurial/sim |
|
186 | mercurial/simplemerge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
205 |
mercurial/s |
|
187 | mercurial/sshpeer.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at wireproto.py:*) (glob) | |
206 |
mercurial/ssh |
|
188 | mercurial/sshserver.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
207 | mercurial/sshserver.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob) |
|
|||
208 | mercurial/sslutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
209 | mercurial/statichttprepo.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) |
|
189 | mercurial/statichttprepo.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob) | |
210 |
mercurial/store.py: error importing: < |
|
190 | mercurial/store.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
211 |
mercurial/streamclone.py: error importing: < |
|
191 | mercurial/streamclone.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
212 |
mercurial/subrepo.py: error importing: < |
|
192 | mercurial/subrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
213 |
mercurial/t |
|
193 | mercurial/templatefilters.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
214 |
mercurial/t |
|
194 | mercurial/templatekw.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
215 |
mercurial/template |
|
195 | mercurial/templater.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
216 |
mercurial/ |
|
196 | mercurial/ui.py: error importing: <ImportError> No module named 'cPickle' (error at formatter.py:*) (glob) | |
217 |
mercurial/ |
|
197 | mercurial/unionrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
218 |
mercurial/ |
|
198 | mercurial/url.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) | |
219 |
mercurial/ |
|
199 | mercurial/verify.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
220 | mercurial/unionrepo.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob) |
|
|||
221 | mercurial/url.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob) |
|
|||
222 | mercurial/util.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob) |
|
|||
223 | mercurial/verify.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob) |
|
|||
224 | mercurial/win*.py: error importing module: <ImportError> No module named 'msvcrt' (line *) (glob) |
|
200 | mercurial/win*.py: error importing module: <ImportError> No module named 'msvcrt' (line *) (glob) | |
225 | mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) |
|
201 | mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) | |
226 | mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
202 | mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
@@ -18,14 +18,17 b' should be used from d74fc8dec2b4 onward ' | |||||
18 | > from __future__ import absolute_import |
|
18 | > from __future__ import absolute_import | |
19 | > import os |
|
19 | > import os | |
20 | > import sys |
|
20 | > import sys | |
21 | > from StringIO import StringIO |
|
|||
22 | > from mercurial.hgweb import ( |
|
21 | > from mercurial.hgweb import ( | |
23 | > hgweb, |
|
22 | > hgweb, | |
24 | > hgwebdir, |
|
23 | > hgwebdir, | |
25 | > ) |
|
24 | > ) | |
|
25 | > from mercurial import ( | |||
|
26 | > util, | |||
|
27 | > ) | |||
|
28 | > stringio = util.stringio | |||
26 | > |
|
29 | > | |
27 |
> errors = |
|
30 | > errors = stringio() | |
28 |
> input = |
|
31 | > input = stringio() | |
29 | > |
|
32 | > | |
30 | > def startrsp(status, headers): |
|
33 | > def startrsp(status, headers): | |
31 | > print '---- STATUS' |
|
34 | > print '---- STATUS' | |
@@ -59,11 +62,11 b' should be used from d74fc8dec2b4 onward ' | |||||
59 | > print '---- ERRORS' |
|
62 | > print '---- ERRORS' | |
60 | > print errors.getvalue() |
|
63 | > print errors.getvalue() | |
61 | > |
|
64 | > | |
62 |
> output = |
|
65 | > output = stringio() | |
63 | > env['QUERY_STRING'] = 'style=atom' |
|
66 | > env['QUERY_STRING'] = 'style=atom' | |
64 | > process(hgweb('.', name='repo')) |
|
67 | > process(hgweb('.', name='repo')) | |
65 | > |
|
68 | > | |
66 |
> output = |
|
69 | > output = stringio() | |
67 | > env['QUERY_STRING'] = 'style=raw' |
|
70 | > env['QUERY_STRING'] = 'style=raw' | |
68 | > process(hgwebdir({'repo': '.'})) |
|
71 | > process(hgwebdir({'repo': '.'})) | |
69 | > EOF |
|
72 | > EOF |
@@ -18,14 +18,17 b' should be used from d74fc8dec2b4 onward ' | |||||
18 | > from __future__ import absolute_import |
|
18 | > from __future__ import absolute_import | |
19 | > import os |
|
19 | > import os | |
20 | > import sys |
|
20 | > import sys | |
21 | > from StringIO import StringIO |
|
|||
22 | > from mercurial.hgweb import ( |
|
21 | > from mercurial.hgweb import ( | |
23 | > hgweb, |
|
22 | > hgweb, | |
24 | > hgwebdir, |
|
23 | > hgwebdir, | |
25 | > ) |
|
24 | > ) | |
|
25 | > from mercurial import ( | |||
|
26 | > util, | |||
|
27 | > ) | |||
|
28 | > stringio = util.stringio | |||
26 | > |
|
29 | > | |
27 |
> errors = |
|
30 | > errors = stringio() | |
28 |
> input = |
|
31 | > input = stringio() | |
29 | > |
|
32 | > | |
30 | > def startrsp(status, headers): |
|
33 | > def startrsp(status, headers): | |
31 | > print '---- STATUS' |
|
34 | > print '---- STATUS' | |
@@ -58,22 +61,22 b' should be used from d74fc8dec2b4 onward ' | |||||
58 | > print '---- ERRORS' |
|
61 | > print '---- ERRORS' | |
59 | > print errors.getvalue() |
|
62 | > print errors.getvalue() | |
60 | > |
|
63 | > | |
61 |
> output = |
|
64 | > output = stringio() | |
62 | > env['PATH_INFO'] = '/' |
|
65 | > env['PATH_INFO'] = '/' | |
63 | > env['QUERY_STRING'] = 'style=atom' |
|
66 | > env['QUERY_STRING'] = 'style=atom' | |
64 | > process(hgweb('.', name = 'repo')) |
|
67 | > process(hgweb('.', name = 'repo')) | |
65 | > |
|
68 | > | |
66 |
> output = |
|
69 | > output = stringio() | |
67 | > env['PATH_INFO'] = '/file/tip/' |
|
70 | > env['PATH_INFO'] = '/file/tip/' | |
68 | > env['QUERY_STRING'] = 'style=raw' |
|
71 | > env['QUERY_STRING'] = 'style=raw' | |
69 | > process(hgweb('.', name = 'repo')) |
|
72 | > process(hgweb('.', name = 'repo')) | |
70 | > |
|
73 | > | |
71 |
> output = |
|
74 | > output = stringio() | |
72 | > env['PATH_INFO'] = '/' |
|
75 | > env['PATH_INFO'] = '/' | |
73 | > env['QUERY_STRING'] = 'style=raw' |
|
76 | > env['QUERY_STRING'] = 'style=raw' | |
74 | > process(hgwebdir({'repo': '.'})) |
|
77 | > process(hgwebdir({'repo': '.'})) | |
75 | > |
|
78 | > | |
76 |
> output = |
|
79 | > output = stringio() | |
77 | > env['PATH_INFO'] = '/repo/file/tip/' |
|
80 | > env['PATH_INFO'] = '/repo/file/tip/' | |
78 | > env['QUERY_STRING'] = 'style=raw' |
|
81 | > env['QUERY_STRING'] = 'style=raw' | |
79 | > process(hgwebdir({'repo': '.'})) |
|
82 | > process(hgwebdir({'repo': '.'})) |
@@ -10,16 +10,17 b' by the WSGI standard and strictly implem' | |||||
10 | > from __future__ import absolute_import |
|
10 | > from __future__ import absolute_import | |
11 | > import os |
|
11 | > import os | |
12 | > import sys |
|
12 | > import sys | |
13 | > from StringIO import StringIO |
|
|||
14 | > from mercurial import ( |
|
13 | > from mercurial import ( | |
15 | > dispatch, |
|
14 | > dispatch, | |
16 | > hg, |
|
15 | > hg, | |
17 | > ui as uimod, |
|
16 | > ui as uimod, | |
|
17 | > util, | |||
18 | > ) |
|
18 | > ) | |
19 | > ui = uimod.ui |
|
19 | > ui = uimod.ui | |
20 | > from mercurial.hgweb.hgweb_mod import ( |
|
20 | > from mercurial.hgweb.hgweb_mod import ( | |
21 | > hgweb, |
|
21 | > hgweb, | |
22 | > ) |
|
22 | > ) | |
|
23 | > stringio = util.stringio | |||
23 | > |
|
24 | > | |
24 | > class FileLike(object): |
|
25 | > class FileLike(object): | |
25 | > def __init__(self, real): |
|
26 | > def __init__(self, real): | |
@@ -35,9 +36,9 b' by the WSGI standard and strictly implem' | |||||
35 | > return self.real.readline() |
|
36 | > return self.real.readline() | |
36 | > |
|
37 | > | |
37 | > sys.stdin = FileLike(sys.stdin) |
|
38 | > sys.stdin = FileLike(sys.stdin) | |
38 |
> errors = |
|
39 | > errors = stringio() | |
39 |
> input = |
|
40 | > input = stringio() | |
40 |
> output = |
|
41 | > output = stringio() | |
41 | > |
|
42 | > | |
42 | > def startrsp(status, headers): |
|
43 | > def startrsp(status, headers): | |
43 | > print '---- STATUS' |
|
44 | > print '---- STATUS' |
@@ -36,8 +36,7 b' class Merge3(simplemerge.Merge3Text):' | |||||
36 | CantReprocessAndShowBase = simplemerge.CantReprocessAndShowBase |
|
36 | CantReprocessAndShowBase = simplemerge.CantReprocessAndShowBase | |
37 |
|
37 | |||
38 | def split_lines(t): |
|
38 | def split_lines(t): | |
39 | from cStringIO import StringIO |
|
39 | return util.stringio(t).readlines() | |
40 | return StringIO(t).readlines() |
|
|||
41 |
|
40 | |||
42 | ############################################################ |
|
41 | ############################################################ | |
43 | # test case data from the gnu diffutils manual |
|
42 | # test case data from the gnu diffutils manual |
@@ -1,9 +1,10 b'' | |||||
1 | from __future__ import absolute_import, print_function |
|
1 | from __future__ import absolute_import, print_function | |
2 |
|
2 | |||
3 | import StringIO |
|
|||
4 | from mercurial import ( |
|
3 | from mercurial import ( | |
|
4 | util, | |||
5 | wireproto, |
|
5 | wireproto, | |
6 | ) |
|
6 | ) | |
|
7 | stringio = util.stringio | |||
7 |
|
8 | |||
8 | class proto(object): |
|
9 | class proto(object): | |
9 | def __init__(self, args): |
|
10 | def __init__(self, args): | |
@@ -25,7 +26,7 b' class clientpeer(wireproto.wirepeer):' | |||||
25 | return wireproto.dispatch(self.serverrepo, proto(args), cmd) |
|
26 | return wireproto.dispatch(self.serverrepo, proto(args), cmd) | |
26 |
|
27 | |||
27 | def _callstream(self, cmd, **args): |
|
28 | def _callstream(self, cmd, **args): | |
28 |
return |
|
29 | return stringio(self._call(cmd, **args)) | |
29 |
|
30 | |||
30 | @wireproto.batchable |
|
31 | @wireproto.batchable | |
31 | def greet(self, name): |
|
32 | def greet(self, name): |
General Comments 0
You need to be logged in to leave comments.
Login now