Matthieu Moy <[EMAIL PROTECTED]> writes:
> Stephen Leake <[EMAIL PROTECTED]> writes:
>
>> dvc-dvc-files-to-commit, xgit-dvc-log-edit-done,
>> xhg-dvc-log-edit-done, xmtn-dvc-log-edit-done use it to get
>> dvc-current-file-list; it must be the diff or status buffer.
>>
>> That's all the uses of dvc-partner-buffer in DVC, other than simple
>> navigation.
>
> IIRC, we had dvc-partner-buffer for navigation, like
> `dvc-buffer-pop-to-partner-buffer', and anothe mechanism for log-edit
> to know which buffer it was comming from, to get the file list in case
> of a partial commit. Later, we merged both concepts.
Ok.
> For the case of bzr (see above), I believe modifying
> `dvc-current-file-list' to return nil when not in a diff-mode buffer
> would do it.
Then all back-ends would commit all files (or possibly no files),
rather than the correct list of files, if the user had marked some.
That's wrong.
I see three choices here:
0) Change dvc-add-log-entry to abort if there is no existing log-edit
buffer. This is at least correct with the rest of the current code,
if somewhat annoying.
1) Fix dvc-add-log-entry to set dvc-partner-buffer to the correct
status or diff buffer when creating a log-edit buffer
2) Add a new buffer-local variable dvc-files-buffer (the buffer to get
a list of files from)
2a) edit current uses of dvc-partner-buffer in commit functions,
replace with dvc-files-buffer
2b) fix dvc-add-log-entry to set dvc-files-buffer to the
correct status or diff buffer when creating a log-edit buffer
We need to do at least 0.
In the long run, we should do 1 or 2. 1 is clearly less work, but not
by very much.
If we do 2, then sometimes dvc-pop-to-partner-buffer, when invoked
from a log-edit buffer, will pop to the status or diff buffer; other
times it will pop to some source buffer. I think that is wrong.
If we do 1, the behavior of dvc-pop-to-partner-buffer from a log-edit
buffer will be more predictable.
For now, I'll just do 0.
--
-- Stephe
_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev