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
=== modified file 'commands.py'
--- commands.py 2010-03-01 02:47:34 +0000
+++ commands.py 2010-04-02 16:33:16 +0000
@@ -590,12 +590,17 @@
590 location_in_repo.strip('/'))))590 location_in_repo.strip('/'))))
591591
592592
593class NoQBzrError(errors.BzrCommandError):
594
595 _fmt = '%(name)s requires the qbzr plugin version >= 0.18.1.'
596
597
593class cmd_qbranches(commands.Command):598class cmd_qbranches(commands.Command):
594599
595 """List colocated branches (requires qbzr)"""600 """List colocated branches (requires qbzr)"""
596601
597 def run(self):602 def run(self):
598 raise errors.BzrCommandError('qbranches requires the qbzr plugin.')603 raise NoQBzrError(name='qbranches')
599604
600605
601class cmd_qprune(commands.Command):606class cmd_qprune(commands.Command):
@@ -605,16 +610,19 @@
605 aliases = ['qdelete']610 aliases = ['qdelete']
606611
607 def run(self):612 def run(self):
608 raise errors.BzrCommandError('qprune requires the qbzr plugin.')613 raise NoQBzrError(name='qprune')
609614
610615
611qbzr = None616qbzr = None
612try:617try:
613 import bzrlib.plugins.qbzr as qbzr618 import bzrlib.plugins.qbzr as qbzr
614except ImportError:619 import qcommands
615 trace.mutter("Can't import qbzr, not defining GUI commands")620except ImportError, e:
621 trace.mutter("Can't import qbzr or some qbzr functions, "
622 "not defining GUI commands.\n"
623 "ImportError: %s" % str(e)
624 )
616else:625else:
617 import qcommands
618 cmd_qprune = qcommands.cmd_qprune626 cmd_qprune = qcommands.cmd_qprune
619 cmd_qbranches = qcommands.cmd_qbranches627 cmd_qbranches = qcommands.cmd_qbranches
620628
621629
=== modified file 'qcommands.py'
--- qcommands.py 2010-02-07 00:37:50 +0000
+++ qcommands.py 2010-04-02 16:33:16 +0000
@@ -35,6 +35,7 @@
35from bzrlib.plugins.qbzr.lib.trace import reports_exception35from bzrlib.plugins.qbzr.lib.trace import reports_exception
36from bzrlib.plugins.qbzr.lib.subprocess import run_subprocess_command36from bzrlib.plugins.qbzr.lib.subprocess import run_subprocess_command
3737
38
38class ColocatedBranchesList(QtGui.QListWidget):39class ColocatedBranchesList(QtGui.QListWidget):
3940
40 def __init__(self, workspace):41 def __init__(self, workspace):
@@ -44,7 +45,6 @@
44 self.branch_icon = QtGui.QIcon(45 self.branch_icon = QtGui.QIcon(
45 os.path.join(os.path.dirname(__file__), 'folder.png'))46 os.path.join(os.path.dirname(__file__), 'folder.png'))
4647
47
48 def refresh_branches(self):48 def refresh_branches(self):
49 self.clear()49 self.clear()
50 current_name = self.workspace.current_branch_name()50 current_name = self.workspace.current_branch_name()

Subscribers

People subscribed via source and target branches