Matthieu Moy <[EMAIL PROTECTED]> writes:

> Stephen Leake <[EMAIL PROTECTED]> writes:
>
>> Similarly, dvc-delta and dvc-diff are very similar;
>
> Yes, they're supposed to do very similar things. The idea is that
> dvc-diff means "diff against the working tree" while dvc-delta means
> "diff two revisions".
>
> Both have to appear in the user interface (diff should not prompt
> anything and show the diff between working tree and the last revision,

I assume you mean "the revision the working tree is based on" (similar
to CVS BASE), not "the last revision in the repository" (CVS HEAD).

>
> while delta should prompt for two revisions).
>
> Ideally, diff should be a very short wrapper around delta (mostly the
> same argument list, with a different "(interactive ...)" statement).

Ok, so dvc-diff should not be dispatching; the dvc front-end should
implement it as this wrapper.

Here's a summary of what the current back-ends do, and what it would
take to make this change:

baz-dvc-diff => baz-changes
baz-dvc-delta => not implemented
    that's easy; just have baz-dvc-delta call baz-changes

bzr-dvc-diff => code
bzr-dvc-delta => different but similar code
    both call bzr-parse-diff to populate the ewoc

    bzr-dvc-diff preserves the window configuration

    not hard to merge

tla-dvc-diff => tla-changes-rec
tla-dvc-diff => tla-delta
    _very_ different code! not possible to merge

xdarcs-dvc-diff => xdarcs-diff
xdarcs-dvc-delta => not implemented
    easy

xgit-dvc-diff => xgit-diff
xgit-dvc-delta => wrapper around xgit-diff
    not hard to invert

xhg-dvc-diff => xgit-diff
xhg-dvc-delta => wrapper around xhg-diff
    trivial to invert 

xmtn-dvc-diff => code
xmtn-dvc-delta => different but similar code
    except xmtn-dvc-delta does not populate the ewoc (it should)
    not hard to merge

One difference; dvc-revlist-diff expects dvc-delta to return the
display buffer.

We need to merge code in the bzr and xmtn back-ends, and decide what
to do about tla. I suggest we just have dvc-delta (and thus dvc-diff)
call tla-delta. People can call tla-diff directly if they need to.

In general, other dvc functions should call dvc-delta, not dvc-diff.

> If anyone has a better proposal to name what we call "delta", that may
> be an improvement (diff-between? diff-revisions? ...)

"delta" is fine with me.

--
-- Stephe



_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to