[MERGE] Fix for 306394: warning, not error, on non-existent file.

Martin Pool mbp at canonical.com
Wed Dec 24 07:27:23 GMT 2008


On 24 Dec 2008, Jelmer Vernooij <jelmer at samba.org> wrote:

> I think it would make sense to still exit with a non-zero exit code if
> one of the files specified was not found. Is there a bzr policy wrt the
> exit code of partially succeeding/partially failing commands?

Somewhat; the main policy is that it depends on the context of the
command.  For example, diff returns 1 if there are differences, even
though that's the expected normal case, because that's consistent with
plain diff (and maybe other systems.)

We use 3 for "something broke" leaving 2 and 1 for other less severe cases.

For status it could be good to distinguish e.g. 0="nothing has changed",
1="something has changed", 2="there were warnings", 3="there was an
error".

-- 
Martin      <http://launchpad.net/~mbp>



More information about the bazaar mailing list