2010-04-01 02:47:47 |
Andrew Bennetts |
description |
Hello. My colleague and I see this:
A standalone branch named "branch1", format 2a.
A subdirectory inno2 in it.
bzr 2.1.
cd branch1
bzr blame -r2 inno/trx/trx.c
bzr: ERROR: The file id "trx.c-20100328163452-arkhzrgwlj1f761f-1" is not present in the tree <bzrlib.inventory.CHKInventory object at 0xb773d88c>.
But if we create a branch at revision 2:
bzr branch branch1 -r2 ../tmp_branch
cd ../tmp_branch
bzr blame inno/trx/trx.c
then it works.
There have been file renames going on here, which likely cause the error, but our question is: is "bzr blame -rX" supported? if yes: then we see a bug and will provide the branch causing the bug; if no: then please remove "-r" from "bzr help blame" and throw an error if the option is used, otherwise people use -r and get problems. It is not the first time that this automatic "show -r option in help for all commands" is confusing.
He also tried
cd branch1
bzr update -r2
in order to have a tree at revision 2 (that was before I suggested "bzr branch -r2"), and after that
bzr blame inno/trx/trx.c
which gives the same error.
So another question: is "bzr update -rX" supported? if yes, what is it expected to do and there is a bug to fix; if no, let's also remove it from "bzr help update" and reject -r.
Thanks a lot! |
Grab the branch attached to comment #3: <http://launchpadlibrarian.net/42636794/branch_551758.tar.gz>, and untar it.
$ wget http://launchpadlibrarian.net/42636794/branch_551758.tar.gz
$ tar xzf branch_551758.tar.gz
$ cd branch_551758
Update to r2, and try annotating a file present in r2 (and so in our working tree of r2), but not present in the branch tip:
$ bzr update -r2
+N inno/trx/
+N inno/trx/trx.c
-D inno/trx/
-D inno/trx/trx.c
All changes applied successfully.
Updated to revision 2 of branch /tmp/branch_551758
$ bzr annotate inno/trx/trx.c
bzr: ERROR: The file id "trx.c-20100328163754-yhpyfzy03yeeuclh-1" is not present in the tree <bzrlib.inventory.CHKInventory object at 0x96c8f4c>.
Workaround: specify -rX to annotate to match the revision passed to update -rX:
$ bzr annotate inno/trx/trx.c -r2
1 vasil.d | int a;
2 vasil.d | int b;
|
|