Merge lp:~jelmer/brz/switch-colocated into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/switch-colocated
Merge into: lp:brz
Diff against target: 70 lines (+14/-7)
2 files modified
breezy/builtins.py (+9/-2)
breezy/tests/blackbox/test_switch.py (+5/-5)
To merge this branch: bzr merge lp:~jelmer/brz/switch-colocated
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+361258@code.launchpad.net

Commit message

Display colocated branch name when switching between branches.

Description of the change

Display colocated branch name when switching between branches.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Looks good, thanks.

review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/builtins.py'
--- breezy/builtins.py 2018-12-10 05:22:17 +0000
+++ breezy/builtins.py 2018-12-21 23:50:32 +0000
@@ -6364,8 +6364,15 @@
6364 if had_explicit_nick:6364 if had_explicit_nick:
6365 branch = control_dir.open_branch() # get the new branch!6365 branch = control_dir.open_branch() # get the new branch!
6366 branch.nick = to_branch.nick6366 branch.nick = to_branch.nick
6367 note(gettext('Switched to branch: %s'),6367 if to_branch.name:
6368 urlutils.unescape_for_display(to_branch.base, 'utf-8'))6368 if to_branch.controldir.control_url != control_dir.control_url:
6369 note(gettext('Switched to branch %s at %s'),
6370 to_branch.name, urlutils.unescape_for_display(to_branch.base, 'utf-8'))
6371 else:
6372 note(gettext('Switched to branch %s'), to_branch.name)
6373 else:
6374 note(gettext('Switched to branch at %s'),
6375 urlutils.unescape_for_display(to_branch.base, 'utf-8'))
63696376
63706377
6371class cmd_view(Command):6378class cmd_view(Command):
63726379
=== modified file 'breezy/tests/blackbox/test_switch.py'
--- breezy/tests/blackbox/test_switch.py 2018-11-16 23:28:26 +0000
+++ breezy/tests/blackbox/test_switch.py 2018-12-21 23:50:32 +0000
@@ -55,7 +55,7 @@
55 os.chdir('checkout')55 os.chdir('checkout')
56 out, err = self.run_bzr('switch ../branch2')56 out, err = self.run_bzr('switch ../branch2')
57 self.assertContainsRe(err, 'Tree is up to date at revision 0.\n')57 self.assertContainsRe(err, 'Tree is up to date at revision 0.\n')
58 self.assertContainsRe(err, 'Switched to branch: .*/branch2.\n')58 self.assertContainsRe(err, 'Switched to branch at .*/branch2.\n')
59 self.assertEqual('', out)59 self.assertEqual('', out)
6060
61 def test_switch_out_of_date_light_checkout(self):61 def test_switch_out_of_date_light_checkout(self):
@@ -69,7 +69,7 @@
69 out, err = self.run_bzr('switch ../branch2')69 out, err = self.run_bzr('switch ../branch2')
70 #self.assertContainsRe(err, '\+N file')70 #self.assertContainsRe(err, '\+N file')
71 self.assertContainsRe(err, 'Updated to revision 1.\n')71 self.assertContainsRe(err, 'Updated to revision 1.\n')
72 self.assertContainsRe(err, 'Switched to branch: .*/branch2.\n')72 self.assertContainsRe(err, 'Switched to branch at .*/branch2.\n')
73 self.assertEqual('', out)73 self.assertEqual('', out)
7474
75 def _test_switch_nick(self, lightweight):75 def _test_switch_nick(self, lightweight):
@@ -431,7 +431,7 @@
431 $ cd checkout431 $ cd checkout
432 $ brz switch --create-branch switched432 $ brz switch --create-branch switched
433 2>Tree is up to date at revision 0.433 2>Tree is up to date at revision 0.
434 2>Switched to branch:...switched...434 2>Switched to branch at .../switched/
435 $ cd ..435 $ cd ..
436 ''' % locals())436 ''' % locals())
437 bound_branch = branch.Branch.open_containing('checkout')[0]437 bound_branch = branch.Branch.open_containing('checkout')[0]
@@ -590,7 +590,7 @@
590 Created a standalone tree (format: 2a)590 Created a standalone tree (format: 2a)
591 $ brz switch -b trunk591 $ brz switch -b trunk
592 2>Tree is up to date at revision 0.592 2>Tree is up to date at revision 0.
593 2>Switched to branch:...593 2>Switched to branch trunk
594 $ brz commit -m 1 --unchanged594 $ brz commit -m 1 --unchanged
595 2>Committing to: ...595 2>Committing to: ...
596 2>Committed revision 1.596 2>Committed revision 1.
@@ -599,7 +599,7 @@
599 2>Committed revision 2.599 2>Committed revision 2.
600 $ brz switch -b blah -r1600 $ brz switch -b blah -r1
601 2>Updated to revision 1.601 2>Updated to revision 1.
602 2>Switched to branch:...602 2>Switched to branch blah
603 $ brz branches603 $ brz branches
604 * blah604 * blah
605 trunk605 trunk

Subscribers

People subscribed via source and target branches