[PATCH 1 of 2 v2 STABLE] discovery: add extinct changesets to outgoing.excluded

Pierre-Yves David pierre-yves.david at logilab.fr
Thu Jul 26 04:10:43 CDT 2012


On Wed, Jul 25, 2012 at 07:39:25PM +0200, Patrick Mezard wrote:
>      changegroup.writebundle(cg, fname, bundletype)
> diff --git a/mercurial/discovery.py b/mercurial/discovery.py
> --- a/mercurial/discovery.py
> +++ b/mercurial/discovery.py
> @@ -116,7 +116,7 @@
>          # use visible heads as it should be cached
>          og.missingheads = visibleheads(repo)
>          # extinct changesets are silently ignored
> -        og.excluded = [ctx.node() for ctx in repo.set('secret()')]
> +        og.excluded = [ctx.node() for ctx in repo.set('secret() or extinct()')]
>      else:

the comment about extinct changeset silently ignored should be removed too.
> -def nochangesfound(ui, secretlist=None):
> -    '''report no changes for push/pull'''
> +def nochangesfound(ui, repo, excluded=None):
> +    '''Report no changes for push/pull, excluded is None or a list of
> +    nodes excluded from the push/pull.
> +    '''
> +    secretlist = []
> +    if excluded:
> +        for n in excluded:
> +            ctx = repo[n]
> +            if ctx.phase() >= phases.secret and not ctx.extinct():
> +                secretlist.append(n)
> +

I think the critiria is more about: not ctx.hidden().

But not all extinct changeset are secret. Those reachable with a tag, bookmark
of working directory parent are not hidden and would be reported as secret.
Mayve such changesets should be "suspended" instead or "extinct.


Look good to me otherwise.

-- 
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/20120726/9328bc15/attachment.pgp>


More information about the Mercurial-devel mailing list