[RFC] merge with nothing to do should return non-zero
aaron.bentley at utoronto.ca
Fri Aug 17 05:17:33 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Robert Collins wrote:
> I was just trying to use bzr from a shell script, and I noticed that
> 'bzr merge FOO' when there is nothing missing returns 'Nothing to do'
> but does not return non-zero.
Of course not. It successfully did nothing, as you requested ;-)
> Can we do
> something like
> 0 - merge done
> 1 - nothing to do
> 2 - error occured
Actually, 1 is already "conflicts occurred", and is documented as such
in HACKING. Changing that might break existing scripts.
With Martin's patch merged, the next available status code is 5.
0 - Total success
1 - Conflicts
2 - [Unrepresentable diff changes, not at all similar to 'nothing to
3 - User error
4 - Internal error
5 - Sucessfully did nothing
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar