Rev 6246: (jelmer) Print the number of colocated branches in 'bzr info'. (Jelmer in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/
Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Nov 8 16:29:32 UTC 2011
At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 6246 [merge]
revision-id: pqm at pqm.ubuntu.com-20111108162931-e72e84b4bviq0u4m
parent: pqm at pqm.ubuntu.com-20111108152929-kblb3iedk1iqflui
parent: jelmer at samba.org-20111107104200-7wzxycbhvzht5gm3
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2011-11-08 16:29:31 +0000
message:
(jelmer) Print the number of colocated branches in 'bzr info'. (Jelmer
Vernooij)
modified:
bzrlib/info.py info.py-20050323235939-6bbfe7d9700b0b9b
bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
doc/en/release-notes/bzr-2.5.txt bzr2.5.txt-20110708125756-587p0hpw7oke4h05-1
=== modified file 'bzrlib/info.py'
--- a/bzrlib/info.py 2011-10-11 12:01:51 +0000
+++ b/bzrlib/info.py 2011-11-07 10:42:00 +0000
@@ -159,6 +159,14 @@
outfile.writelines(locs.get_lines())
+def _show_control_dir_info(control, outfile):
+ """Show control dir information."""
+ if control._format.colocated_branches:
+ outfile.write('\n')
+ outfile.write('Control directory:\n')
+ outfile.write(' %d branches\n' % len(control.list_branches()))
+
+
def _show_format_info(control=None, repository=None, branch=None,
working=None, outfile=None):
"""Show known formats for control, working, branch and repository."""
@@ -377,6 +385,7 @@
return
_show_format_info(control, repository, branch, working, outfile)
_show_locking_info(repository, branch, working, outfile)
+ _show_control_dir_info(control, outfile)
if branch is not None:
_show_missing_revisions_branch(branch, outfile)
if working is not None:
=== modified file 'bzrlib/tests/blackbox/test_info.py'
--- a/bzrlib/tests/blackbox/test_info.py 2011-10-14 13:56:45 +0000
+++ b/bzrlib/tests/blackbox/test_info.py 2011-11-07 10:42:00 +0000
@@ -1376,3 +1376,30 @@
0 versioned subdirectories
""", out)
self.assertEqual("", err)
+
+ def test_info_shows_colocated_branches(self):
+ bzrdir = self.make_branch('.', format='development-colo').bzrdir
+ bzrdir.create_branch(name="colo1")
+ bzrdir.create_branch(name="colo2")
+ bzrdir.create_branch(name="colo3")
+ out, err = self.run_bzr('info -v .')
+ self.assertEqualDiff(
+"""Standalone branch (format: development-colo)
+Location:
+ branch root: .
+
+Format:
+ control: Meta directory format 1 with support for colocated branches
+ branch: Branch format 7
+ repository: Repository format 2a - rich roots, group compression and chk inventories
+
+Control directory:
+ 4 branches
+
+Branch history:
+ 0 revisions
+
+Repository:
+ 0 revisions
+""", out)
+ self.assertEqual("", err)
=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt 2011-11-08 15:29:29 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt 2011-11-08 16:29:31 +0000
@@ -31,6 +31,10 @@
.. Improvements to existing commands, especially improved performance
or memory usage, or better results.
+* ``bzr info -v`` now shows the number of colocated branches
+ for control directories that support them.
+ (Jelmer Vernooij, #863285)
+
* ``bzr version-info`` now takes a ``--revision`` argument.
(Jelmer Vernooij, #238705)
More information about the bazaar-commits
mailing list