[PATCH 4 of 4 V2] obsolete: allow cycles

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Mar 13 14:57:08 EDT 2017



On 03/13/2017 09:23 AM, Durham Goode wrote:
> On 3/13/17 2:48 AM, Jun Wu wrote:
>> # HG changeset patch
>> # User Jun Wu <quark at fb.com>
>> # Date 1489395002 25200
>> #      Mon Mar 13 01:50:02 2017 -0700
>> # Node ID 6ae6d1069ba1d4089afaeb0bb8ef2411983a1292
>> # Parent  0280ee091bd0ae33aa0a67b0c8a55ccffd2e0718
>> # Available At
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bitbucket.org_quark-2Dzju_hg-2Ddraft&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=nuarHzhP1wi1T9iURRCj1A&m=teHrSOWg352cIHpPJ_QkfGT4tGnEsAx8upZBTGYdh94&s=aOoZRXz4F1btSijuLHmlEK-JsH1Sp_YSgBvT6DoaL-E&e=
>>
>> #              hg pull
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bitbucket.org_quark-2Dzju_hg-2Ddraft&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=nuarHzhP1wi1T9iURRCj1A&m=teHrSOWg352cIHpPJ_QkfGT4tGnEsAx8upZBTGYdh94&s=aOoZRXz4F1btSijuLHmlEK-JsH1Sp_YSgBvT6DoaL-E&e=
>> -r 6ae6d1069ba1
>> obsolete: allow cycles
>>
>> Now we can handle cycles nicely, allow them to be created. Some practical
>> examples:
>>
>>   - To revive X, just create a marker X -> X, with a newer date.
>>   - To prune X again, just create a marker X -> (), with a newer date.
>>   - The above two could be repeated.
>>
>>   - To unamend A -> B, just create a marker B -> A, with a newer date.
>>
>> It's now possible for "touch" and "unamend" to reuse hashes (therefore
>> more
>> user-friendly). And it's no longer necessary to write "*_source" in
>> commit
>> metadata to workarounds obs cycles. The hacky inhibit extension also
>> becomes
>> unnecessary.
>>
>> Finally. I have been wanting all these for a long time.
>
> Seems pretty elegant, though I haven't fully understood it yet. Maybe
> you guys talked about this in person, but what effect (if any) does this
> have on exchange?

We did not really discuss this at the sprint :-/

This probably has effect on two aspects of pull and push:

* Computation of the relevant markers for a None

* Computation of "head replacement" when pushing branches obsoleting 
another one.

The proposal have some very interesting aspect, I'll try to do a deep 
review of its impact on the general concept soon™ (probably not this week)

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list