[PATCH 1 of 2 V2] push: remove undocumented exit code 2 for bookmark exchange failure

Pierre-Yves David pierre-yves.david at logilab.fr
Mon Dec 10 03:50:27 CST 2012


On Fri, Dec 07, 2012 at 01:43:15PM -0600, Kevin Bullock wrote:
> # HG changeset patch
> # User Kevin Bullock <kbullock at ringworld.org>
> # Date 1354908879 21600
> # Node ID 106b515749cf338617d24c2fae3850987bf46734
> # Parent  f3991bcf4f0ff43b43a1b1d0210925a629ef3b9c
> push: remove undocumented exit code 2 for bookmark exchange failure
> 
> This exit code was originally added in e1a145eebb6a, but was never
> documented. It interferes with moving the remaining bookmark exchange
> code into localrepo.push(), because that method returns an integer
> indicating the number of heads added.

Dropping useful information does not seems a win, but according your next patche
we did not get information for already shared bookmark.

Maybe it's time to have a richer return from push?

> 
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -4784,13 +4784,11 @@ def push(ui, repo, dest=None, **opts):
>              else:
>                  ui.warn(_('bookmark %s does not exist on the local '
>                            'or remote repository!\n') % b)
> -                return 2
> +                break

I think we want a continue here, isn't it?
Trying to honor all -B options seems more sensible. This probaby deserve
another patch anyway.


-- 
Pierre-Yves David

http://www.logilab.fr/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20121210/d8ebc562/attachment.pgp>


More information about the Mercurial-devel mailing list