[ side note: do we have an easy way to get the corresponding diff for such notification messages? I'm bzr diff-ing manually, but it would be nice to have it automatized, as we used to have for Xtla ].
Let's be constructive, I'll stop arguing against the rational for this patch, but some points need to be fixed: Stephen Leake <[EMAIL PROTECTED]> writes: > Committed revision 258 to http://stephe-leake.org/dvc > === modified file 'lisp/dvc-buffers.el' > --- lisp/dvc-buffers.el 2007-09-20 18:49:38 +0000 > +++ lisp/dvc-buffers.el 2007-09-26 11:21:32 +0000 > @@ -183,6 +183,18 @@ > return-buffer dvc default-directory) > return-buffer))) > > +(defun dvc-type-buffers (type) > + "Return the list of all buffers of type TYPE." > + (let ((result nil) > + (tree dvc-buffers-tree)) > + (while tree > + (let ((entries (cdr (assoc type (car tree))))) > + (while entries > + (setq result (cons (nth 1 (car entries)) result)) > + (setq entries (cdr entries)))) > + (setq tree (cdr tree))) > + result)) > + That's not a really interesting thing to do: what you want here is to find all buffers of type TYPE, for a given back-end, and for a given tree root. That's what dvc-get-buffer is meant for, except that it gets only one buffer (but that's what we want here, since there cannot (shouldn't ?) be multiple log-edit buffers for the same tree): > (defun dvc-get-buffer (dvc type &optional path mode) > "Get a buffer of type TYPE for the path PATH. I played a bit with your patch, and using dvc-type-buffers makes it far too restrictive: having a *bzr-log-edit* buffer lying somewhere about a totally different tree prevented me from using the local *xgit-log-edit*. Furthermore, ... > + (if log-edit-buffers > + (if (= 1 (length log-edit-buffers)) > + ;; There is only one log-edit buffer; use it > + (dvc-log-edit) That can also fail, because log-edit-buffers can contain one buffer, which isn't the one of the local tree. > -Inserts the entry in the arch log file instead of the ChangeLog." > +Inserts the entry in the dvc log-edit buffer instead of the ChangeLog." Nice catch ;-) ! -- Matthieu _______________________________________________ Dvc-dev mailing list [email protected] https://mail.gna.org/listinfo/dvc-dev
