~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/add.py

  • Committer: Martin Pool
  • Date: 2008-05-08 04:33:38 UTC
  • mfrom: (3414 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3415.
  • Revision ID: mbp@sourcefrog.net-20080508043338-ru3vflx8z641a76k
Merge trunk

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