~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-17 16:37:15 UTC
  • mto: This revision was merged to the branch mainline in revision 6470.
  • Revision ID: jelmer@samba.org-20120217163715-j7f51okljedzvkuj
Remove barely used Inventory.directories().

Show diffs side-by-side

added added

removed removed

Lines of Context:
850
850
            descend(self.root, u'')
851
851
        return accum
852
852
 
853
 
    def directories(self):
854
 
        """Return (path, entry) pairs for all directories, including the root.
855
 
        """
856
 
        accum = []
857
 
        def descend(parent_ie, parent_path):
858
 
            accum.append((parent_path, parent_ie))
859
 
 
860
 
            kids = [(ie.name, ie) for ie in parent_ie.children.itervalues() if ie.kind == 'directory']
861
 
            kids.sort()
862
 
 
863
 
            for name, child_ie in kids:
864
 
                child_path = osutils.pathjoin(parent_path, name)
865
 
                descend(child_ie, child_path)
866
 
        descend(self.root, u'')
867
 
        return accum
868
 
 
869
853
    def path2id(self, relpath):
870
854
        """Walk down through directories to return entry of last component.
871
855