[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ChangeLog and Version Control
From: |
Richard V. Molen |
Subject: |
Re: ChangeLog and Version Control |
Date: |
Thu, 26 Sep 2002 21:34:53 GMT |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Thanks Aman, this was what I was looking for. I hacked up an
alternative that doesn't prompt -- "if it's the ChangeLog, don't add
the comment." (see below). It's the "I'm not an ELisper" version, but
it seems to work. Improvements are welcome.
It would be even nicer if I could keep the ChangeLog from 'popping up'
each time -- summary comments could be added explicitly w/ C-x 4 a.
Thank you Kai for your comments on C-x 4 a -- I'll have to try that
approach. It has more features than I realised.
******************************
;asks whether to automatically insert last Version control log entry into
;ChangeLog & allow ChangeLog editing. Answer 'n' after C-x C-q...C-c C-c
;of ChangeLog to prevent adding its log entry to itself.
(defun vc-checkin-add-log-no-prompt ()
(let ((log (find-change-log)))
(and log
(not (string-match
(format "%s" (file-relative-name log))
(format "%s" (file-relative-name buffer-file-name))))
(vc-comment-to-change-log nil log))))
(add-hook 'vc-checkin-hook 'vc-checkin-add-log-no-prompt)
(setq vc-command-messages t ;display version control backend messages?
vc-initial-comment t ;request initial log entry when adding a file.
)
******************************
--
Richard V. Molen
Warning!!
Signature under construction, safety glasses required.