[PATCH V2] outgoing: Support pushrev (issue6106)

Yuya Nishihara yuya at tcha.org
Thu Mar 28 18:45:55 EDT 2019


On Thu, 28 Mar 2019 19:06:10 +0100, Kim Alvefur wrote:
> # HG changeset patch
> # User Kim Alvefur <zash at zash.se>
> # Date 1553614536 -3600
> #      Tue Mar 26 16:35:36 2019 +0100
> # Node ID df9b2ef3a948be54c6180e2b6595e0f61522e740
> # Parent  00c1ee0f746a5f427e81e6d18e681f6a70a2639d
> outgoing: Support pushrev  (issue6106)
> 
> It should mirror behaviour of `hg push`.
> 
> diff -r 00c1ee0f746a -r df9b2ef3a948 mercurial/commands.py
> --- a/mercurial/commands.py	Sun Mar 24 20:13:13 2019 -0400
> +++ b/mercurial/commands.py	Tue Mar 26 16:35:36 2019 +0100
> @@ -4091,6 +4091,10 @@ def outgoing(ui, repo, dest=None, **opts
>                            hint=_("see 'hg help config.paths'"))
>  
>      opts = pycompat.byteskwargs(opts)
> +
> +    if path.pushrev and not opts.get('rev'):
> +        opts['rev'] = [ path.pushrev ]

Can you test behavior with -b/--branch or PATH#REV syntax?
I think commands.push() won't take :pushrev if any revision is specified.

Maybe we can move the pushrev resolution to hg._outgoing().


More information about the Mercurial-devel mailing list