~parthm/bzr/81689-win-symlink-warning

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

  • Committer: Parth Malwankar
  • Date: 2012-02-24 16:46:18 UTC
  • mfrom: (6469.1.6 +trunk)
  • Revision ID: parth.malwankar@gmail.com-20120224164618-emfbwluo8bmje3x1
mergedĀ inĀ trunk

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