Rev 3210: Make pull --quiet more quiet (James Westby) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Fri Feb 1 03:46:22 GMT 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3210
revision-id:pqm at pqm.ubuntu.com-20080201034612-xl88s8i45res3pm2
parent: pqm at pqm.ubuntu.com-20080130212051-utcw5p2zydlq6ntb
parent: ian.clatworthy at internode.on.net-20080201003033-7r914kfv5m53o5o4
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2008-02-01 03:46:12 +0000
message:
Make pull --quiet more quiet (James Westby)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/delta.py delta.py-20050729221636-54cf14ef94783d0a
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/tests/blackbox/test_pull.py test_pull.py-20051201144907-64959364f629947f
------------------------------------------------------------
revno: 3209.1.1
revision-id:ian.clatworthy at internode.on.net-20080201003033-7r914kfv5m53o5o4
parent: pqm at pqm.ubuntu.com-20080130212051-utcw5p2zydlq6ntb
parent: jw+debian at jameswestby.net-20080129201228-bf02rkx5o95wd1c9
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: ianc-integration
timestamp: Fri 2008-02-01 10:30:33 +1000
message:
Make pull --quiet more quiet (James Westby)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/delta.py delta.py-20050729221636-54cf14ef94783d0a
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/tests/blackbox/test_pull.py test_pull.py-20051201144907-64959364f629947f
------------------------------------------------------------
revno: 3200.1.2
revision-id:jw+debian at jameswestby.net-20080129201228-bf02rkx5o95wd1c9
parent: jw+debian at jameswestby.net-20080128214616-9l1gs91fgnk41wex
committer: James Westby <jw+debian at jameswestby.net>
branch nick: bzr.dev.jw
timestamp: Tue 2008-01-29 20:12:28 +0000
message:
Check that the pull succeeds even when printing nothing.
modified:
bzrlib/tests/blackbox/test_pull.py test_pull.py-20051201144907-64959364f629947f
------------------------------------------------------------
revno: 3200.1.1
revision-id:jw+debian at jameswestby.net-20080128214616-9l1gs91fgnk41wex
parent: pqm at pqm.ubuntu.com-20080124050323-gsgsp2em7v1ugtnz
committer: James Westby <jw+debian at jameswestby.net>
branch nick: bzr.dev.jw
timestamp: Mon 2008-01-28 21:46:16 +0000
message:
Make pull --quiet more quiet. Fixes #185907.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/delta.py delta.py-20050729221636-54cf14ef94783d0a
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/tests/blackbox/test_pull.py test_pull.py-20051201144907-64959364f629947f
=== modified file 'NEWS'
--- a/NEWS 2008-01-30 21:20:51 +0000
+++ b/NEWS 2008-02-01 00:30:33 +0000
@@ -58,12 +58,19 @@
* List possible values for BZR_SSH environment variable in env-variables
help topic. (Alexander Belchenko, #181842)
+ * pull --quiet is now more quiet, in particular a message is no longer
+ printed when the remembered pull location is used. (James Westby,
+ #185907)
+
* ``reconfigure`` can safely be interrupted while fetching.
(Aaron Bentley, #179316)
* ``reconfigure`` preserves tags when converting to and from lightweight
checkouts. (Aaron Bentley, #182040)
+ * Stop polluting /tmp when running selftest.
+ (Vincent Ladeuil, #123623)
+
* Switch from NFKC => NFC for normalization checks. NFC allows a few
more characters which should be considered valid.
(John Arbash Meinel, #185458)
@@ -71,9 +78,6 @@
* Unknown hostnames when connecting to a ``bzr://`` URL no longer cause
tracebacks. (Andrew Bennetts, #182849)
- * Stop polluting /tmp when running selftest.
- (Vincent Ladeuil, #123623)
-
API BREAKS:
* Classes implementing Merge types like Merge3Merger must now accept (and
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py 2007-12-20 14:28:59 +0000
+++ b/bzrlib/branch.py 2008-01-28 21:46:16 +0000
@@ -62,7 +62,7 @@
zero_eight, zero_nine, zero_sixteen,
zero_ninetyone,
)
-from bzrlib.trace import mutter, mutter_callsite, note
+from bzrlib.trace import mutter, mutter_callsite, note, is_quiet
BZR_BRANCH_FORMAT_4 = "Bazaar-NG branch, format 0.0.4\n"
@@ -2129,10 +2129,11 @@
return self.new_revno - self.old_revno
def report(self, to_file):
- if self.old_revid == self.new_revid:
- to_file.write('No revisions to pull.\n')
- else:
- to_file.write('Now on revision %d.\n' % self.new_revno)
+ if not is_quiet():
+ if self.old_revid == self.new_revid:
+ to_file.write('No revisions to pull.\n')
+ else:
+ to_file.write('Now on revision %d.\n' % self.new_revno)
self._show_tag_conficts(to_file)
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2008-01-30 08:15:25 +0000
+++ b/bzrlib/builtins.py 2008-02-01 00:30:33 +0000
@@ -610,7 +610,8 @@
else:
display_url = urlutils.unescape_for_display(stored_loc,
self.outf.encoding)
- self.outf.write("Using saved location: %s\n" % display_url)
+ if not is_quiet():
+ self.outf.write("Using saved location: %s\n" % display_url)
location = stored_loc
location_transport = transport.get_transport(
location, possible_transports=possible_transports)
=== modified file 'bzrlib/delta.py'
--- a/bzrlib/delta.py 2007-10-24 02:33:14 +0000
+++ b/bzrlib/delta.py 2008-01-28 21:46:16 +0000
@@ -19,7 +19,7 @@
osutils,
)
from bzrlib.inventory import InventoryEntry
-from bzrlib.trace import mutter
+from bzrlib.trace import mutter, is_quiet
from bzrlib.symbol_versioning import deprecated_function
@@ -314,6 +314,8 @@
:param kind: A pair of file kinds, as generated by Tree._iter_changes.
None indicates no file present.
"""
+ if is_quiet():
+ return
if paths[1] == '' and versioned == 'added' and self.suppress_root_add:
return
if versioned == 'unversioned':
=== modified file 'bzrlib/merge.py'
--- a/bzrlib/merge.py 2008-01-05 23:01:50 +0000
+++ b/bzrlib/merge.py 2008-01-28 21:46:16 +0000
@@ -47,7 +47,7 @@
from progress import DummyProgress, ProgressPhase
from bzrlib.revision import (NULL_REVISION, ensure_null)
from bzrlib.textfile import check_text_lines
-from bzrlib.trace import mutter, warning, note
+from bzrlib.trace import mutter, warning, note, is_quiet
from bzrlib.transform import (TransformPreview, TreeTransform,
resolve_conflicts, cook_conflicts,
conflict_pass, FinalPaths, create_by_entry,
@@ -439,7 +439,7 @@
self.base_tree.unlock()
self.this_tree.unlock()
if len(merge.cooked_conflicts) == 0:
- if not self.ignore_zero:
+ if not self.ignore_zero and not is_quiet():
note("All changes applied successfully.")
else:
note("%d conflicts encountered." % len(merge.cooked_conflicts))
=== modified file 'bzrlib/tests/blackbox/test_pull.py'
--- a/bzrlib/tests/blackbox/test_pull.py 2007-08-21 13:52:55 +0000
+++ b/bzrlib/tests/blackbox/test_pull.py 2008-01-29 20:12:28 +0000
@@ -305,3 +305,22 @@
self.assertContainsRe(out, 'bar')
self.assertNotContainsRe(out, 'added:')
self.assertNotContainsRe(out, 'foo')
+
+ def test_pull_quiet(self):
+ """Check that bzr pull --quiet does not print anything"""
+ tree_a = self.make_branch_and_tree('tree_a')
+ self.build_tree(['tree_a/foo'])
+ tree_a.add('foo')
+ revision_id = tree_a.commit('bar')
+ tree_b = tree_a.bzrdir.sprout('tree_b').open_workingtree()
+ out, err = self.run_bzr('pull --quiet -d tree_b')
+ self.assertEqual(out, '')
+ self.assertEqual(err, '')
+ self.assertEqual(tree_b.last_revision(), revision_id)
+ self.build_tree(['tree_a/moo'])
+ tree_a.add('moo')
+ revision_id = tree_a.commit('quack')
+ out, err = self.run_bzr('pull --quiet -d tree_b')
+ self.assertEqual(out, '')
+ self.assertEqual(err, '')
+ self.assertEqual(tree_b.last_revision(), revision_id)
More information about the bazaar-commits
mailing list