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

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 7213
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/info-colocated
Merge into: lp:brz
Diff against target: 73 lines (+30/-5)
3 files modified
breezy/git/tests/test_blackbox.py (+6/-1)
breezy/info.py (+12/-4)
breezy/tests/blackbox/test_info.py (+12/-0)
To merge this branch: bzr merge lp:~jelmer/brz/info-colocated
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+359663@code.launchpad.net

Commit message

Show colocated branch name in 'brz info'.

Description of the change

Show colocated branch name in 'brz info'.

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 :
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Flake8 failures.

On December 10, 2018 2:51:53 AM UTC, The Breezy Bot <email address hidden> wrote:
>Running landing tests failed
>https://ci.breezy-vcs.org/job/brz/job/brz-land/129/
>--
>https://code.launchpad.net/~jelmer/brz/info-colocated/+merge/359663
>You are the owner of lp:~jelmer/brz/info-colocated.

Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
lp:~jelmer/brz/info-colocated updated
7214. By Jelmer Vernooij

Merge trunk.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/git/tests/test_blackbox.py'
--- breezy/git/tests/test_blackbox.py 2018-11-19 20:11:08 +0000
+++ breezy/git/tests/test_blackbox.py 2018-12-11 00:00:51 +0000
@@ -63,7 +63,12 @@
63 self.simple_commit()63 self.simple_commit()
64 output, error = self.run_bzr(['info'])64 output, error = self.run_bzr(['info'])
65 self.assertEqual(error, '')65 self.assertEqual(error, '')
66 self.assertTrue("Standalone tree (format: git)" in output)66 self.assertEqual(
67 output,
68 'Standalone tree (format: git)\n'
69 'Location:\n'
70 ' light checkout root: .\n'
71 ' checkout of co-located branch: master\n')
6772
68 def test_ignore(self):73 def test_ignore(self):
69 self.simple_commit()74 self.simple_commit()
7075
=== modified file 'breezy/info.py'
--- breezy/info.py 2018-11-12 01:41:38 +0000
+++ breezy/info.py 2018-12-11 00:00:51 +0000
@@ -108,7 +108,15 @@
108 else:108 else:
109 locs['checkout root'] = branch_path109 locs['checkout root'] = branch_path
110 if working_path != master_path:110 if working_path != master_path:
111 locs['checkout of branch'] = master_path111 (master_path_base, params) = urlutils.split_segment_parameters(
112 master_path)
113 if working_path == master_path_base:
114 locs['checkout of co-located branch'] = params['branch']
115 elif 'branch' in params:
116 locs['checkout of branch'] = "%s, branch %s" (
117 master_path_base, params['branch'])
118 else:
119 locs['checkout of branch'] = master_path
112 elif repository.is_shared():120 elif repository.is_shared():
113 locs['repository branch'] = branch_path121 locs['repository branch'] = branch_path
114 elif branch_path is not None:122 elif branch_path is not None:
@@ -138,9 +146,9 @@
138 locs['shared repository'] = repository.user_url146 locs['shared repository'] = repository.user_url
139 order = ['control directory', 'light checkout root',147 order = ['control directory', 'light checkout root',
140 'repository checkout root', 'checkout root',148 'repository checkout root', 'checkout root',
141 'checkout of branch', 'shared repository',149 'checkout of branch', 'checkout of co-located branch',
142 'repository', 'repository branch', 'branch root',150 'shared repository', 'repository', 'repository branch',
143 'bound to branch']151 'branch root', 'bound to branch']
144 return [(n, locs[n]) for n in order if n in locs]152 return [(n, locs[n]) for n in order if n in locs]
145153
146154
147155
=== modified file 'breezy/tests/blackbox/test_info.py'
--- breezy/tests/blackbox/test_info.py 2018-11-11 04:08:32 +0000
+++ breezy/tests/blackbox/test_info.py 2018-12-11 00:00:51 +0000
@@ -84,6 +84,18 @@
84 ' checkout of branch: target\n')84 ' checkout of branch: target\n')
85 self.assertEqual(err, '')85 self.assertEqual(err, '')
8686
87 def test_info_colocated(self):
88 br = self.make_branch_and_tree('target', format='development-colo')
89 target = br.controldir.create_branch(name='dichtbij')
90 br.controldir.set_branch_reference(target)
91 out, err = self.run_bzr('info target')
92 self.assertEqual(out,
93 'Standalone tree (format: development-colo)\n'
94 'Location:\n'
95 ' light checkout root: target\n'
96 ' checkout of co-located branch: dichtbij\n')
97 self.assertEqual(err, '')
98
87 def test_info_standalone(self):99 def test_info_standalone(self):
88 transport = self.get_transport()100 transport = self.get_transport()
89101

Subscribers

People subscribed via source and target branches