[PATCH 3 of 3] strip: include phases in bundle (BC)

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Jun 19 10:32:42 EDT 2017



On 06/18/2017 07:30 AM, Martin von Zweigbergk wrote:
> On Sat, Jun 17, 2017 at 4:47 PM, Pierre-Yves David
> <pierre-yves.david at ens-lyon.org> wrote:
>>
>>
>> On 06/17/2017 07:19 AM, Martin von Zweigbergk via Mercurial-devel wrote:
>>>
>>> # HG changeset patch
>>> # User Martin von Zweigbergk <martinvonz at google.com>
>>> # Date 1497510952 25200
>>> #      Thu Jun 15 00:15:52 2017 -0700
>>> # Node ID 0fd7e50e58c3ef2adacb67b61478badde282a2df
>>> # Parent  792544200a5a7e21bcc8646604d85b62db277d79
>>> strip: include phases in bundle (BC)
>>>
>>> Before this patch, unbundling a stripped changeset would make it a
>>> draft (unless the parent was secret). This meant that one would lose
>>> phase information when stripping and unbundling secret changesets. The
>>> same thing was true for public changesets. While stripping public
>>> changesets is rare, it's done frequently by e.g. the narrowhg extension.
>>>
>>> Like with obsmarkers, we don't include the phases in the temporary
>>> bundle. We could include phases in the temporary bundle too, but for
>>> that to work, we would need to call phasecache.filterunknown() after
>>> stripping. Without that, unbundling the temporary bundle would cause a
>>> read of the phase cache, which would fail because it has stripped
>>> changesets in the cache. Calling the method filters those out, and
>>> then the phases get added back when unbundling. But as previously
>>> stated, I decided not to include the phases in the temporary bundle
>>> since it doesn't seem to add any value.
>>
>>
>> There are a significant difference with the obsmarkers case:
>>
>> In the obsolescence case the markers relevant to nodes in the temporary
>> bundle are not stripped. So no information is lost. If the strip fails and
>> the user need to use the temporary bundle to recover lost changesets no
>> obsmarkers has been lost. However in such case, the phase information would
>> be lost.
>>
>> So, it would make sense to include the phases in the temporary bundle. What
>> do you think?
>
> I'm fine with bundling phases too. I did it that way at first but
> thought people would find it too wasteful since it's very rare that
> the temporary bundle will be used afterwards. I'll change back to the
> old version that does include phases in the temporary bundle in v2.

I think I am missing something, What kind of "wasteful" are we talking 
about here?

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list