Merge lp:~alex-idereal/bzr-xmloutput/fix-xmlmissing-exception into lp:bzr-xmloutput

Proposed by Piotr Piastucki
Status: Needs review
Proposed branch: lp:~alex-idereal/bzr-xmloutput/fix-xmlmissing-exception
Merge into: lp:bzr-xmloutput
Diff against target: 478 lines (+236/-47)
10 files modified
info.py (+1/-1)
installer/bzr-xmloutput-setup.nsi (+1/-1)
lsxml.py (+22/-5)
missingxml.py (+1/-1)
service.py (+40/-6)
shelvexml.py (+15/-11)
tagsxml.py (+23/-19)
tests/test_ls_xml.py (+59/-1)
tests/test_progress.py (+48/-0)
uifactory.py (+26/-2)
To merge this branch: bzr merge lp:~alex-idereal/bzr-xmloutput/fix-xmlmissing-exception
Reviewer Review Type Date Requested Status
Guillermo Gonzalez Pending
Review via email: mp+192807@code.launchpad.net

Description of the change

missingxml: Don't throw exception if local branch has no parent.
Use other_branch to fill in <last_location> URL instead of parent.
This seems correct since it's the branch being used to calculate what's missing, and it avoids an exception when parent is None. Hopefully nothing depends on the previous broken behaviour.

To post a comment you must log in.

Unmerged revisions

183. By Alexander Taler

missingxml: Don't throw exception if local branch has no parent.

Use other_branch to fill in <last_location> URL instead of parent.

This seems correct since it's the branch being used to calculate what's missing, and it avoids an exception when parent is None. Hopefully nothing depends on the previous broken behaviour.

182. By Piotr Piastucki

Increase version number to 0.9.1

181. By Piotr Piastucki

Merge lp:~rom1-chal/bzr-xmloutput/bugfix-persistent-ssh
Add an experimental workaround for bzr not closing ssh connections.
This is not a real fix but it seems to work.

180. By Piotr Piastucki

Merge lp:~bzr-eclipse/bzr-xmloutput/xmlls-verbose-mode

179. By Piotr Piastucki

Merge lp:~piastucki/bzr-xmloutput/missing-locks

178. By Piotr Piastucki

Sync with main branch

177. By Piotr Piastucki

Merge lp:~piastucki/bzr-xmloutput/fix-551351-ignored-in-symlink-root

176. By Piotr Piastucki

Fix handling of files with execute bit changed in xmlstatus
Introduce new attribute called meta_modfied instead of changing the file path and appending an asterisk for files with changes in execute bit.

175. By Piotr Piastucki

Fix no _encoding attribute issue due to changes between bzr 2.6b1 and 2.6b3

174. By Alexander Taler

Increase version number to 0.9.0.

To support bzr-eclipse release 1.2.0

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'info.py'
--- info.py 2013-03-05 12:38:17 +0000
+++ info.py 2013-10-27 06:44:02 +0000
@@ -17,7 +17,7 @@
17bzr_plugin_name = "xmloutput"17bzr_plugin_name = "xmloutput"
1818
19# See bzrlib/__init__.py for the definition of version tuple format19# See bzrlib/__init__.py for the definition of version tuple format
20bzr_plugin_version = (0, 8, 9, 'final', 0)20bzr_plugin_version = (0, 9, 1, 'final', 0)
2121
22bzr_commands = ['xmlannotate', 'xmlconflicts', 'xmlinfo', 'xmlmissing', 'xmllog', 'xmlls',22bzr_commands = ['xmlannotate', 'xmlconflicts', 'xmlinfo', 'xmlmissing', 'xmllog', 'xmlls',
23 'xmlplugins', 'xmlshelvelist', 'xmltags', 'xmlversion', 'start-xmlrpc', 'stop-xmlrpc']23 'xmlplugins', 'xmlshelvelist', 'xmltags', 'xmlversion', 'start-xmlrpc', 'stop-xmlrpc']
2424
=== modified file 'installer/bzr-xmloutput-setup.nsi'
--- installer/bzr-xmloutput-setup.nsi 2011-11-05 05:17:49 +0000
+++ installer/bzr-xmloutput-setup.nsi 2013-10-27 06:44:02 +0000
@@ -1,5 +1,5 @@
1!define PRODUCT_NAME "bzr-xmloutput"1!define PRODUCT_NAME "bzr-xmloutput"
2!define PRODUCT_VERSION "0.8.8"2!define PRODUCT_VERSION "0.9.1"
3!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"3!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
4!define PRODUCT_UNINST_ROOT_KEY "HKLM"4!define PRODUCT_UNINST_ROOT_KEY "HKLM"
55
66
=== modified file 'lsxml.py'
--- lsxml.py 2013-07-04 21:31:29 +0000
+++ lsxml.py 2013-10-27 06:44:02 +0000
@@ -57,10 +57,13 @@
57 prefix = fs_path + '/'57 prefix = fs_path + '/'
5858
59 if revision is not None:59 if revision is not None:
60 tree = branch.repository.revision_tree(60 tree = r_tree = branch.repository.revision_tree(
61 revision[0].as_revision_id(branch))61 revision[0].as_revision_id(branch))
62 elif tree is None:62 else:
63 tree = branch.basis_tree()63 if tree is None:
64 tree = branch.basis_tree()
65 if verbose:
66 r_tree = branch.basis_tree()
6467
65 tree.lock_read()68 tree.lock_read()
66 try:69 try:
@@ -79,15 +82,29 @@
79 pattern = ''82 pattern = ''
80 if prefix:83 if prefix:
81 fp = osutils.pathjoin(prefix, fp)84 fp = osutils.pathjoin(prefix, fp)
85 verbosestr = ''
82 if fid is None:86 if fid is None:
83 fid = ''87 fid = ''
84 else:88 else:
89 if verbose:
90 try:
91 revid = r_tree.get_file_revision(fid)
92 revno = branch.revision_id_to_dotted_revno(revid)
93 if isinstance(revno, tuple):
94 revno = '.'.join(map(str, revno))
95 rev = branch.repository.get_revision(revid)
96 date_str = osutils.format_date(rev.timestamp, rev.timezone or 0)
97 verbosestr='<log><revno>%s</revno><committer>%s</committer><timestamp>%s</timestamp></log>' \
98 % (revno, _escape_cdata(rev.committer), date_str)
99 except:
100 # e.g. newly added file not existing in any revision yet
101 pass
85 fid = '<id>%s</id>' % _escape_cdata(fid)102 fid = '<id>%s</id>' % _escape_cdata(fid)
86 fkind = '<kind>%s</kind>' % fkind103 fkind = '<kind>%s</kind>' % fkind
87 status_kind = '<status_kind>%s</status_kind>' % long_status_kind[fc]104 status_kind = '<status_kind>%s</status_kind>' % long_status_kind[fc]
88 fpath = '<path>%s</path>' % _escape_cdata(fp)105 fpath = '<path>%s</path>' % _escape_cdata(fp)
89 outstring = '<item>%s%s%s%s%s</item>' % (fid, fkind, fpath,106 outstring = '<item>%s%s%s%s%s%s</item>' % (fid, fkind, fpath,
90 status_kind, pattern)107 status_kind, pattern, verbosestr)
91 outf.write(outstring)108 outf.write(outstring)
92 finally:109 finally:
93 outf.write('</list>')110 outf.write('</list>')
94111
=== modified file 'missingxml.py'
--- missingxml.py 2010-02-08 04:37:36 +0000
+++ missingxml.py 2013-10-27 06:44:02 +0000
@@ -52,7 +52,7 @@
52 if other_branch is None:52 if other_branch is None:
53 raise errors.BzrCommandError("No peer location known"53 raise errors.BzrCommandError("No peer location known"
54 " or specified.")54 " or specified.")
55 display_url = urlutils.unescape_for_display(parent,55 display_url = urlutils.unescape_for_display(other_branch,
56 self.outf.encoding)56 self.outf.encoding)
5757
58 remote_branch = Branch.open(other_branch)58 remote_branch = Branch.open(other_branch)
5959
=== modified file 'service.py'
--- service.py 2013-02-16 15:30:39 +0000
+++ service.py 2013-10-27 06:44:02 +0000
@@ -36,20 +36,49 @@
36import logging36import logging
37import traceback37import traceback
38from cStringIO import StringIO38from cStringIO import StringIO
39import gc
39""")40""")
4041
41from bzrlib.plugins.xmloutput.xml_errors import XMLError42from bzrlib.plugins.xmloutput.xml_errors import XMLError
42from xmlrpclib import Fault, Binary43from xmlrpclib import Fault, Binary
43from SimpleXMLRPCServer import SimpleXMLRPCServer44from SimpleXMLRPCServer import SimpleXMLRPCServer
45import threading
4446
45run_dir = os.getcwdu()47run_dir = os.getcwdu()
4648
49class BzrXMLRPCProgressServer(SimpleXMLRPCServer):
50 """ Very simple xmlrpc server to handle progress reporting"""
51
52 finished = False
53
54 def __init__(self, addr, logRequests=False, to_file=None):
55 SimpleXMLRPCServer.__init__(self, addr=addr,
56 logRequests=logRequests)
57 self.register_function(self.get_bzr_progress)
58
59 def shutdown(self):
60 """ stop serving and return 1 """
61 self.finished = True
62 self.server_close()
63 return 1
64
65 def serve_forever(self):
66 """Start serving, and block"""
67 while not self.finished:
68 self.handle_request()
69
70 def get_bzr_progress(self, argv):
71 """get bzr command progress"""
72 import uifactory
73 progress = uifactory.current_progress.get('|'.join(argv), '')
74 return progress
4775
48class BzrXMLRPCServer(SimpleXMLRPCServer):76class BzrXMLRPCServer(SimpleXMLRPCServer):
49 """ Very simple xmlrpc server to handle bzr commands and search"""77 """ Very simple xmlrpc server to handle bzr commands and search"""
5078
51 finished = False79 finished = False
5280 progress_server = None
81
53 def __init__(self, addr, logRequests=False, to_file=None):82 def __init__(self, addr, logRequests=False, to_file=None):
54 SimpleXMLRPCServer.__init__(self, addr=addr,83 SimpleXMLRPCServer.__init__(self, addr=addr,
55 logRequests=logRequests)84 logRequests=logRequests)
@@ -74,10 +103,18 @@
74 """ stop serving and return 1 """103 """ stop serving and return 1 """
75 self.finished = True104 self.finished = True
76 self.server_close()105 self.server_close()
106 if self.progress_server is not None:
107 self.progress_server.shutdown()
77 return 1108 return 1
78109
79 def serve_forever(self):110 def serve_forever(self):
80 """Start serving, and block"""111 """Start serving, and block"""
112 if os.environ.get('BZR_PROGRESS_BAR') == 'xmlrpc':
113 host, port = self.socket.getsockname()
114 self.progress_server = BzrXMLRPCProgressServer((host, port + 1), False)
115 thread = threading.Thread(target=self.progress_server.serve_forever)
116 thread.setDaemon(True)
117 thread.start()
81 import bzrlib.osutils118 import bzrlib.osutils
82 default_encoding = 'UTF-8'119 default_encoding = 'UTF-8'
83 if hasattr(bzrlib, 'user_encoding'):120 if hasattr(bzrlib, 'user_encoding'):
@@ -95,7 +132,6 @@
95 """ simple reply to hello request, 'world!'"""132 """ simple reply to hello request, 'world!'"""
96 return 'world!'133 return 'world!'
97134
98
99class redirect_output(object):135class redirect_output(object):
100 """decorator to redirect stdout/err to a StringIO"""136 """decorator to redirect stdout/err to a StringIO"""
101137
@@ -136,7 +172,6 @@
136 """run a regular bzr command"""172 """run a regular bzr command"""
137 return _run_bzr(argv, workdir, False)173 return _run_bzr(argv, workdir, False)
138174
139
140@redirect_output175@redirect_output
141def run_bzr_xml(argv, workdir):176def run_bzr_xml(argv, workdir):
142 """run a bzr command, but handle errors using XMLError"""177 """run a bzr command, but handle errors using XMLError"""
@@ -155,6 +190,7 @@
155 exitval = custom_commands_main(argv, username, password)190 exitval = custom_commands_main(argv, username, password)
156 else:191 else:
157 exitval = commands.main(argv)192 exitval = commands.main(argv)
193 gc.collect()
158 sys.stderr.flush()194 sys.stderr.flush()
159 sys.stdout.flush()195 sys.stdout.flush()
160 if isinstance(exitval, Fault):196 if isinstance(exitval, Fault):
@@ -171,12 +207,11 @@
171 traceback.print_exc(file=sys.__stderr__)207 traceback.print_exc(file=sys.__stderr__)
172 raise208 raise
173209
174
175def custom_commands_main(argv, username=None, password=None):210def custom_commands_main(argv, username=None, password=None):
176 """custom commands.main that handle errors using XMLError"""211 """custom commands.main that handle errors using XMLError"""
177 import bzrlib.ui212 import bzrlib.ui
178 from uifactory import AuthenticatingUIFactory213 from uifactory import AuthenticatingUIFactory
179 bzrlib.ui.ui_factory = AuthenticatingUIFactory(sys.stdin, sys.stdout, sys.stderr, username, password)214 bzrlib.ui.ui_factory = AuthenticatingUIFactory(sys.stdin, sys.stdout, sys.stderr, username, password, argv)
180 try:215 try:
181 _argv = []216 _argv = []
182 for a in argv[1:]:217 for a in argv[1:]:
@@ -192,7 +227,6 @@
192 traceback.print_exc(file=sys.__stderr__)227 traceback.print_exc(file=sys.__stderr__)
193 raise Fault(32, str(XMLError(e)))228 raise Fault(32, str(XMLError(e)))
194229
195
196def register_functions(server):230def register_functions(server):
197 """register functions exposed via xmlrpc."""231 """register functions exposed via xmlrpc."""
198 server.register_function(run_bzr, 'run_bzr_command')232 server.register_function(run_bzr, 'run_bzr_command')
199233
=== modified file 'shelvexml.py'
--- shelvexml.py 2013-02-27 13:38:55 +0000
+++ shelvexml.py 2013-10-27 06:44:02 +0000
@@ -29,16 +29,20 @@
2929
30def list_xml(outf, directory='.'):30def list_xml(outf, directory='.'):
31 tree = WorkingTree.open_containing(directory)[0]31 tree = WorkingTree.open_containing(directory)[0]
32 manager = tree.get_shelf_manager()32 tree.lock_read()
33 shelves = manager.active_shelves()33 try:
34 outf.write('<?xml version="1.0" encoding="%s"?>' % \34 manager = tree.get_shelf_manager()
35 bzrlib.osutils.get_user_encoding())35 shelves = manager.active_shelves()
36 outf.write('<shelves>')36 outf.write('<?xml version="1.0" encoding="%s"?>' % \
37 for shelf_id in reversed(shelves):37 bzrlib.osutils.get_user_encoding())
38 message = manager.get_metadata(shelf_id).get('message')38 outf.write('<shelves>')
39 if message is None:39 for shelf_id in reversed(shelves):
40 message = ''40 message = manager.get_metadata(shelf_id).get('message')
41 outf.write('<shelf><id>%s</id><message>%s</message></shelf>' % (shelf_id, _escape_cdata(message)))41 if message is None:
42 outf.write('</shelves>')42 message = ''
43 outf.write('<shelf><id>%s</id><message>%s</message></shelf>' % (shelf_id, _escape_cdata(message)))
44 outf.write('</shelves>')
45 finally:
46 tree.unlock()
4347
4448
4549
=== modified file 'tagsxml.py'
--- tagsxml.py 2013-02-22 21:13:54 +0000
+++ tagsxml.py 2013-10-27 06:44:02 +0000
@@ -37,25 +37,29 @@
37 bzrlib.osutils.get_user_encoding())37 bzrlib.osutils.get_user_encoding())
38 outf.write('<tags>')38 outf.write('<tags>')
39 if tags:39 if tags:
40 if sort is None:40 branch.lock_read()
41 sort = tag_sort_methods.get()41 try:
42 sort(branch, tags)42 if sort is None:
43 if not show_ids:43 sort = tag_sort_methods.get()
44 # [ (tag, revid), ... ] -> [ (tag, dotted_revno), ... ]44 sort(branch, tags)
45 for index, (tag, revid) in enumerate(tags):45 if not show_ids:
46 try:46 # [ (tag, revid), ... ] -> [ (tag, dotted_revno), ... ]
47 revno = branch.revision_id_to_dotted_revno(revid)47 for index, (tag, revid) in enumerate(tags):
48 if isinstance(revno, tuple):48 try:
49 revno = '.'.join(map(str, revno))49 revno = branch.revision_id_to_dotted_revno(revid)
50 except (errors.NoSuchRevision,50 if isinstance(revno, tuple):
51 errors.GhostRevisionsHaveNoRevno,51 revno = '.'.join(map(str, revno))
52 errors.UnsupportedOperation):52 except (errors.NoSuchRevision,
53 # Bad tag data/merges can lead to tagged revisions53 errors.GhostRevisionsHaveNoRevno,
54 # which are not in this branch. Fail gracefully ...54 errors.UnsupportedOperation):
55 revno = '?'55 # Bad tag data/merges can lead to tagged revisions
56 tags[index] = (tag, revno)56 # which are not in this branch. Fail gracefully ...
57 for tag, revspec in tags:57 revno = '?'
58 outf.write('<tag><name>%s</name><revision>%s</revision></tag>' % (_escape_cdata(tag), _escape_cdata(revspec)))58 tags[index] = (tag, revno)
59 for tag, revspec in tags:
60 outf.write('<tag><name>%s</name><revision>%s</revision></tag>' % (_escape_cdata(tag), _escape_cdata(revspec)))
61 finally:
62 branch.unlock()
59 outf.write('</tags>')63 outf.write('</tags>')
6064
6165
6266
=== modified file 'tests/test_ls_xml.py'
--- tests/test_ls_xml.py 2013-08-26 18:53:37 +0000
+++ tests/test_ls_xml.py 2013-10-27 06:44:02 +0000
@@ -51,7 +51,12 @@
51 for item_elem in lst.findall('item'):51 for item_elem in lst.findall('item'):
52 item = {}52 item = {}
53 for attr in item_elem:53 for attr in item_elem:
54 item[attr.tag] = attr.text54 if attr.tag == 'log':
55 for log_item_elem in attr:
56 if log_item_elem.tag != 'timestamp':
57 item['log.' + log_item_elem.tag] = log_item_elem.text
58 else:
59 item[attr.tag] = attr.text
55 items.append(item)60 items.append(item)
56 return items61 return items
5762
@@ -335,4 +340,57 @@
335 'status_kind': 'ignored'}]340 'status_kind': 'ignored'}]
336 self.assertEquals(expected_items, self.run_xmlls('--ignored ' + symlink))341 self.assertEquals(expected_items, self.run_xmlls('--ignored ' + symlink))
337 342
343 def test_lsxml_verbose(self):
344 self.build_tree(['b', 'c', 'd', 'blah.pyo'])
345 self.wt.add(['a', '.bzrignore'], ['a-id', 'bzrignore-id'])
346 self.wt.commit('commit 1', committer='Paul')
347 self.wt.add(['d'], ['d-id'])
348 self.wt.commit('commit 2', committer='John')
349 self.wt.add(['c'], ['c-id'])
350 expected_items = [{'id': 'bzrignore-id',
351 'kind': 'file',
352 'log.committer': 'Paul',
353 'log.revno': '1',
354 'path': '.bzrignore',
355 'status_kind': 'versioned'},
356 {'id': 'a-id',
357 'kind': 'file',
358 'log.committer': 'Paul',
359 'log.revno': '1',
360 'path': 'a',
361 'status_kind': 'versioned'},
362 {'kind': 'file',
363 'path': 'b',
364 'status_kind': 'unknown'},
365 {'kind': 'file',
366 'path': 'blah.pyo',
367 'status_kind': 'ignored'},
368 {'id': 'c-id',
369 'kind': 'file',
370 'path': 'c',
371 'status_kind': 'versioned'},
372 {'id': 'd-id',
373 'kind': 'file',
374 'log.committer': 'John',
375 'log.revno': '2',
376 'path': 'd',
377 'status_kind': 'versioned'}]
378 self.assertEquals(expected_items, self.run_xmlls('--verbose'))
379
380 def test_lsxml_ignored_symlink(self):
381 # Ignored files inside a symlink directory
382 self.wt.add(['a', '.bzrignore'], ['a-id', 'bzrignore-id'])
383 self.build_tree(['blah.py', 'blah.pyo', 'user-ignore'])
384 symlink = self.test_dir + '_symlink'
385 os.symlink(self.test_dir, symlink)
386 expected_items = [{'kind': 'file',
387 'path': os.path.join(symlink, 'blah.pyo'),
388 'pattern': '*.pyo',
389 'status_kind': 'ignored'},
390 {'kind': 'file',
391 'path': os.path.join(symlink, 'user-ignore'),
392 'pattern': 'user-ignore',
393 'status_kind': 'ignored'}]
394 self.assertEquals(expected_items, self.run_xmlls('--ignored ' + symlink))
395
338396
339397
=== added file 'tests/test_progress.py'
--- tests/test_progress.py 1970-01-01 00:00:00 +0000
+++ tests/test_progress.py 2013-10-27 06:44:02 +0000
@@ -0,0 +1,48 @@
1# -*- encoding: utf-8 -*-
2
3import xmlrpclib
4import threading
5
6from bzrlib import (
7 tests,
8 ui
9 )
10from bzrlib.plugins.xmloutput.service import *
11from bzrlib.plugins.xmloutput.uifactory import current_progress
12
13class TestXmlRpcServer(tests.TestCase):
14
15 def setUp(self):
16 tests.TestCase.setUp(self)
17 self.host = 'localhost'
18 self.port = 0
19 self._start_server()
20 self.client = xmlrpclib.Server("http://%s:%s" % (self.host,
21 str(self.port)))
22
23 def _start_server(self):
24 os.environ['BZR_PROGRESS_BAR'] = 'xmlrpc'
25 self.server = BzrXMLRPCServer((self.host, self.port))
26 self.thread = threading.Thread(target=self.server.serve_forever)
27 self.thread.setDaemon(True)
28 self.thread.start()
29 self.host, self.port = self.server.socket.getsockname()
30
31 def tearDown(self):
32 response = self.client.quit()
33 self.thread.join()
34 tests.TestCase.tearDown(self)
35
36 def test_hello(self):
37 response = self.client.hello()
38 self.assertEquals(response, "world!")
39
40 def test_get_bzr_progress(self):
41 global current_progress
42 client = xmlrpclib.Server("http://%s:%s" % (self.host, str(self.port + 1)))
43 current_progress['TEST'] = '123'
44 cmdline = []
45 cmdline.append('TEST')
46 progress = client.get_bzr_progress(cmdline)
47 self.assertEquals(progress, '123')
48
049
=== modified file 'uifactory.py'
--- uifactory.py 2013-02-16 15:30:39 +0000
+++ uifactory.py 2013-10-27 06:44:02 +0000
@@ -17,8 +17,12 @@
17# along with this program; if not, write to the Free Software17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.18# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
20from bzrlib import ui
21from bzrlib.ui.text import TextUIFactory20from bzrlib.ui.text import TextUIFactory
21from bzrlib.ui.text import TextProgressView
22from bzrlib.ui import NullProgressView
23from cStringIO import StringIO
24
25current_progress = {}
2226
23class AuthenticatingUIFactory(TextUIFactory):27class AuthenticatingUIFactory(TextUIFactory):
2428
@@ -27,7 +31,12 @@
27 stdout=None,31 stdout=None,
28 stderr=None,32 stderr=None,
29 username=None,33 username=None,
30 password=None):34 password=None,
35 argv=None):
36 if argv is not None:
37 self.cmd_id = '|'.join(argv)
38 else:
39 self.cmd_id = ''
31 super(AuthenticatingUIFactory, self).__init__(stdin, stdout, stderr)40 super(AuthenticatingUIFactory, self).__init__(stdin, stdout, stderr)
32 self.username = username41 self.username = username
33 self.password = password42 self.password = password
@@ -49,3 +58,18 @@
49 raise ValueError('XMLRPC authentication username:' + self.get_prompt_text(prompt, **kwargs))58 raise ValueError('XMLRPC authentication username:' + self.get_prompt_text(prompt, **kwargs))
50 return self.username59 return self.username
5160
61 def make_progress_view(self):
62 return XmlRpcProgressView(self.cmd_id)
63
64class XmlRpcProgressView(TextProgressView):
65
66 def __init__(self, cmd_id):
67 self.cmd_id = cmd_id
68 super(XmlRpcProgressView, self).__init__(StringIO())
69
70 def _show_line(self, u):
71 global current_progress
72 #s = u.encode(self._encoding, self._encoding_errors)
73 current_progress.clear()
74 current_progress[self.cmd_id] = u
75

Subscribers

People subscribed via source and target branches

to all changes: