diff options
| author | Dan Nicolaescu | 2010-06-08 22:24:01 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-06-08 22:24:01 -0700 |
| commit | fab43c76d009176eff8c12a8cd19a0d1ed87156a (patch) | |
| tree | 8a61f28b3dc491653939c38594a277cbc4bcb4f3 | |
| parent | e7d67e73b2bd68701d2972dd1ba181a78a974e8f (diff) | |
| download | emacs-fab43c76d009176eff8c12a8cd19a0d1ed87156a.tar.gz emacs-fab43c76d009176eff8c12a8cd19a0d1ed87156a.zip | |
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.
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/vc-bzr.el | 1 | ||||
| -rw-r--r-- | lisp/vc-git.el | 3 | ||||
| -rw-r--r-- | lisp/vc-hg.el | 3 | ||||
| -rw-r--r-- | lisp/vc-mtn.el | 6 |
6 files changed, 23 insertions, 3 deletions
| @@ -183,6 +183,11 @@ with headers of the form: | |||
| 183 | Some backends handle some of those headers specially, but any unknown header | 183 | Some backends handle some of those headers specially, but any unknown header |
| 184 | is just left as is in the message, so it is not lost. | 184 | is just left as is in the message, so it is not lost. |
| 185 | 185 | ||
| 186 | **** vc-git handles Author: and Date: | ||
| 187 | **** vc-hg handles Author: and Date: | ||
| 188 | **** vc-bzr handles Author:, Date: and Fixes: | ||
| 189 | **** vc-mtn handles Author: and Date: | ||
| 190 | |||
| 186 | ** Directory local variables can apply to file-less buffers. | 191 | ** Directory local variables can apply to file-less buffers. |
| 187 | For example, adding "(diff-mode . ((mode . whitespace)))" to your | 192 | For example, adding "(diff-mode . ((mode . whitespace)))" to your |
| 188 | .dir-locals.el file, will turn on `whitespace-mode' for *vc-diff* buffers. | 193 | .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 @@ | |||
| 1 | 2010-06-09 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | Improve support for special markup in the VC commit message. | ||
| 4 | * vc-mtn.el (vc-mtn-checkin): Add support for Author: and Date: markup. | ||
| 5 | * vc-hg.el (vc-hg-checkin): Add support for Date:. | ||
| 6 | * vc-git.el (vc-git-checkin): | ||
| 7 | * vc-bzr.el (vc-bzr-checkin): Likewise. | ||
| 8 | |||
| 1 | 2010-06-09 Stefan Monnier <monnier@iro.umontreal.ca> | 9 | 2010-06-09 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 10 | ||
| 3 | * emacs-lisp/smie.el (smie-indent-keyword): Remove special case that | 11 | * 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." | |||
| 459 | (if rev (error "Can't check in a specific revision with bzr")) | 459 | (if rev (error "Can't check in a specific revision with bzr")) |
| 460 | (apply 'vc-bzr-command "commit" nil 0 | 460 | (apply 'vc-bzr-command "commit" nil 0 |
| 461 | files (cons "-m" (log-edit-extract-headers '(("Author" . "--author") | 461 | files (cons "-m" (log-edit-extract-headers '(("Author" . "--author") |
| 462 | ("Date" . "--commit-time") | ||
| 462 | ("Fixes" . "--fixes")) | 463 | ("Fixes" . "--fixes")) |
| 463 | comment)))) | 464 | comment)))) |
| 464 | 465 | ||
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." | |||
| 554 | (let ((coding-system-for-write vc-git-commits-coding-system)) | 554 | (let ((coding-system-for-write vc-git-commits-coding-system)) |
| 555 | (apply 'vc-git-command nil 0 files | 555 | (apply 'vc-git-command nil 0 files |
| 556 | (nconc (list "commit" "-m") | 556 | (nconc (list "commit" "-m") |
| 557 | (log-edit-extract-headers '(("Author" . "--author")) | 557 | (log-edit-extract-headers '(("Author" . "--author") |
| 558 | ("Date" . "--date")) | ||
| 558 | comment) | 559 | comment) |
| 559 | (list "--only" "--"))))) | 560 | (list "--only" "--"))))) |
| 560 | 561 | ||
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." | |||
| 429 | REV is ignored." | 429 | REV is ignored." |
| 430 | (apply 'vc-hg-command nil 0 files | 430 | (apply 'vc-hg-command nil 0 files |
| 431 | (nconc (list "commit" "-m") | 431 | (nconc (list "commit" "-m") |
| 432 | (log-edit-extract-headers '(("Author" . "--user")) | 432 | (log-edit-extract-headers '(("Author" . "--user") |
| 433 | ("Date" . "--date")) | ||
| 433 | comment)))) | 434 | comment)))) |
| 434 | 435 | ||
| 435 | (defun vc-hg-find-revision (file rev buffer) | 436 | (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." | |||
| 173 | (defun vc-mtn-could-register (file) (vc-mtn-root file)) | 173 | (defun vc-mtn-could-register (file) (vc-mtn-root file)) |
| 174 | 174 | ||
| 175 | (defun vc-mtn-checkin (files rev comment &optional extra-args-ignored) | 175 | (defun vc-mtn-checkin (files rev comment &optional extra-args-ignored) |
| 176 | (vc-mtn-command nil 0 files "commit" "-m" comment)) | 176 | (apply 'vc-mtn-command nil 0 files |
| 177 | (nconc (list "commit" "-m") | ||
| 178 | (log-edit-extract-headers '(("Author" . "--author") | ||
| 179 | ("Date" . "--date")) | ||
| 180 | comment)))) | ||
| 177 | 181 | ||
| 178 | (defun vc-mtn-find-revision (file rev buffer) | 182 | (defun vc-mtn-find-revision (file rev buffer) |
| 179 | (vc-mtn-command buffer 0 file "cat" "-r" rev)) | 183 | (vc-mtn-command buffer 0 file "cat" "-r" rev)) |