~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Robert Collins
  • Date: 2005-10-03 14:28:37 UTC
  • mto: (1393.1.30)
  • mto: This revision was merged to the branch mainline in revision 1400.
  • Revision ID: robertc@robertcollins.net-20051003142837-78bf906d4edcbd62
factor out inventory directory logic into 'InventoryDirectory' class

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
import bzrlib
26
26
from bzrlib.inventory import InventoryEntry
 
27
import bzrlib.inventory as inventory
27
28
from bzrlib.trace import mutter, note
28
29
from bzrlib.osutils import (isdir, quotefn, compact_date, rand_bytes, 
29
30
                            rename, splitpath, sha_file, appendpath, 
660
661
            name = os.path.basename(path)
661
662
            if name == "":
662
663
                continue
663
 
            inv.add(InventoryEntry(file_id, name, kind, parent))
 
664
            if kind == 'directory':
 
665
                inv.add(inventory.InventoryDirectory(file_id, name, parent))
 
666
            else:
 
667
                inv.add(InventoryEntry(file_id, name, kind, parent))
664
668
        self._write_inventory(inv)
665
669
 
666
670
    def unknowns(self):