2009-03-12 08:48:19 |
Vincent Ladeuil |
bzr: statusexplanation |
Hi,
Thanks for the bug.
I can see this
cur_file_id = tree.path2id(relpath)
rev_tree = b.repository.revision_tree(revision_id)
old_file_id = rev_tree.path2id(relpath)
if name_from_revision:
if old_file_id is None:
raise errors.BzrCommandError("%r is not present in revision %s"
% (filename, revision_id))
else:
content = rev_tree.get_file_text(old_file_id)
elif cur_file_id is not None:
content = rev_tree.get_file_text(cur_file_id)
elif old_file_id is not None:
content = rev_tree.get_file_text(old_file_id)
so it assumes that a file id in a newer revision will be present in an older one.
I haven't thought it through, but it probably wants to either try old_file_id first,
or catch the error in the new_file_id use.
I think the former, othewise there may be no way to access certain paths in
the old revision.
This sort of thing occurs in a few places, maybe we need to look
at a way to specify whether you are talking about a current path,
an old one, or a specific path over time, regarless of file ids (for log).
Thanks,
James
|
That's a bug, we try to find the file content under the file id used in the current working tree and fail to fallback to the old file id if it can't be found in the requested revision. |
|