~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-07-04 08:08:08 UTC
  • mfrom: (2568.2.10 add)
  • Revision ID: pqm@pqm.ubuntu.com-20070704080808-0ptk5p5yiwxjgnt7
(robertc) Overhaul smart_add to be an api on MutableTree allowing specialisation and reducing some cruft. (Robert Collins, Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
367
367
        if base_tree:
368
368
            base_tree.lock_read()
369
369
        try:
370
 
            added, ignored = bzrlib.add.smart_add(file_list, not no_recurse,
371
 
                action=action, save=not dry_run)
 
370
            file_list = self._maybe_expand_globs(file_list)
 
371
            if file_list:
 
372
                tree = WorkingTree.open_containing(file_list[0])[0]
 
373
            else:
 
374
                tree = WorkingTree.open_containing(u'.')[0]
 
375
            added, ignored = tree.smart_add(file_list, not
 
376
                no_recurse, action=action, save=not dry_run)
372
377
        finally:
373
378
            if base_tree is not None:
374
379
                base_tree.unlock()