Merge lp://staging/~piastucki/bzr-xmloutput/progress-monitor into lp://staging/bzr-xmloutput

Proposed by Piotr Piastucki
Status: Needs review
Proposed branch: lp://staging/~piastucki/bzr-xmloutput/progress-monitor
Merge into: lp://staging/bzr-xmloutput
Diff against target: 208 lines (+111/-8)
3 files modified
service.py (+38/-6)
tests/test_progress.py (+48/-0)
uifactory.py (+25/-2)
To merge this branch: bzr merge lp://staging/~piastucki/bzr-xmloutput/progress-monitor
Reviewer Review Type Date Requested Status
Guillermo Gonzalez Pending
Review via email: mp+164687@code.staging.launchpad.net

Description of the change

This branch adds support for simple progress reporting.
Some bzr commands like checkout or branch can take a lot of time and there is no way to report the progress when invoking them via xmlrpc currently. The patch adds the following changes:
1) when starting XMLRPS server, the code will check if BZR_PROGRESS_BAR variable equals to 'xmlrpc' and start up an additional XMLRPC server at port+1 in this case. The additional XMLRPC server is needed to get the progress of the command while the main XMLRPC server can still remain single-threaded.
2) UIFactory adds a custom progress view implementation (XmlRpcProgressView) that stores the current progress in a map
3) The additional XMLRPC server exposes a single function called 'get_bzr_progress' that gets the progress based on the command passed from the map
4) to avoid the need to pass an additional command ID to lookup the progress for the desired command a hash code based on command arguments is used as the key instead.

There are some test cases included, moreover, the implementation is also successfully used in bzr-java-lib and bzr-eclipse (https://launchpadlibrarian.net/138446785/2013-04-26%2011-03-52.png)

The functionality seems to be very specific to XMLRPC server interactions and if you feel it is out of scope of bzr-xmloutput feel free to reject the merge proposal.

To post a comment you must log in.
172. By Piotr Piastucki

Replace sha1 with a simple join

Revision history for this message
Piotr Piastucki (piastucki) wrote :

Actually I removed sha1 calculations and replace them with a simple join. This simplifies client-side code as well.

173. By Piotr Piastucki

Replace sha1 with a simple join

174. By Piotr Piastucki

Do not use self._encoding as it is available in 2.6b3 only

Unmerged revisions

174. By Piotr Piastucki

Do not use self._encoding as it is available in 2.6b3 only

173. By Piotr Piastucki

Replace sha1 with a simple join

172. By Piotr Piastucki

Replace sha1 with a simple join

171. By Piotr Piastucki

Ensure UTF-8 encoding

170. By Piotr Piastucki

Add null check

169. By Piotr Piastucki

Add progress reporting via XMLRPC

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: