~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/add.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-12-20 16:16:34 UTC
  • mfrom: (3123.5.18 hardlinks)
  • Revision ID: pqm@pqm.ubuntu.com-20071220161634-2kcjb650o21ydko4
Accelerate build_tree using similar workingtrees (abentley)

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
add_action_null = add_action_add
111
111
add_action_add_and_print = AddAction(should_print=True)
112
112
add_action_print = add_action_add_and_print
 
113
 
 
114
 
 
115
@deprecated_function(zero_eighteen)
 
116
def smart_add(file_list, recurse=True, action=None, save=True):
 
117
    """Add files to version, optionally recursing into directories.
 
118
 
 
119
    This is designed more towards DWIM for humans than API simplicity.
 
120
    For the specific behaviour see the help for cmd_add().
 
121
 
 
122
    Returns the number of files added.
 
123
    Deprecated in 0.18. Please use MutableTree.smart_add.
 
124
    """
 
125
    tree = WorkingTree.open_containing(file_list[0])[0]
 
126
    return smart_add_tree(tree, file_list, recurse, action=action, save=save)
 
127
 
 
128
 
 
129
@deprecated_function(zero_eighteen)
 
130
def smart_add_tree(tree, file_list, recurse=True, action=None, save=True):
 
131
    """Deprecated in 0.18. Please use MutableTree.smart_add."""
 
132
    return tree.smart_add(file_list, recurse, action, save)
 
133