Better handling of non-existent file argument
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Cheuksan Edward Wang |
Bug Description
bzr should report an error when it is given non-existing file arguments to its
command. Presently, it acts like if no argument was given which is kind of consusing.
For example,
bzr log no-such-file
will display the whole log information.
Same thing for,
bzr diff non-existent-file
This will display the diff for the whole tree.
The later is particulary confusing, because 'bzr status' report files using a path relative to the tree of the project.
So, when working in a large project, I do a bzr status in a subdirectory and then copy the path of the file reported as modified and use bzr diff on that, I get the diff of the whole tree. It took me a while to understand, that this was caused by the fact that the path I used were wrong. (Feel free to consider that a bug against bzr status also).
Changed in bzr: | |
assignee: | nobody → wang02139 |
In the latest bzr.dev (at least by 1807), this has already been fixed for the diff and status commands. You now get:
$ bzr diff foo
bzr: ERROR: Path(s) are not versioned: foo
$ bzr status foo
bzr: ERROR: Path(s) do not exist: foo
$ touch foo
$ bzr status foo
unknown:
foo
This is still broken for 'log', 'commit' and a few others, so I'll leave this bug open.
But it is better for a few things.
John