why does "bzr cat" throw junk on screen before the first "bzr commit"? bzr bug?

James Westby jw+debian at jameswestby.net
Tue Mar 3 18:19:14 GMT 2009


On Tue, 2009-03-03 at 11:47 -0600, Rahul Nabar wrote:
> Just noticed something funny with bazaar and I am curious whether it
> merely reflects my ignorance of the system or is a tiny bug:
> 
> %>echo  "foo" > test_file
> %>bzr add test_file
> %>bzr cat test_file
> [screenloads of junk]

That junk starts:

bzr: ERROR: The file id "test_file-20090303181346-ky8hu651dzl545wq-1" is
not present in the tree <Inventory object at 8f00c4c, contents={'

so it is reporting an error, just not in a pleasant manner.

I can't find a specific bug for this, I think it should give a nicer
error.

> On a side note a question about the workflow: Why does the initial
> "bzr add" not "bzr commit" as well. Is there some significance to the
> limbo between the first add and the first commit? I find myself doing
> those two steps always one after the other.

Because that's often not what you will do.

It's better to have the consistency of what "bzr add" does than to save
one step when you do "bzr add && bzr commit". It also avoids those
who didn't want the commit having to figure out how to undo it. Lastly,
starting a project is a relatively rare operation, so optimising for it
doesn't make much sense.

Thanks,

James




More information about the bazaar mailing list