/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Vincent Ladeuil
  • Date: 2009-06-02 09:21:20 UTC
  • mfrom: (4396 +trunk)
  • mto: (4396.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4397.
  • Revision ID: v.ladeuil+lp@free.fr-20090602092120-xs1ikguqckiu820o
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
867
867
    return pathjoin(*p)
868
868
 
869
869
 
 
870
def parent_directories(filename):
 
871
    """Return the list of parent directories, deepest first.
 
872
    
 
873
    For example, parent_directories("a/b/c") -> ["a/b", "a"].
 
874
    """
 
875
    parents = []
 
876
    parts = splitpath(dirname(filename))
 
877
    while parts:
 
878
        parents.append(joinpath(parts))
 
879
        parts.pop()
 
880
    return parents
 
881
 
 
882
 
870
883
try:
871
884
    from bzrlib._chunks_to_lines_pyx import chunks_to_lines
872
885
except ImportError: