[PATCH V2] push: add --publish flag to change phase of pushed changesets

Yuya Nishihara yuya at tcha.org
Thu Nov 22 08:13:54 EST 2018


On Wed, 21 Nov 2018 15:16:22 +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <av6 at dwimlabs.net>
> # Date 1540646003 -28800
> #      Sat Oct 27 21:13:23 2018 +0800
> # Node ID 6426d56aef87e25a4926674dc611938e19f34eb9
> # Parent  69268a13ffa576b71a693f9e208f3eda35e3a46e
> # EXP-Topic push-publish
> push: add --publish flag to change phase of pushed changesets

Queued this, thanks.

> @@ -630,7 +632,10 @@ def _pushdiscoveryphase(pushop):
>      # XXX Beware that revset break if droots is not strictly
>      # XXX root we may want to ensure it is but it is costly
>      fallback = list(unfi.set(revset, droots, pushop.fallbackheads))
> -    if not outgoing.missing:
> +    if not pushop.remotephases.publishing and pushop.publish:
> +        revset = '%ln and (not public() or %ln::)'
> +        future = list(unfi.set(revset, pushop.futureheads, droots))

I've inlined the revset to make it clearer we don't need to overwrite
the previous revset variable.


More information about the Mercurial-devel mailing list