[PATCH 3 of 3 RFC] import: add new --faithful flag to use metadata but relax checks

Augie Fackler raf at durin42.com
Fri Mar 11 14:57:28 EST 2016

On Fri, Mar 11, 2016 at 1:28 PM, Martin von Zweigbergk
<martinvonz at google.com> wrote:
> On Fri, Mar 11, 2016 at 10:25 AM, Augie Fackler <raf at durin42.com> wrote:
>> # HG changeset patch
>> # User Augie Fackler <augie at google.com>
>> # Date 1457539063 18000
>> #      Wed Mar 09 10:57:43 2016 -0500
>> # Node ID 7d53477e4496e8f2b16b12ed445407e79bbb787b
>> # Parent  602504c64084d85820c883a43b02951a61e992f5
>> # EXP-Topic import
>> import: add new --faithful flag to use metadata but relax checks
>> Sometimes it's helpful to import a patch with as much of the metadata
>> (especially parents) intact as possible, but some bit of extra didn't
>> make the trip through the exported patch. This gives users a tool to
>> preserve as much metadata as possible without having to get an exact
>> byte-for-byte match on the import process.
> Yes, please! But it's unclear to me exactly what metadata it allows to
> be lost. I would use it to make sure the parent is correct, so I know
> there patches should apply cleanly. Anything else it will make sure is
> correct?

I believe (but cannot promise) that it will ensure parents are
correct, and will bail as usual if the presented diff fails to apply.
It won't make sure things like branches or extra are correct, and if
the diff got mangled in transit in some way that happens to apply it
also won't catch that.

(--exact ensures that the imported commit is byte-for-byte identical
to the exported one, whereas --faithful is merely best-effort and
won't complain)

More information about the Mercurial-devel mailing list