D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Mon Aug 19 11:23:13 EDT 2019


pulkit added a comment.


  Can you also add a test where we are pushing multiple heads/bookmarks and one of the bookmark is problematic?

INLINE COMMENTS

> exchange.py:1043
> +    if ctx.phase() == phases.secret:
> +        raise error.Abort(_('bookmark %s points to a secret changeset') % b)
> +    return False

it will be nice to mention that the failure is about pushing that specific bookmark. something like: `cannot push bookmark %s as it points ...`

> exchange.py:1044
> +        raise error.Abort(_('bookmark %s points to a secret changeset') % b)
> +    return False
> +

What does the return value mean here? I think we can get rid of this.

Something like this:

  if node and pushop.repo[node].phase() == phases.secret:
         raise ....

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6731/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6731

To: navaneeth.suresh, #hg-reviewers
Cc: pulkit, mercurial-devel


More information about the Mercurial-devel mailing list