Merge lp:~bialix/bzr-colo/bug-520485 into lp:bzr-colo

Proposed by Alexander Belchenko
Status: Merged
Merged at revision: not available
Proposed branch: lp:~bialix/bzr-colo/bug-520485
Merge into: lp:bzr-colo
Diff against target: 66 lines (+14/-6)
2 files modified
commands.py (+13/-5)
qcommands.py (+1/-1)
To merge this branch: bzr merge lp:~bialix/bzr-colo/bug-520485
Reviewer Review Type Date Requested Status
Neil Martinsen-Burrell Pending
Review via email: mp+22709@code.launchpad.net

Description of the change

Attempt to fix the bug #520485

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'commands.py'
2--- commands.py 2010-03-01 02:47:34 +0000
3+++ commands.py 2010-04-02 16:33:16 +0000
4@@ -590,12 +590,17 @@
5 location_in_repo.strip('/'))))
6
7
8+class NoQBzrError(errors.BzrCommandError):
9+
10+ _fmt = '%(name)s requires the qbzr plugin version >= 0.18.1.'
11+
12+
13 class cmd_qbranches(commands.Command):
14
15 """List colocated branches (requires qbzr)"""
16
17 def run(self):
18- raise errors.BzrCommandError('qbranches requires the qbzr plugin.')
19+ raise NoQBzrError(name='qbranches')
20
21
22 class cmd_qprune(commands.Command):
23@@ -605,16 +610,19 @@
24 aliases = ['qdelete']
25
26 def run(self):
27- raise errors.BzrCommandError('qprune requires the qbzr plugin.')
28+ raise NoQBzrError(name='qprune')
29
30
31 qbzr = None
32 try:
33 import bzrlib.plugins.qbzr as qbzr
34-except ImportError:
35- trace.mutter("Can't import qbzr, not defining GUI commands")
36+ import qcommands
37+except ImportError, e:
38+ trace.mutter("Can't import qbzr or some qbzr functions, "
39+ "not defining GUI commands.\n"
40+ "ImportError: %s" % str(e)
41+ )
42 else:
43- import qcommands
44 cmd_qprune = qcommands.cmd_qprune
45 cmd_qbranches = qcommands.cmd_qbranches
46
47
48=== modified file 'qcommands.py'
49--- qcommands.py 2010-02-07 00:37:50 +0000
50+++ qcommands.py 2010-04-02 16:33:16 +0000
51@@ -35,6 +35,7 @@
52 from bzrlib.plugins.qbzr.lib.trace import reports_exception
53 from bzrlib.plugins.qbzr.lib.subprocess import run_subprocess_command
54
55+
56 class ColocatedBranchesList(QtGui.QListWidget):
57
58 def __init__(self, workspace):
59@@ -44,7 +45,6 @@
60 self.branch_icon = QtGui.QIcon(
61 os.path.join(os.path.dirname(__file__), 'folder.png'))
62
63-
64 def refresh_branches(self):
65 self.clear()
66 current_name = self.workspace.current_branch_name()

Subscribers

People subscribed via source and target branches