~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mutabletree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-07-04 20:40:59 UTC
  • mfrom: (2585.1.1 less-crack)
  • Revision ID: pqm@pqm.ubuntu.com-20070704204059-a1x9jomep52m9arn
Unify MutableTree.smart_add behavior by disabling quirky memory-only Inventory

Show diffs side-by-side

added added

removed removed

Lines of Context:
285
285
            a specific one should be used.
286
286
        :param save: Save the inventory after completing the adds. If False
287
287
            this provides dry-run functionality by doing the add and not saving
288
 
            the inventory.  Note that the modified inventory is left in place,
289
 
            allowing further dry-run tasks to take place. To restore the
290
 
            original inventory call self.read_working_inventory().
 
288
            the inventory.
291
289
        :return: A tuple - files_added, ignored_files. files_added is the count
292
290
            of added files, and ignored_files is a dict mapping files that were
293
291
            ignored to the rule that caused them to be ignored.
444
442
                            #mutter("queue to add sub-file %r", subp)
445
443
                            dirs_to_add.append((_FastPath(subp, subf), this_ie))
446
444
 
447
 
        if len(added) > 0 and save:
448
 
            self._write_inventory(inv)
 
445
        if len(added) > 0:
 
446
            if save:
 
447
                self._write_inventory(inv)
 
448
            else:
 
449
                self.read_working_inventory()
449
450
        return added, ignored
450
451
 
451
452