[PATCH 1 of 2 RFC] extdiff: use archiver to take snapshots of committed revisions
Matt Harbison
mharbison72 at gmail.com
Tue Feb 10 00:34:15 UTC 2015
On Mon, 09 Feb 2015 18:01:12 -0500, Augie Fackler <raf at durin42.com> wrote:
> On Sun, Feb 08, 2015 at 11:01:36PM -0500, Matt Harbison wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison at yahoo.com>
>> # Date 1342054131 14400
>> # Wed Jul 11 20:48:51 2012 -0400
>> # Node ID 6abceaa1a49f82cebd3a4f141f69558e2bb3cec4
>> # Parent ff5caa8dfd993680d9602ca6ebb14da9de10d5f4
>> extdiff: use archiver to take snapshots of committed revisions
>
> This seems like a decent approach.
>
>>
>> [This is the proof of concept that Mathias asked for. The fix for file
>> archiving from the internal API maybe should be a separate commit.]
>
> Yes, I think it should.
>
>>
>> There should be no visible functional differences, other than the
>> largefile
>> standins are no longer included in the non working copy snapshots.
>> That's
>> probably not a big deal, and proper largefile support can still be
>> added.
>>
>
> I don't speak largefiles. Does this mean that the phony files won't be
> included, but the actual largefile content will? For extdiff, that's
> arguably the right behavior?
Yes, that's ultimately where it is going, but this only partially gets
there. The cases where the snapshot is of the working directory are still
handled by the old code, which does stage the phony files. For snapshots
of all other revisions, archive is used, and archive already knows to
DTRT. Adding subrepo support is conceptually separate from adding
largefile support, except that archive supports both, so we get the other
for "free".
It may be worth making that conditional though by patching on a --large
option: files that are hundreds of MB probably aren't very diff-able, but
will slow the time to get the diff program opened. If the phony file
shows up, that's at least a clue to the user that the largefile changed.
>> This
>> is the first step to make -S work. The full (deep) working copy
>> snapshot needs
>> to be handled prior to that. This could probably be improved in the
>> future by
>> excluding .hgsub and .hgsubstate from status, since that is really just
>> private
>> bookkeeping info.
>
> It probably makes sense to keep extdiff and 'hg diff' output at least
> somewhat related?
That's a good point. I was second guessing what I wrote after I sent it
because even though the file isn't very meaningful to the user, it is at
least a clue that the subrepo changed.
--Matt
More information about the Mercurial-devel
mailing list