"bzr missing" should document return code meanings

Bug #308651 reported by Gleb Shchepa
4
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Neil Martinsen-Burrell

Bug Description

 $ cd some-branch
 $ bzr missing
some output from bzr
 $ echo $? # this always prints 1 instead of 0
1

$ bzr version
Bazaar (bzr) 1.10
  Python interpreter: /usr/bin/python 2.5.2

Tags: doc easy mysql

Related branches

description: updated
Revision history for this message
Vincent Ladeuil (vila) wrote :

bzr missing returns 0 if nothing is missing and 1 if something is missing

Changed in bzr:
status: New → Invalid
Revision history for this message
Gleb Shchepa (gleb-mysql) wrote :

vila, do you know where is it documented?

Revision history for this message
Vincent Ladeuil (vila) wrote :

The best documentation I can find is in bzrlib.tests.blackbox.test_missing :->

Revision history for this message
GuilhemBichot (guilhem-bichot) wrote :

Salut Vincent. Yes, the return code rules of "bzr missing" is something I found by looking at code too; we see here that this is not sufficient documentation; it would be much better to have it mentioned in "bzr help missing" if possible. Thank you for considering this request.

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 308651] [NEW] normally executed "bzr missing" returns 1 to parent process instead of zero status code

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gleb Shchepa wrote:
> Public bug reported:
>
> $ cd some-brach
> $ bzr missing
> some output from bzr
> $ echo $? # this always prints 1 instead of 0
> 1

This is the common status code policy for bzr. You'll find the same
thing with "bzr diff" as well.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl1MiwACgkQ0F+nu1YWqI2lRgCePRSJdKCfHDQ4IkeHKFsANOUP
a4kAniUrV1qVEGc8zrl27o5/uQrbf/yk
=PUOf
-----END PGP SIGNATURE-----

Revision history for this message
Vincent Ladeuil (vila) wrote : Re: normally executed "bzr missing" returns 1 to parent process instead of zero status code

The doc for missing should mention the different values as diff does

Changed in bzr:
status: Invalid → Confirmed
Martin Pool (mbp)
summary: - normally executed "bzr missing" returns 1 to parent process instead of
- zero status code
+ "bzr missing" should document return code meanings
Changed in bzr:
importance: Undecided → Low
tags: added: easy
Changed in bzr:
assignee: nobody → Neil Martinsen-Burrell (nmb)
milestone: none → 2.1.0b4
status: Confirmed → Fix Released
Revision history for this message
SabreWolfy (sabrewolfy) wrote :

This is marked as fixed in 2.1.0b4. Where can I find a list of the return codes and what they mean?

Revision history for this message
SabreWolfy (sabrewolfy) wrote :
Revision history for this message
Neil Martinsen-Burrell (nmb) wrote : Re: [Bug 308651] Re: "bzr missing" should document return code meanings

From "bzr help missing":

"""
Exit values:
    1 - some missing revisions
    0 - no missing revisions
"""

Is there somewhere else that you would like to see this documented?
Some change to the language used that would make it more transparent
to you?

On Mon, Jul 23, 2012 at 8:29 AM, SabreWolfy <email address hidden> wrote:
> Partial answer here from February 2012:
>
> http://comments.gmane.org/gmane.comp.version-control.bazaar-
> ng.general/73804
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/308651
>
> Title:
> "bzr missing" should document return code meanings
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/bzr/+bug/308651/+subscriptions

Revision history for this message
SabreWolfy (sabrewolfy) wrote :

Thanks. I meant that it would be useful to have a list of return/exit codes to all commands, not just for "missing". Running "bzr help update" for example, does not include a list of return codes for that command.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.