The primary purpose of status buffers is to provide a view on the current workspace and present the set of files that are currently relevant from the perspective of the revision control system (files that have changed in the workspace relative to its base revision, files that have disappeared, files that are unknown etc.), and to allow operations on these files. It needs commands to examine the workspace and history, like diff and log, and commands to perform workspace operations like commit, revert, add, ignore, rename, delete etc., and perhaps also pull, push, merge, update, show missing revisions etc.
The primary purpose of diff buffers is to present diffs and allow navigating them. These can be diffs between arbitrary revisions, not necessarily related to the current workspace. It needs commands like diff-goto-source, various navigation commands, and commands to change the presentation (e.g. diff-restrict-view and switch to ediff). So, what do diff and status buffers have in common? Just the list of changed files? In the diff buffer, this list is useful as an overview and for navigation, but being able to mark files and commit/revert them only makes sense in one special case, namely when looking at a diff between the workspace and its base revision, and is confusing and dangerous when looking at a diff between two historic revisions: The changes displayed in the diff buffer are entirely unrelated to the changes about to be committed/reverted. This is where our current union of diff and status modes breaks down. It may be convenient to be able to commit right from the diff buffer, but it makes no sense in general. In general, diff mode has to be a read-only view. After disallowing workspace operations from the diff buffer, the sets of commands for diff buffers and status buffers become essentially disjoint. Matthieu Moy, 2007-07-05: > Implementing a new diff-mode, and removing the summary part from the > diff-mode would be a real loss of functionality IMHO. The summary is > really the part you want to start with as soon as the diff is more > than a screen long, and you have the key 'j' to switch from the > summary to the diff, and vice-versa. The summary is not a problem. The problem is the set of commands available from the buffer. > And yes, this mode is usually my primary user-interface (together with > the revision-list mode). It should be possible to define commands that allow diff mode and status mode to work closely together so that a frame that shows a status buffer at the top and a diff buffer at the bottom allows you to get your job done in much the same way you currently do. We could start by defining the key 'J' to jump from the status buffer to the diff of the corresponding file in the diff buffer, and from a hunk in the diff buffer to the corresponding entry in the status buffer. What other features of the combined diff/status mode do you use? Christian. _______________________________________________ Dvc-dev mailing list [email protected] https://mail.gna.org/listinfo/dvc-dev
