Rev 3798: (mbp) missing -q is quieter (#284748) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Oct 27 09:31:59 GMT 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3798
revision-id: pqm at pqm.ubuntu.com-20081027093156-02gq7k14aeg9k0c7
parent: pqm at pqm.ubuntu.com-20081027085419-l71wbqyduwhl77n8
parent: mbp at sourcefrog.net-20081027080247-0al6nrx2v8u1dcci
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2008-10-27 09:31:56 +0000
message:
(mbp) missing -q is quieter (#284748)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/tests/blackbox/test_missing.py test_missing.py-20051211212735-a2cf4c1840bb84c4
------------------------------------------------------------
revno: 3778.5.3
revision-id: mbp at sourcefrog.net-20081027080247-0al6nrx2v8u1dcci
parent: mbp at sourcefrog.net-20081017083252-0qiq3nxdfpmt1ezs
parent: pqm at pqm.ubuntu.com-20081027073519-qy22jw3pt00k4u2w
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: 284748-missing-quiet
timestamp: Mon 2008-10-27 19:02:47 +1100
message:
merge trunk
added:
bzrlib/tests/fake_command.py fake_command.py-20081021195002-r9v65tgxx63c25v9-1
doc/developers/cycle.txt cycle.txt-20081017031739-rw24r0cywm2ok3xu-1
tools/packaging/lp-upload-release lpuploadrelease-20081020075647-56zdf9z6yav1bx81-1
modified:
Makefile Makefile-20050805140406-d96e3498bb61c5bb
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/_walkdirs_win32.pyx _walkdirs_win32.pyx-20080716220454-kweh3tgxez5dvw2l-2
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/btree_index.py index.py-20080624222253-p0x5f92uyh5hw734-7
bzrlib/chunk_writer.py chunk_writer.py-20080630234519-6ggn4id17nipovny-1
bzrlib/commands.py bzr.py-20050309040720-d10f4714595cf8c3
bzrlib/config.py config.py-20051011043216-070c74f4e9e338e8
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
bzrlib/help_topics/en/hooks.txt hooks.txt-20070830033044-xxu2rced13f72dka-1
bzrlib/index.py index.py-20070712131115-lolkarso50vjr64s-1
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/patches.py patches.py-20050727183609-378c1cc5972ce908
bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
bzrlib/plugins/launchpad/lp_directory.py lp_indirect.py-20070126012204-de5rugwlt22c7u7e-1
bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
bzrlib/plugins/launchpad/test_lp_directory.py test_lp_indirect.py-20070126002743-oyle362tzv9cd8mi-1
bzrlib/python-compat.h pythoncompat.h-20080924041409-9kvi0fgtuuqp743j-1
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/blackbox/test_command_encoding.py test_command_encoding.py-20060106032110-45431fd2ce9ff21f
bzrlib/tests/branch_implementations/test_stacking.py test_stacking.py-20080214020755-msjlkb7urobwly0f-1
bzrlib/tests/test_branch.py test_branch.py-20060116013032-97819aa07b8ab3b5
bzrlib/tests/test_btree_index.py test_index.py-20080624222253-p0x5f92uyh5hw734-13
bzrlib/tests/test_chunk_writer.py test_chunk_writer.py-20080630234519-6ggn4id17nipovny-2
bzrlib/tests/test_commands.py test_command.py-20051019190109-3b17be0f52eaa7a8
bzrlib/tests/test_config.py testconfig.py-20051011041908-742d0c15d8d8c8eb
bzrlib/tests/test_index.py test_index.py-20070712131115-lolkarso50vjr64s-2
bzrlib/tests/test_knit.py test_knit.py-20051212171302-95d4c00dd5f11f2b
bzrlib/tests/test_patches.py test_patches.py-20051231203844-f4974d20f6aea09c
bzrlib/tests/test_plugins.py plugins.py-20050622075746-32002b55e5e943e9
bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
bzrlib/tests/test_store.py teststore.py-20050826022702-f6caadb647395769
bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
bzrlib/transform.py transform.py-20060105172343-dd99e54394d91687
bzrlib/win32utils.py win32console.py-20051021033308-123c6c929d04973d
doc/developers/HACKING.txt HACKING-20050805200004-2a5dc975d870f78c
doc/developers/index.txt index.txt-20070508041241-qznziunkg0nffhiw-1
doc/developers/releasing.txt releasing.txt-20080502015919-fnrcav8fwy8ccibu-1
setup.py setup.py-20050314065409-02f8a0a6e3f9bc70
------------------------------------------------------------
revno: 3778.5.2
revision-id: mbp at sourcefrog.net-20081017083252-0qiq3nxdfpmt1ezs
parent: mbp at sourcefrog.net-20081017030138-wnnwb5wl60isaxjf
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: 284748-missing-quiet
timestamp: Fri 2008-10-17 19:32:52 +1100
message:
review cleanups
modified:
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/tests/blackbox/test_missing.py test_missing.py-20051211212735-a2cf4c1840bb84c4
------------------------------------------------------------
revno: 3778.5.1
revision-id: mbp at sourcefrog.net-20081017030138-wnnwb5wl60isaxjf
parent: pqm at pqm.ubuntu.com-20081015214444-ztwoizx180edy73v
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: 284748-missing-quiet
timestamp: Fri 2008-10-17 14:01:38 +1100
message:
missing -q is quieter (#284748)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/tests/blackbox/test_missing.py test_missing.py-20051211212735-a2cf4c1840bb84c4
=== modified file 'NEWS'
--- a/NEWS 2008-10-27 06:23:43 +0000
+++ b/NEWS 2008-10-27 08:02:47 +0000
@@ -49,6 +49,10 @@
memory before writing it to disk. This was a little bit faster, but
consumed lots of memory. (John Arbash Meinel, #269456)
+ * ``bzr missing --quiet`` no longer prints messages about whether
+ there are missing revisions. The exit code indicates whether there
+ were or not. (Martin Pool, #284748)
+
* Fixes to the ``annotate`` code. The fast-path which re-used the
stored deltas was accidentally disabled all the time, instead of
only when a branch was stacked. Second, the code would accidentally
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2008-10-12 16:11:17 +0000
+++ b/bzrlib/builtins.py 2008-10-17 08:32:52 +0000
@@ -3441,6 +3441,9 @@
show_ids=False, verbose=False, this=False, other=False,
include_merges=False):
from bzrlib.missing import find_unmerged, iter_log_revisions
+ def message(s):
+ if not is_quiet():
+ self.outf.write(s)
if this:
mine_only = this
@@ -3464,7 +3467,7 @@
" or specified.")
display_url = urlutils.unescape_for_display(parent,
self.outf.encoding)
- self.outf.write("Using saved parent location: "
+ message("Using saved parent location: "
+ display_url + "\n")
remote_branch = Branch.open(other_branch)
@@ -3488,8 +3491,8 @@
status_code = 0
if local_extra and not theirs_only:
- self.outf.write("You have %d extra revision(s):\n" %
- len(local_extra))
+ message("You have %d extra revision(s):\n" %
+ len(local_extra))
for revision in iter_log_revisions(local_extra,
local_branch.repository,
verbose):
@@ -3501,9 +3504,9 @@
if remote_extra and not mine_only:
if printed_local is True:
- self.outf.write("\n\n\n")
- self.outf.write("You are missing %d revision(s):\n" %
- len(remote_extra))
+ message("\n\n\n")
+ message("You are missing %d revision(s):\n" %
+ len(remote_extra))
for revision in iter_log_revisions(remote_extra,
remote_branch.repository,
verbose):
@@ -3512,15 +3515,15 @@
if mine_only and not local_extra:
# We checked local, and found nothing extra
- self.outf.write('This branch is up to date.\n')
+ message('This branch is up to date.\n')
elif theirs_only and not remote_extra:
# We checked remote, and found nothing extra
- self.outf.write('Other branch is up to date.\n')
+ message('Other branch is up to date.\n')
elif not (mine_only or theirs_only or local_extra or
remote_extra):
# We checked both branches, and neither one had extra
# revisions
- self.outf.write("Branches are up to date.\n")
+ message("Branches are up to date.\n")
finally:
remote_branch.unlock()
finally:
=== modified file 'bzrlib/tests/blackbox/test_missing.py'
--- a/bzrlib/tests/blackbox/test_missing.py 2008-08-02 17:10:50 +0000
+++ b/bzrlib/tests/blackbox/test_missing.py 2008-10-17 08:32:52 +0000
@@ -1,6 +1,4 @@
-# Copyright (C) 2005 Canonical Ltd
-# -*- coding: utf-8 -*-
-# vim: encoding=utf-8
+# Copyright (C) 2005, 2008 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,6 +26,21 @@
class TestMissing(TestCaseWithTransport):
+ def test_missing_quiet(self):
+ # <https://bugs.launchpad.net/bzr/+bug/284748>
+ # create a source branch
+ #
+ # XXX: This still needs a test that missing is quiet when there are
+ # missing revisions.
+ a_tree = self.make_branch_and_tree('.')
+ self.build_tree_contents([('a', 'initial\n')])
+ a_tree.add('a')
+ a_tree.commit(message='initial')
+
+ out, err = self.run_bzr('missing -q .')
+ self.assertEqual('', out)
+ self.assertEqual('', err)
+
def test_missing(self):
missing = "You are missing 1 revision(s):"
More information about the bazaar-commits
mailing list