Rev 4596: (mbp) additional fix for bzr add ignored messages in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Aug 10 12:11:48 BST 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4596 [merge]
revision-id: pqm at pqm.ubuntu.com-20090810111144-cnc5w7p0nsemd76s
parent: pqm at pqm.ubuntu.com-20090807010459-nw1f0r9y1igi19xf
parent: mbp at sourcefrog.net-20090810082642-zlgvgzafraij384s
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2009-08-10 12:11:44 +0100
message:
(mbp) additional fix for bzr add ignored messages
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/tests/blackbox/test_add.py test_add.py-20060518072250-857e4f86f54a30b2
=== modified file 'NEWS'
--- a/NEWS 2009-08-06 06:58:09 +0000
+++ b/NEWS 2009-08-10 08:26:42 +0000
@@ -6,6 +6,15 @@
.. contents:: List of Releases
:depth: 1
+In Development
+##############
+
+Bug Fixes
+*********
+
+* Further tweaks to handling of ``bzr add`` messages about ignored files.
+ (Jason Spashett, #76616)
+
In Development
##############
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2009-07-27 06:22:57 +0000
+++ b/bzrlib/builtins.py 2009-08-10 08:25:53 +0000
@@ -603,6 +603,9 @@
branches that will be merged later (without showing the two different
adds as a conflict). It is also useful when merging another project
into a subdirectory of this one.
+
+ Any files matching patterns in the ignore list will not be added
+ unless they are explicitly mentioned.
"""
takes_args = ['file*']
takes_options = [
@@ -616,7 +619,7 @@
help='Lookup file ids from this tree.'),
]
encoding_type = 'replace'
- _see_also = ['remove']
+ _see_also = ['remove', 'ignore']
def run(self, file_list, no_recurse=False, dry_run=False, verbose=False,
file_ids_from=None):
@@ -654,14 +657,6 @@
for path in ignored[glob]:
self.outf.write("ignored %s matching \"%s\"\n"
% (path, glob))
- else:
- match_len = 0
- for glob, paths in ignored.items():
- match_len += len(paths)
- self.outf.write("ignored %d file(s).\n" % match_len)
- self.outf.write("If you wish to add ignored files, "
- "please add them explicitly by name. "
- "(\"bzr ignored\" gives a list)\n")
class cmd_mkdir(Command):
=== modified file 'bzrlib/tests/blackbox/test_add.py'
--- a/bzrlib/tests/blackbox/test_add.py 2009-06-10 03:56:49 +0000
+++ b/bzrlib/tests/blackbox/test_add.py 2009-08-10 08:25:05 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006, 2007 Canonical Ltd
+# Copyright (C) 2005, 2006, 2007, 2009 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
@@ -55,20 +55,14 @@
out = self.run_bzr('add')[0]
# the ordering is not defined at the moment
results = sorted(out.rstrip('\n').split('\n'))
- self.assertEquals(['If you wish to add ignored files, '
- 'please add them explicitly by name. '
- '("bzr ignored" gives a list)',
- 'adding .bzrignore',
+ self.assertEquals(['adding .bzrignore',
'adding dir',
'adding dir/sub.txt',
- 'adding top.txt',
- 'ignored 1 file(s).'],
+ 'adding top.txt'],
results)
out = self.run_bzr('add -v')[0]
results = sorted(out.rstrip('\n').split('\n'))
- self.assertEquals(['If you wish to add ignored files, '\
- 'please add them explicitly by name. ("bzr ignored" gives a list)',
- 'ignored CVS matching "CVS"'],
+ self.assertEquals(['ignored CVS matching "CVS"'],
results)
def test_add_quiet_is(self):
More information about the bazaar-commits
mailing list