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

Patrick Mézard patrick at mezard.eu
Fri Jul 27 03:40:36 CDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 26/07/12 11:10, Pierre-Yves David a écrit :
> 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.

Fixed, thanks.

>> -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.

I would be in favor of pushing the user to fix the tag/bookmark instead of supporting them at all cost. I do not have clear idea of the consequence of either choice.

- --
Patrick Mézard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJQElQEAAoJEBaMCOeEaaNYcqUP/0YPIdVjVREcFTgUKaGPmeh1
BSQVucqmOevknjEXk+6f/B3JVs2NmTLKAYscXPFhjNGPMxI1PXXqUgkOqNLsLSYe
cIPwiJXuJKrLRxbh5xAI1c8GrOmTdQOZ2p1R6XPz6y1OEnvoQ261XKJRKHWMI/tP
o73Yqaobpn81SdIg/6lSnhzHzZUGXbiPPzynE5EVrIw1gDnG9JkUPhpESPMJqfAJ
1zutNIKyTpxKHpvtzioAAC5nwUAldBKDY35gQe1U8e5sMS3YnF0hFn5ub5x7inim
ESiZL7SRXpEdk7w5RpjoVATu0FLqOYYIIhVjQ8GOr3r1ePl0CIrLxvene6MOORU4
3V2zthuDRi8BZhMX3hUkdTwQ42RB1BEECSgrO0PBsBcBuLmDoUDjGWaX1Sb1370a
Qiglx/MuzFAJHuI8ZPtA1P1onyVcZ2zD4RTo4IsNRDdqA9SIr+sLqCcGHIK9O4GY
SnrcYIeWE9TQIrhpDXoxB8w+4ELM2RZIkMO2lJ01QFembyd7F2b0gLVLMMYjcfsk
An5FLH+17vO5FNIGW2a6nmoyxQ/fShiJhbGGppWWvfwMssQobr5t9pAhOP6atxvs
HmN/znBkh7n/cgrWqviUHflrQ03MJcYr56BVwklaUh6TrjC2Mb+Sh1CYyky1MSP1
CqhF74zMouFmC3jGILhR
=XZ2d
-----END PGP SIGNATURE-----


More information about the Mercurial-devel mailing list