Merge lp:~sinzui/bzr-gtk/handle-patch into lp:bzr-gtk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Curtis Hovey | ||||
Approved revision: | 776 | ||||
Merged at revision: | 774 | ||||
Proposed branch: | lp:~sinzui/bzr-gtk/handle-patch | ||||
Merge into: | lp:bzr-gtk | ||||
Diff against target: |
221 lines (+112/-14) 4 files modified
bzr-handle-patch (+7/-4) diff.py (+14/-10) tests/test_commit.py (+31/-0) tests/test_diff.py (+60/-0) |
||||
To merge this branch: | bzr merge lp:~sinzui/bzr-gtk/handle-patch | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij (community) | Approve | ||
Review via email: mp+91514@code.launchpad.net |
Description of the change
Update bzr-handle-patch to gtk3.
Launchpad bug: https:/
Pre-
bzr-handle-patch has import and type errors because it is using Gtk3,
but is calling gtk2 API.
$./bzr-handle-patch ../handle-
...
File "...gtk/diff.py", line 473, in _get_button_bar
hbox.
File "/usr/lib/
return info.invoke(*args, **kwargs)
TypeError: pack_start() takes exactly 5 non-keyword arguments (2 given)
-------
RULES
* bzr-handle-patch already imports Gtk, but its two calls gtk (the
identifier does not exist)
* Fix the hbox.pack_start
QA
* from the top of the tree run the following command to send
a mock patch to bzr-handle-patch
echo "=== added file '_test.txt'
--- _test.txt 1970-01-01 00:00:00 +0000
+++ _test.txt 2012-02-03 20:00:34 +0000
@@ -0,0 +1,1 @@
+hello" | BZR_PLUGINS_
* Verify you are presented the diff window.
IMPLEMENTATION
Fixed the pack_start args. Added tests for the calls to construct the UI.
Updated the base class to be testible. I replaced repeated calls to show()
with show_all() which is more efficient.
diff.py
tests/
Fixed the import/calls to Gtk. Added a smoke test to verify the script
starts.
bzr-
tests/