Stephen Leake <[EMAIL PROTECTED]> writes:

> Part of my point is to move code out of the back-end into the
> front-end, where it is shared. Looking thru the back-ends for
> dvc-diff, and dvc-status, there is quite a bit of UI stuff that is
> common, and could easily be shared.

Yes, it could be factored better. Note that there's indeed another
task probably more urgent, which is to remove any dependancy from DVC
to the tla back-end (they're here only for historical reasons).

>> I'm still not sure you'll really get any difference between the two
>> modes if you still allow commiting from the diff buffer (which I want
>> to have). For example, which mode would you use for "git status -v"?
>
> The example you give has a summary at the top, and a standard gnu diff
> below. So I don't see how this is different from what bzr does.

It's not "git diff", but really "git status -v". So, it's primarily a
"status" command (showing unknown files, for example), but it also has
a diff.

So, if you chose to treat unknown files in status-mode only, you can't
run "git status -v" in diff-mode, or you loose features. Indeed, if
you have any feature available in status-mode and not in diff-mode,
then you lose this feature if you run "git status -v" in diff-mode.

It _is_ different from brz, and if you want bzr's back-end in DVC to
do that, you'd need to do "bzr status; bzr diff", roughly.

Now, I'm asking the question again: which mode will you use for "git
status -v"?

> I don't have git installed at the moment (I could easily add it; there
> is a Cygwin package), and the online manual
> http://www.kernel.org/pub/software/scm/git/docs/git-status.html
> doesn't describe the output. So I can't speculate further.
>
> However, I think you've asked the question backwards; it should not be
> "what should DVC do with this backend feature", but "How do we get
> this backend to do what DVC wants". My goal (as I've said before :) is
> to have DVC provide a common UI to several back-ends.

This is where I disagree. DVC shouldn't hide anything from the
back-ends.

We've already discussed that here, BTW:

  http://article.gmane.org/gmane.emacs.dvc.devel/717/

> On the gripping hand, if there is a good idea in there, we should
> consider using it in DVC, and getting the other backends to do it as
> well.

Take git.

git has something that no one else has: In addition to the repository
and the content of file on disk, you have something called the index,
or "staging area", which contains the to-be-committed content.

So, for example:

$ echo one > foo
$ git add foo
$ echo two > foo
$ git commit -m foo

will still commit "one" as the content of "foo", because it's the
content you added to the index.

In DVC, you have two options to manage that correctly:

* You can hide the index from the user. Then, the user will lose
  several interesting git features.

* You can show the index to the user. Then, you have no way to unify
  this concept with any other back-end.

>> By trying to make a strong separation between diff and status, you'll
>> end up adding limitations because some commands will need different
>> features that are not in the intersection.
>
> I can't parse that. It is precisely _because_ there are commands that
> are not in the intersection that we need different modes for diff and
> status.

      +----diff-----+
      |             |
  +---+-status-+    |
  |   |        | B  |
  | A |        |    |
  |   |        |    |
  +---+--------+    |
      +-------------+

What I mean is that whatever choice you make about what belongs to
diff, what belongs to status, you'll get a feature in the back-end
that needs (A and B on the diagram) two things which are in diff and
status, but that are not in the intersection. Then, chosing between
status-mode and diff-mode will mean losing features for both choices.

> I guess I'm not sure what you mean by "strong" here.

I mean, the opposite of the current distinction, which is just in the
name of buffer.

> One of my primary goals is to make switching to DVC/monotone from
> pcvs/cvs as easy as possible, so I don't have to spend a lot of time
> hand-holding when I tell my team at work to switch.

Yes, but if you hide all of monotone behind a thick Emacs layer,
you're trapped the day they have to use the command-line.

-- 
Matthieu

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

Reply via email to