~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

  • Committer: Robert Collins
  • Date: 2005-09-23 09:25:16 UTC
  • mto: (1092.3.4)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: robertc@robertcollins.net-20050923092516-e2c3c0f31288669d
Merge what applied of Alexander Belchenko's win32 patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
    InventoryEntry('2326', 'wibble.c', kind='file', parent_id='2325')
80
80
    >>> i['2326']
81
81
    InventoryEntry('2326', 'wibble.c', kind='file', parent_id='2325')
82
 
    >>> for j in i.iter_entries():
83
 
    ...     print j[0]
84
 
    ...     assert i.path2id(j[0])
 
82
    >>> for path, entry in i.iter_entries():
 
83
    ...     print path.replace('\\\\', '/')     # for win32 os.sep
 
84
    ...     assert i.path2id(path)
85
85
    ... 
86
86
    src
87
87
    src/bye.c
88
88
    src/hello.c
89
89
    src/wibble
90
90
    src/wibble/wibble.c
91
 
    >>> i.id2path('2326')
 
91
    >>> i.id2path('2326').replace('\\\\', '/')
92
92
    'src/wibble/wibble.c'
93
93
 
94
94
    TODO: Maybe also keep the full path of the entry, and the children?