Rev 4076: add should not print 'add completed' unnecessarily. in http://people.ubuntu.com/~robertc/baz2.0/pending/add-noise
Robert Collins
robertc at robertcollins.net
Tue Mar 3 23:05:57 GMT 2009
At http://people.ubuntu.com/~robertc/baz2.0/pending/add-noise
------------------------------------------------------------
revno: 4076
revision-id: robertc at robertcollins.net-20090303230552-isxgvyezephwq1vi
parent: pqm at pqm.ubuntu.com-20090303085413-35seprvnu885xorz
committer: Robert Collins <robertc at robertcollins.net>
branch nick: add-noise
timestamp: Wed 2009-03-04 10:05:52 +1100
message:
add should not print 'add completed' unnecessarily.
=== modified file 'NEWS'
--- a/NEWS 2009-03-03 08:54:13 +0000
+++ b/NEWS 2009-03-03 23:05:52 +0000
@@ -35,6 +35,9 @@
IMPROVEMENTS:
+ * ``bzr add`` no longer prints ``add completed`` on success. Failure
+ still prints an error message. (Robert Collins)
+
* ``bzr branch`` now has a ``--no-tree`` option which turns off the
generation of a working tree in the new branch.
(Daniel Watkins, John Klinger, #273993)
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2009-02-25 23:12:24 +0000
+++ b/bzrlib/builtins.py 2009-03-03 23:05:52 +0000
@@ -585,8 +585,6 @@
finally:
if base_tree is not None:
base_tree.unlock()
- if not is_quiet() and len(added) > 0:
- self.outf.write('add completed\n')
if len(ignored) > 0:
if verbose:
for glob in sorted(ignored.keys()):
=== modified file 'bzrlib/tests/blackbox/test_add.py'
--- a/bzrlib/tests/blackbox/test_add.py 2009-02-23 15:29:35 +0000
+++ b/bzrlib/tests/blackbox/test_add.py 2009-03-03 23:05:52 +0000
@@ -35,7 +35,6 @@
results = sorted(out.rstrip('\n').split('\n'))
self.assertEquals(['If you wish to add some of these files, please'\
' add them by name.',
- 'add completed',
'adding .bzrignore',
'adding dir',
'adding dir/sub.txt',
@@ -149,8 +148,7 @@
self.assertEqual('', err)
self.assertEqualDiff('adding a w/ file id from a\n'
'adding b w/ file id from b\n'
- 'adding b/c w/ file id from b/c\n'
- 'add completed\n',
+ 'adding b/c w/ file id from b/c\n',
out)
new_tree = new_tree.bzrdir.open_workingtree()
self.assertEqual(base_tree.path2id('a'), new_tree.path2id('a'))
@@ -170,8 +168,7 @@
out, err = self.run_bzr('add --file-ids-from ../base/b')
self.assertEqual('', err)
self.assertEqualDiff('adding c w/ file id from b/c\n'
- 'adding d w/ file id from b/d\n'
- 'add completed\n',
+ 'adding d w/ file id from b/d\n',
out)
new_tree = new_tree.bzrdir.open_workingtree()
=== modified file 'bzrlib/tests/blackbox/test_filtered_view_ops.py'
--- a/bzrlib/tests/blackbox/test_filtered_view_ops.py 2009-02-24 22:56:13 +0000
+++ b/bzrlib/tests/blackbox/test_filtered_view_ops.py 2009-03-03 23:05:52 +0000
@@ -55,13 +55,13 @@
wt = self.make_abc_tree_with_ab_view()
out, err = self.run_bzr('add')
self.assertEquals('ignoring files outside view: a, b\n', err)
- self.assertEquals('adding a\nadding b\nadd completed\n', out)
+ self.assertEquals('adding a\nadding b\n', out)
def test_view_on_add_selected(self):
wt = self.make_abc_tree_with_ab_view()
out, err = self.run_bzr('add a')
self.assertEquals('', err)
- self.assertEquals('adding a\nadd completed\n', out)
+ self.assertEquals('adding a\n', out)
out, err = self.run_bzr('add c', retcode=3)
self.assertEquals('bzr: ERROR: Specified file "c" is outside the '
'current view: a, b\n', err)
More information about the bazaar-commits
mailing list