>>>>> "Christian" == Christian Ohler <[EMAIL PROTECTED]> writes:

<snip/>


    Christian> Let's look at another alternative.  We can define three 
different modes:

    Christian> * `dvc-diff-mode' for historic diffs.  Shows the diff summary, 
but does 
    Christian> not allow file selection or workspace operations.  A read-only 
view, 
    Christian> because a read-write view doesn't make sense when looking at 
history.

    Christian> * `dvc-status-mode' for status buffers.  Shows the status and 
allows 
    Christian> workspace operations.  Keybindings that make sense only for diff 
buffers 
    Christian> are not available here.

    Christian> * `dvc-review-changes-mode' (or `dvc-status-with-diff-mode' or 
    Christian> something) for the interface that you seem to prefer for 
commits: diff 
    Christian> summary (or status?) at the top, diff at the bottom.  This mode 
allows 
    Christian> workspace operations.  The difference between this and 
`dvc-diff-mode' 
    Christian> is that it's impossible to invoke this mode on historic diffs; 
this mode 
    Christian> always shows the current diff and the status of the workspace.  
Thus, it 
    Christian> is possible to meaningfully select files to 
revert/commit/rename/etc.

    Christian> With this design, the set of operations available in each mode 
is 
    Christian> well-defined, and it supports your desired workflow.

    Christian> (In effect, the distinction between `dvc-diff-mode' and 
    Christian> `dvc-review-changes-mode' would be similar to the buffer-local 
    Christian> "workspace operations allowed" variable you suggested.  Creating 
    Christian> separate modes obviates the need for setting and checking such a 
    Christian> variable, though, and simplifies the code by providing a clearer 
    Christian> separation between different modes with different purposes: One 
is a 
    Christian> history view, the other is a commit interface.)

Nicely summarized. I like it very much.

A couple of points though:

- dvc-diff-mode:

  I often use diff-mode as a way to save a set of changes before
  reverting them from a branch or to apply them to a different
  branch or just saving the buffer content in a file for future
  references (think try/error workflow), will that still be
  possible with dvc-diff-mode ? i.e. will I still be able to M-x
  cd path-to-another-branch, C-c C-a any interesting hunks ?
  That's my poor-old-cherry-pick mode :)

- dvc-review-changes-mode:

  My main workflow would now be in that mode whereas previously I
  add to switch to dvc-status-mode to add new files and come back
  to dvc-diff-mode and refresh to get their content. To address
  that, dvc-review-changes-mode will have to propose a way to add
  unknown files and refresh the diff part accordingly.

If you address these points, I will be a really happy camper :-)

   Vincent

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

Reply via email to