Merge lp://staging/~nmb/bzr-diffstat/gui into lp://staging/bzr-diffstat

Proposed by Neil Martinsen-Burrell
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~nmb/bzr-diffstat/gui
Merge into: lp://staging/bzr-diffstat
Diff against target: 84 lines (+44/-1)
4 files modified
NEWS (+10/-0)
__init__.py (+10/-1)
explorer/tools.xml (+3/-0)
qdiffstat.py (+21/-0)
To merge this branch: bzr merge lp://staging/~nmb/bzr-diffstat/gui
Reviewer Review Type Date Requested Status
Russ Brown Pending
Review via email: mp+20243@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Neil Martinsen-Burrell (nmb) wrote :

This branch adds support for graphical versions of the diffstat command. It adds a qdiffstat command whenever the qbzr plugin is installed and it adds a tool for use in Bazaar Explorer. The qdiffstat window could certainly be improved, but this is a start.

Revision history for this message
Russ Brown (pickscrape) wrote :

What an odd coincidence: I was just thinking about getting diffstat into explorer as a tool a few days ago. Thanks for this: I'll have a look at getting this merged and get a new release out this weekend.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2008-08-17 04:53:25 +0000
3+++ NEWS 2010-02-26 18:45:23 +0000
4@@ -4,6 +4,16 @@
5
6 .. contents::
7
8+bzr-diffstat 0.3 ????-??-??
9+---------------------------
10+
11+ IMPROVEMENTS:
12+
13+ * Add a qdiffstat command for GUIs, loaded only if the qbzr plugin is
14+ installed. (Neil Martinsen-Burrell)
15+
16+ * Add Bazaar Explorer integration. (Neil Martinsen-Burrell)
17+
18 bzr-diffstat 0.2 2008-08-17
19 ---------------------------
20
21
22=== modified file '__init__.py'
23--- __init__.py 2008-08-17 04:53:25 +0000
24+++ __init__.py 2010-02-26 18:45:23 +0000
25@@ -16,7 +16,7 @@
26 from bzrlib.option import Option
27 """)
28
29-from bzrlib.commands import display_command, register_command
30+from bzrlib.commands import display_command, register_command, plugin_cmds
31
32 version_info = (0, 2, 0, 'final', 0)
33
34@@ -91,6 +91,15 @@
35 register_command(cmd_diffstat)
36 diff_class = register_command(cmd_diff, decorate=True)
37
38+try:
39+ from bzrlib.plugins import qbzr
40+except ImportError:
41+ qbzr = None
42+
43+if qbzr is not None:
44+ plugin_cmds.register_lazy('cmd_qdiffstat', [],
45+ 'bzrlib.plugins.diffstat.qdiffstat')
46+
47 def test_suite():
48 import tests
49 return tests.test_suite()
50
51=== added directory 'explorer'
52=== added file 'explorer/tools.xml'
53--- explorer/tools.xml 1970-01-01 00:00:00 +0000
54+++ explorer/tools.xml 2010-02-26 18:45:23 +0000
55@@ -0,0 +1,3 @@
56+<folder title="My Tools">
57+ <tool action="qdiffstat" icon="actions/edit-find" title="Diff Summary" type="bzr" />
58+</folder>
59
60=== added file 'qdiffstat.py'
61--- qdiffstat.py 1970-01-01 00:00:00 +0000
62+++ qdiffstat.py 2010-02-26 18:45:23 +0000
63@@ -0,0 +1,21 @@
64+"""A graphical equivalent for the diffstat command."""
65+
66+from bzrlib.plugins.qbzr.lib.subprocess import (SimpleSubProcessDialog,
67+ SubProcessWidget,
68+ )
69+from bzrlib.plugins.qbzr.lib.commands import QBzrCommand
70+
71+
72+class cmd_qdiffstat(QBzrCommand):
73+
74+ """Graphically show stats about changes to the working tree."""
75+
76+ def _qbzr_run(self, ui_mode=False):
77+ self.main_window = SimpleSubProcessDialog('qdiffstat',
78+ 'Summarize the differences in the working tree.',
79+ ui_mode=ui_mode,
80+ auto_start_show_on_failed=True)
81+ self.main_window.process_widget.messageFormat.setFontFixedPitch(True)
82+ self.main_window.args = ['diffstat']
83+ self.main_window.show()
84+ self._application.exec_()

Subscribers

People subscribed via source and target branches

to all changes: