Rev 4037: faster info -v (Ian Clatworthy) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Feb 24 07:36:51 GMT 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4037
revision-id: pqm at pqm.ubuntu.com-20090224073648-8cdhj9m2zsab8hx8
parent: pqm at pqm.ubuntu.com-20090224014911-127m0ag2r0o4oayg
parent: ian.clatworthy at canonical.com-20090224065513-qpq5fzx5rmemh3ei
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2009-02-24 07:36:48 +0000
message:
faster info -v (Ian Clatworthy)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/info.py info.py-20050323235939-6bbfe7d9700b0b9b
bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
------------------------------------------------------------
revno: 4035.1.2
revision-id: ian.clatworthy at canonical.com-20090224065513-qpq5fzx5rmemh3ei
parent: ian.clatworthy at canonical.com-20090223223650-zo9cr6woe9631q1e
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: ianc-integration
timestamp: Tue 2009-02-24 16:55:13 +1000
message:
clean-up trailing whitespace
modified:
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
------------------------------------------------------------
revno: 4035.1.1
revision-id: ian.clatworthy at canonical.com-20090223223650-zo9cr6woe9631q1e
parent: pqm at pqm.ubuntu.com-20090223205523-xp0lqm5iz1df5o0x
parent: ian.clatworthy at canonical.com-20090223080834-0oby0bf0faj4ihq2
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: ianc-integration
timestamp: Tue 2009-02-24 08:36:50 +1000
message:
faster info -v (Ian Clatworthy)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/info.py info.py-20050323235939-6bbfe7d9700b0b9b
bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
------------------------------------------------------------
revno: 4032.2.1
revision-id: ian.clatworthy at canonical.com-20090223080834-0oby0bf0faj4ihq2
parent: pqm at pqm.ubuntu.com-20090223012623-0epa5dpnb7sk0tef
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: bzr.info-v-speed
timestamp: Mon 2009-02-23 18:08:34 +1000
message:
omit branch committers from info -v (now requires -vv)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/info.py info.py-20050323235939-6bbfe7d9700b0b9b
bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
=== modified file 'NEWS'
--- a/NEWS 2009-02-24 01:49:11 +0000
+++ b/NEWS 2009-02-24 07:36:48 +0000
@@ -37,6 +37,11 @@
* Bazaar will now point out ``bzr+ssh://`` to the user when they
use ssh://. (Jelmer Vernooij, #330535)
+ * ``bzr -v info`` now omits the number of committers branch statistic,
+ making it many times faster for large projects. To include that
+ statistic in the output, use ``bzr -vv info``.
+ (Ian Clatworthy)
+
* ``bzr push`` to a ``bzr`` url (``bzr://``, ``bzr+ssh://`` etc) will
stream if the server is version 1.13 or greater, reducing roundtrips
significantly. (Andrew Bennetts, Robert Collins)
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2009-02-23 15:29:35 +0000
+++ b/bzrlib/builtins.py 2009-02-24 06:55:13 +0000
@@ -1282,10 +1282,29 @@
"""Show information about a working tree, branch or repository.
This command will show all known locations and formats associated to the
- tree, branch or repository. Statistical information is included with
- each report.
+ tree, branch or repository.
+
+ In verbose mode, statistical information is included with each report.
+ To see extended statistic information, use a verbosity level of 2 or
+ higher by specifying the verbose option multiple times, e.g. -vv.
Branches and working trees will also report any missing revisions.
+
+ :Examples:
+
+ Display information on the format and related locations:
+
+ bzr info
+
+ Display the above together with extended format information and
+ basic statistics (like the number of files in the working tree and
+ number of revisions in the branch and repository):
+
+ bzr -v info
+
+ Display the above together with number of committers to the branch:
+
+ bzr -vv info
"""
_see_also = ['revno', 'working-trees', 'repositories']
takes_args = ['location?']
@@ -1295,7 +1314,7 @@
@display_command
def run(self, location=None, verbose=False):
if verbose:
- noise_level = 2
+ noise_level = get_verbosity_level()
else:
noise_level = 0
from bzrlib.info import show_bzrdir_info
=== modified file 'bzrlib/info.py'
--- a/bzrlib/info.py 2009-01-17 01:30:58 +0000
+++ b/bzrlib/info.py 2009-02-23 22:36:50 +0000
@@ -376,7 +376,8 @@
elif branch is not None:
_show_missing_revisions_branch(branch, outfile)
if branch is not None:
- stats = _show_branch_stats(branch, verbose==2, outfile)
+ show_committers = verbose >= 2
+ stats = _show_branch_stats(branch, show_committers, outfile)
else:
stats = repository.gather_stats()
if branch is None and working is None:
=== modified file 'bzrlib/tests/blackbox/test_info.py'
--- a/bzrlib/tests/blackbox/test_info.py 2009-01-17 01:30:58 +0000
+++ b/bzrlib/tests/blackbox/test_info.py 2009-02-24 06:55:13 +0000
@@ -61,6 +61,7 @@
""", out)
self.assertEqual('', err)
+ # Standalone branch - verbose mode
out, err = self.run_bzr('info standalone -v')
self.assertEqualDiff(
"""Standalone tree (format: weave)
@@ -85,6 +86,37 @@
Branch history:
0 revisions
+
+Repository:
+ 0 revisions
+""", out)
+ self.assertEqual('', err)
+
+ # Standalone branch - really verbose mode
+ out, err = self.run_bzr('info standalone -vv')
+ self.assertEqualDiff(
+"""Standalone tree (format: weave)
+Location:
+ branch root: standalone
+
+Format:
+ control: All-in-one format 6
+ working tree: Working tree format 2
+ branch: Branch format 4
+ repository: Weave repository format 6
+
+In the working tree:
+ 0 unchanged
+ 0 modified
+ 1 added
+ 0 removed
+ 0 renamed
+ 0 unknown
+ 0 ignored
+ 0 versioned subdirectories
+
+Branch history:
+ 0 revisions
0 committers
Repository:
@@ -139,7 +171,6 @@
Branch history:
1 revision
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -186,7 +217,6 @@
Branch history:
1 revision
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -230,7 +260,6 @@
Branch history:
1 revision
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -273,7 +302,6 @@
Branch history:
1 revision
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -319,7 +347,6 @@
Branch history:
1 revision
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -361,7 +388,6 @@
Branch history:
1 revision
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -401,7 +427,6 @@
Branch history:
1 revision
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -444,7 +469,6 @@
Branch history:
2 revisions
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -472,7 +496,6 @@
Branch history:
0 revisions
- 0 committers
Repository:
0 revisions
@@ -523,7 +546,6 @@
Branch history:
0 revisions
- 0 committers
Repository:
0 revisions
@@ -581,7 +603,6 @@
Branch history:
1 revision
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -622,7 +643,6 @@
Branch history:
0 revisions
- 0 committers
Repository:
0 revisions
@@ -660,7 +680,6 @@
Branch history:
1 revision
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -708,7 +727,6 @@
Branch history:
2 revisions
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -736,7 +754,6 @@
Branch history:
2 revisions
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -823,7 +840,6 @@
Branch history:
0 revisions
- 0 committers
Repository:
0 revisions
@@ -864,7 +880,6 @@
Branch history:
1 revision
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -906,7 +921,6 @@
Branch history:
0 revisions
- 0 committers
Repository:
1 revision
@@ -946,7 +960,6 @@
Branch history:
1 revision
- 1 committer
0 days old
first revision: %s
latest revision: %s
@@ -1033,7 +1046,6 @@
Branch history:
0 revisions
- 0 committers
Repository:
0 revisions
@@ -1071,7 +1083,7 @@
actually locked then this parameter is overridden. This is because
pack repositories do not have any public API for obtaining an
exclusive repository wide lock.
- :param verbose: If true, expect verbose output
+ :param verbose: verbosity level: 2 or higher to show committers
"""
def friendly_location(url):
path = urlutils.unescape_for_display(url, 'ascii')
@@ -1144,7 +1156,7 @@
branch_data = (" checkout of branch: %s\n" %
lco_tree.branch.bzrdir.root_transport.base)
- if verbose:
+ if verbose >= 2:
verbose_info = ' 0 committers\n'
else:
verbose_info = ''
@@ -1336,7 +1348,6 @@
Branch history:
0 revisions
- 0 committers
Repository:
0 revisions
@@ -1369,7 +1380,6 @@
Branch history:
0 revisions
- 0 committers
Repository:
0 revisions
More information about the bazaar-commits
mailing list