[PATCH remotenames] discovery: consolidate and fix topic check
Ryan McElroy
rm at fb.com
Sun May 1 16:25:11 UTC 2016
On 4/29/2016 10:13 PM, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean at farley.io>
> # Date 1461964151 25200
> # Fri Apr 29 14:09:11 2016 -0700
> # Node ID 8b03e1764da8bed44b38d0a591e8e868a5ae403b
> # Parent f67362d0cfcc228005014efc456c8bf42f8f330b
> discovery: consolidate and fix topic check
>
> diff --git a/remotenames.py b/remotenames.py
> --- a/remotenames.py
> +++ b/remotenames.py
> @@ -649,14 +649,15 @@ def expushdiscoverybookmarks(pushop):
> # aborting error causing the connection to close
> anonheads = []
> knownlist = pushop.remote.known(revs)
> for node, known in zip(revs, knownlist):
> ctx = repo[node]
> - obs = ctx.obsolete()
> - closes = ctx.closesbranch()
> - # if there is a topic, let's just skip it for now
> - if known or obs or closes or 'topic' in ctx.extra():
> + if (known or
> + ctx.obsolete() or
> + ctx.closesbranch() or
> + # if there is a topic, let's just skip it for now
> + (ctx.mutable() and 'topic' in ctx.extra())):
This looks good to me
> continue
> anonheads.append(short(node))
>
> if anonheads:
> msg = _("push would create new anonymous heads (%s)")
>
More information about the Mercurial-devel
mailing list