From fab43c76d009176eff8c12a8cd19a0d1ed87156a Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Tue, 8 Jun 2010 22:24:01 -0700 Subject: [PATCH] Improve support for special markup in the VC commit message. * lisp/vc-mtn.el (vc-mtn-checkin): Add support for Author: and Date: markup. * lisp/vc-hg.el (vc-hg-checkin): Add support for Date:. * lisp/vc-git.el (vc-git-checkin): * lisp/vc-bzr.el (vc-bzr-checkin): Likewise. --- etc/NEWS | 5 +++++ lisp/ChangeLog | 8 ++++++++ lisp/vc-bzr.el | 1 + lisp/vc-git.el | 3 ++- lisp/vc-hg.el | 3 ++- lisp/vc-mtn.el | 6 +++++- 6 files changed, 23 insertions(+), 3 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index f37356dc032..2742c3535f9 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -183,6 +183,11 @@ with headers of the form: Some backends handle some of those headers specially, but any unknown header is just left as is in the message, so it is not lost. +**** vc-git handles Author: and Date: +**** vc-hg handles Author: and Date: +**** vc-bzr handles Author:, Date: and Fixes: +**** vc-mtn handles Author: and Date: + ** Directory local variables can apply to file-less buffers. For example, adding "(diff-mode . ((mode . whitespace)))" to your .dir-locals.el file, will turn on `whitespace-mode' for *vc-diff* buffers. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5dfb02188a6..681db215f37 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2010-06-09 Dan Nicolaescu + + Improve support for special markup in the VC commit message. + * vc-mtn.el (vc-mtn-checkin): Add support for Author: and Date: markup. + * vc-hg.el (vc-hg-checkin): Add support for Date:. + * vc-git.el (vc-git-checkin): + * vc-bzr.el (vc-bzr-checkin): Likewise. + 2010-06-09 Stefan Monnier * emacs-lisp/smie.el (smie-indent-keyword): Remove special case that diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 117712d58fe..39736bb0377 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el @@ -459,6 +459,7 @@ REV non-nil gets an error." (if rev (error "Can't check in a specific revision with bzr")) (apply 'vc-bzr-command "commit" nil 0 files (cons "-m" (log-edit-extract-headers '(("Author" . "--author") + ("Date" . "--commit-time") ("Fixes" . "--fixes")) comment)))) diff --git a/lisp/vc-git.el b/lisp/vc-git.el index 62d1940d349..780afd9db27 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el @@ -554,7 +554,8 @@ or an empty string if none." (let ((coding-system-for-write vc-git-commits-coding-system)) (apply 'vc-git-command nil 0 files (nconc (list "commit" "-m") - (log-edit-extract-headers '(("Author" . "--author")) + (log-edit-extract-headers '(("Author" . "--author") + ("Date" . "--date")) comment) (list "--only" "--"))))) diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 0d72bfa58f8..4b434b582fa 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -429,7 +429,8 @@ COMMENT is ignored." REV is ignored." (apply 'vc-hg-command nil 0 files (nconc (list "commit" "-m") - (log-edit-extract-headers '(("Author" . "--user")) + (log-edit-extract-headers '(("Author" . "--user") + ("Date" . "--date")) comment)))) (defun vc-hg-find-revision (file rev buffer) diff --git a/lisp/vc-mtn.el b/lisp/vc-mtn.el index d62fd1ea8c6..500c00cefe4 100644 --- a/lisp/vc-mtn.el +++ b/lisp/vc-mtn.el @@ -173,7 +173,11 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (defun vc-mtn-could-register (file) (vc-mtn-root file)) (defun vc-mtn-checkin (files rev comment &optional extra-args-ignored) - (vc-mtn-command nil 0 files "commit" "-m" comment)) + (apply 'vc-mtn-command nil 0 files + (nconc (list "commit" "-m") + (log-edit-extract-headers '(("Author" . "--author") + ("Date" . "--date")) + comment)))) (defun vc-mtn-find-revision (file rev buffer) (vc-mtn-command buffer 0 file "cat" "-r" rev)) -- 2.39.2