[PATCH STABLE] import: mark --exact as experimental

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Feb 26 18:31:40 EST 2016



On 02/27/2016 12:23 AM, Augie Fackler wrote:
>
>> On Feb 26, 2016, at 6:18 PM, Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:
>>
>>
>>
>> On 02/26/2016 09:17 PM, Matt Mackall wrote:
>>> On Thu, 2016-02-25 at 11:12 -0500, Augie Fackler wrote:
>>>> On Thu, Feb 25, 2016 at 10:53:26AM +0100, Pierre-Yves David wrote:
>>>>> # HG changeset patch
>>>>> # User Pierre-Yves David <pierre-yves.david at fb.com>
>>>>> # Date 1456060026 -3600
>>>>> #      Sun Feb 21 14:07:06 2016 +0100
>>>>> # Branch stable
>>>>> # Node ID a412b87ce53add0d4304de0170140bff1dc266b3
>>>>> # Parent  cb6a952efbf48d306a7c82d7fe46115f072cbb1d
>>>>> # EXP-Topic expexact
>>>>> # Available At http://hg.netv6.net/marmoute-wip/mercurial/
>>>>> #              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r
>>>>> a412b87ce53a
>>>>> import: mark --exact as experimental
>>>>
>>>> +1, but I'm unsure if it belongs on stable. Matt?
>>>
>>> I don't like this at all, sorry.
>>>
>>> It works as advertised:
>>>
>>>     If --exact is specified, import will set the working directory to the
>>>      parent of each patch before applying it, and will abort if the resulting
>>>      changeset has a different ID than the one recorded in the patch. This may
>>>      happen due to character set problems or other deficiencies in the text
>>>      patch format.
>>>
>>> This feature has never been a promise to perfectly transfer every possible
>>> changeset. We've never been able to do that and it's unlikely that we ever will.
>>> And extra fields aren't even a significant obstacle to that.
>>>
>>> Instead this feature is a promise to perfectly transfer OR REJECT anything that
>>> isn't perfectly transferred. So everything you apparently think is a bug is
>>> actually it doing its data-integrity-protecting job.
>>
>> Okay, that precise feature work as advertised "A perfect importer with integrity check". And integrity check are cool, their are not what I'm calling a bug here. The issue lies in the fact that this perfect importer is pretty much useless to anyone because we don't really have a perfect exported. 'hg export' is the best patch generator around, and it is unable to produce a patch that will pass 'hg import --exact' in most case.
>
> It’s not actually most cases if you don’t use extensions. I’m with mpm on this - we can make more cases work with —exact, but the flag does in fact behave as advertised, so we’re better off fixing the bugs than trying to hide the feature for now.
>
> It sure stinks for rebase users et al, but in general I think bug fixes are the way to go rather than marking the flag as experimental.

The extra issue is known for year and have not been fixed yet. I would 
rather hide the flag until someone actually commit to fix the extra 
issue. All I've seem in the wild about --exact is user frustraction. 
multiple multiple company and community.

Note: Core feature like amend also add extras. And other extensions 
adding extras are thing like 'rebase' which is very widely used.

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list