[Revctrl] Different types of accounting
William Uther
willu.mailingLists at cse.unsw.edu.au
Tue Jan 15 05:10:50 UTC 2008
On 15/01/2008, at 3:59 PM, Stephen J. Turnbull wrote:
>> Actually, I think your example below goes beyond this.
>
> Ah, sorry, that's not Darcs. I don't use Darcs at this point. Darcs
> 1 has a severe combinatorial explosion problem. Darcs 2 (now in beta
> testing) is supposed to (a) be somewhat better and (b) be much better
> for hacking on this kind of issue in the future.
Yeah - Darcs 2 looks much better than Darcs 1 there. I've heard that
DARCS is slowish even when it doesn't hit that exponential case though.
>> That is a great example of identity tracking. You've edited the
>> diff to make the line identities match up as you want them to, and
>> it helps solve the merging problem. It is in some ways simpler
>> than the example I gave, but it has the advantage of being an
>> actual use-case rather than hot air :).
>>
>> Now, others might say that this problem could also be solved with
>> smarter diffing/merging heuristics, and I agree, but this is one
>> way to solve it.
>
> No, you can't solve it with smarter text diff heuristics. In general
> you can't tell whether affix trimming is appropriate without knowing
> where the syntax boundaries are. In this case, you have to know it's
> a changelog.
Well, yeah - if the "smarter heuristics" were able to detect the
changelog format then they could solve the problem. Again, I'm
not trying to say which way is best, or easiest, or whatever; just
list the options (together with their caveats - in this case
heuristics for most common file formats).
>> My understanding is that DARCS tracks content to some extent. It is
>> what makes DARCS work as you want it to in the example above. You
>> could not do the same thing in git or mtn.
>
> As I say, Darcs doesn't get ChangeLogs right either; it's one of the
> reasons I stopped using Darcs. AFAIK Darcs does not track content
> explicitly at all.
Are you saying Darcs doesn't get the changelogs right even if you
edit the patch as you suggested? Or just that Darcs doesn't
offer a reasonable UI to edit the patch that way?
My understanding of Darcs is that the effect of the patch algebra is
to track content. Another way of saying this is that the annotate
command is exact with no heuristics.
> It records intentions (specifically, the usual
> add, remove, and rename, and a generic token-replace patch), and it
> uses knowledge of how such patches work to deduce changes in position
> of given content due to insertion or deletion of lines.
Yes - and the result is that any line can be traced back exactly to
its original patch. Annotate is exact, and that is equivalent to
content tracking.
I'm confused about your example though. Which version control system
produced that example? Or is there not one currently, and you were
hoping out loud?
Cheers,
Will :-}
More information about the Revctrl
mailing list