364
364
return added + [path.raw_path]
367
def __add_one(tree, inv, parent_ie, path, kind, action):
367
def __add_one(tree, inv, parent_ie, path, kind, file_id_callback):
368
368
"""Add a new entry to the inventory.
370
370
:param inv: Inventory which will receive the new entry.
371
371
:param parent_ie: Parent inventory entry.
372
372
:param kind: Kind of new entry (file, directory, etc)
373
:param action: callback(inv, parent_ie, path, kind); return a file_id
373
:param file_id_callback: callback(inv, parent_ie, path, kind); return a file_id
374
374
or None to generate a new file id
377
file_id = action(inv, parent_ie, path, kind)
377
file_id = file_id_callback(inv, parent_ie, path, kind)
378
378
entry = bzrlib.inventory.make_entry(kind, path.base_path, parent_ie.file_id,