~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/add.py

  • Committer: Robert Collins
  • Date: 2006-05-18 07:10:08 UTC
  • mto: (1713.1.3 integration)
  • mto: This revision was merged to the branch mainline in revision 1714.
  • Revision ID: robertc@robertcollins.net-20060518071008-96bc24f18116be36
'bzr add' is now less verbose in telling you what ignore globs were
matched by files being ignored. Instead it just tells you how many were ignored
(because you might reasonably be expecting none to be ignored). 'bzr add -v' is
unchanged and will report every ignored file. (Robert Collins).

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    entry = inv.add_path(path, kind=kind)
66
66
    mutter("added %r kind %r file_id={%s}" % (path, kind, entry.file_id))
67
67
 
 
68
 
68
69
def add_action_add_and_print(inv, path, kind):
69
70
    """Add each file to the given inventory, and print a line to stdout."""
70
71
    add_action_add(inv, path, kind)
83
84
    tree = WorkingTree.open_containing(file_list[0])[0]
84
85
    return smart_add_tree(tree, file_list, recurse, action)
85
86
 
 
87
 
86
88
def smart_add_tree(tree, file_list, recurse=True, action=add_action_add):
87
89
    """Add files to version, optionally recursing into directories.
88
90
 
165
167
                        mutter("queue to add sub-file %r", subp)
166
168
                        file_list.append(tree.abspath(subp))
167
169
 
168
 
 
169
170
    mutter('added %d entries', len(added))
170
171
    
171
172
    if len(added) > 0:
173
174
 
174
175
    return added, ignored
175
176
 
 
177
 
176
178
def __add_one(tree, inv, path, kind, action):
177
179
    """Add a file or directory, automatically add unversioned parents."""
178
180