[darcs-devel] Again: conversion to darcs-3

Ben Franksen ben.franksen at online.de
Sat Feb 20 18:51:53 UTC 2021


Am 20.02.21 um 17:35 schrieb Ian Lynagh:
> On Sat, Feb 20, 2021 at 02:24:07PM +0100, Ben Franksen wrote:
>>
>>> One thing that's probably worth doing is keeping a copy of the V2 patch
>>> as a string in the V3 patch, so that if you "darcs show" it in the
>>> future, then you don't sit there wondering why the V3 body doesn't
>>> resemble the commit message.
>>
>> We assign new identities anyway when doing the actual conversion, so we
>> can as well add some text to the log. Adding the full V2 patch content
>> is a bit drastic though, this could be a huge amount of text, even if
>> the effect is nil. Adding some sort of summary seems more appropriate,
>> and even that I'd say only if the conversion made non-trivial changes to
>> the patch e.g. something like "[conversion from darcs-2 flattened 2
>> duplicates and 3 conflictors]". If you *really* want to know what the
>> old patch looked like, well, we do have the conversion log; which means
>> we could extend 'darcs log' with an option to look up and display the
>> old patch in its full glory (though that patch might of course be in a
>> different context).
> 
> I didn't mean that the text should become part of the patch long
> description; I meant that it should be in a new String field that is
> purely used for this purpose (well, I suppose it could be a more general
> purpose "notes" field or something).
> 
> But yes, "darcs show" might want to just warn you if this new field is
> non-empty, rather than showing it all by default.
> 
> I understood the conversion log to only exist in the "main" repo, but I
> think this data ought to be preserved in all clones.

The idea was that every converted repo stores a copy of the conversion
log, locally updated to include any newly converted patches, so that it
can in turn serve as reference e.g. for other local branches. This
allows more sharing and removes unnecessary latencies due to access via
network.

The main question is whether we want to preserve the information from
the old patches indefinitely e.g. when cloning a converted repo.

Is manual inspection of a V1 or V2 conflictor useful enough to warrant a
permanent increase in the effective patch size for all converted
patches? I find it pretty hard to parse conflictors, though it is true
that sometimes I have used a pager to search for certain keywords in
them. But that was mostly limited to situations where I was in the
middle of a complicated rebase and not when looking at ancient history.

At least I would want to have a way to /eventually/ get rid of that
baggage, e.g. with an option to clone a repo such that it forgets about
it all. This is only possible if we keep it separate from the actual
patches though.

Cheers
Ben



More information about the darcs-devel mailing list