Rev 4802: (Gordon Tyler) Make 'bzr mv' respect the '--quiet' option. (#271790) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Nov 17 04:50:41 GMT 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4802 [merge]
revision-id: pqm at pqm.ubuntu.com-20091117045040-baxdefwvou2jgoo9
parent: pqm at pqm.ubuntu.com-20091117032035-s3sgtlixj1lrminn
parent: andrew.bennetts at canonical.com-20091117040345-22ei51f9g455jpxj
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2009-11-17 04:50:40 +0000
message:
(Gordon Tyler) Make 'bzr mv' respect the '--quiet' option. (#271790)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/tests/blackbox/test_mv.py test_mv.py-20060705114902-33tkxz0o9cdshemo-1
=== modified file 'NEWS'
--- a/NEWS 2009-11-17 02:34:42 +0000
+++ b/NEWS 2009-11-17 04:03:45 +0000
@@ -26,6 +26,8 @@
* ``bzr ignore /`` no longer causes an IndexError. (Gorder Tyler, #456036)
+* ``bzr mv --quiet`` really is quiet now. (Gordon Tyler, #271790)
+
* Lots of bugfixes for the test suite on Windows. We should once again
have a test suite with no failures on Windows. (Once all the patches
have landed, remove this line.) (John Arbash Meinel)
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2009-11-12 07:47:19 +0000
+++ b/bzrlib/builtins.py 2009-11-17 03:54:52 +0000
@@ -849,8 +849,9 @@
# All entries reference existing inventory items, so fix them up
# for cicp file-systems.
rel_names = tree.get_canonical_inventory_paths(rel_names)
- for pair in tree.move(rel_names[:-1], rel_names[-1], after=after):
- self.outf.write("%s => %s\n" % pair)
+ for src, dest in tree.move(rel_names[:-1], rel_names[-1], after=after):
+ if not is_quiet():
+ self.outf.write("%s => %s\n" % (src, dest))
else:
if len(names_list) != 2:
raise errors.BzrCommandError('to mv multiple files the'
@@ -900,7 +901,8 @@
dest = osutils.pathjoin(dest_parent, dest_tail)
mutter("attempting to move %s => %s", src, dest)
tree.rename_one(src, dest, after=after)
- self.outf.write("%s => %s\n" % (src, dest))
+ if not is_quiet():
+ self.outf.write("%s => %s\n" % (src, dest))
class cmd_pull(Command):
=== modified file 'bzrlib/tests/blackbox/test_mv.py'
--- a/bzrlib/tests/blackbox/test_mv.py 2009-09-17 11:54:41 +0000
+++ b/bzrlib/tests/blackbox/test_mv.py 2009-11-17 01:08:08 +0000
@@ -487,6 +487,14 @@
self.assertEqual('bzr: ERROR: --after cannot be specified with'
' --auto.\n', err)
+ def test_mv_quiet(self):
+ tree = self.make_branch_and_tree('.')
+ self.build_tree(['aaa'])
+ tree.add(['aaa'])
+ out, err = self.run_bzr('mv --quiet aaa bbb')
+ self.assertEqual(out, '')
+ self.assertEqual(err, '')
+
def test_mv_readonly_lightweight_checkout(self):
branch = self.make_branch('foo')
branch = bzrlib.branch.Branch.open(self.get_readonly_url('foo'))
More information about the bazaar-commits
mailing list