Mercurial > emacs
comparison lisp/vc-hg.el @ 108058:5e867bd030c8
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Wed, 21 Apr 2010 23:03:28 +0000 |
parents | 17d3324f96dd |
children | 973b5bc5fcfe |
comparison
equal
deleted
inserted
replaced
108057:92bb32f41a3a | 108058:5e867bd030c8 |
---|---|
294 (1 'change-log-email)) | 294 (1 'change-log-email)) |
295 ("^date: \\(.+\\)" (1 'change-log-date)) | 295 ("^date: \\(.+\\)" (1 'change-log-date)) |
296 ("^tag: +\\([^ ]+\\)$" (1 'highlight)) | 296 ("^tag: +\\([^ ]+\\)$" (1 'highlight)) |
297 ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message))))))) | 297 ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message))))))) |
298 | 298 |
299 (declare-function log-edit-mode "log-edit" ()) | 299 (declare-function log-edit-extract-headers "log-edit" (headers string)) |
300 (defvar log-edit-extra-flags) | |
301 (defvar log-edit-before-checkin-process) | |
302 | |
303 (define-derived-mode vc-hg-log-edit-mode log-edit-mode "Hg-log-edit" | |
304 "Mode for editing Hg commit logs. | |
305 If a line like: | |
306 Author: NAME | |
307 is present in the log, it is removed, and | |
308 --author NAME | |
309 is passed to the hg commit command." | |
310 (set (make-local-variable 'log-edit-extra-flags) nil) | |
311 (set (make-local-variable 'log-edit-before-checkin-process) | |
312 '(("^Author:[ \t]+\\(.*\\)[ \t]*$" . (list "--user" (match-string 1)))))) | |
313 | 300 |
314 (defun vc-hg-diff (files &optional oldvers newvers buffer) | 301 (defun vc-hg-diff (files &optional oldvers newvers buffer) |
315 "Get a difference report using hg between two revisions of FILES." | 302 "Get a difference report using hg between two revisions of FILES." |
316 (let* ((firstfile (car files)) | 303 (let* ((firstfile (car files)) |
317 (working (and firstfile (vc-working-revision firstfile)))) | 304 (working (and firstfile (vc-working-revision firstfile)))) |
432 ;; FIXME: This would remove the file. Is that correct? | 419 ;; FIXME: This would remove the file. Is that correct? |
433 ;; (defun vc-hg-unregister (file) | 420 ;; (defun vc-hg-unregister (file) |
434 ;; "Unregister FILE from hg." | 421 ;; "Unregister FILE from hg." |
435 ;; (vc-hg-command nil nil file "remove")) | 422 ;; (vc-hg-command nil nil file "remove")) |
436 | 423 |
437 (defun vc-hg-checkin (files rev comment &optional extra-args) | 424 (declare-function log-edit-extract-headers "log-edit" (headers string)) |
425 | |
426 (defun vc-hg-checkin (files rev comment) | |
438 "Hg-specific version of `vc-backend-checkin'. | 427 "Hg-specific version of `vc-backend-checkin'. |
439 REV is ignored." | 428 REV is ignored." |
440 (apply 'vc-hg-command nil 0 files | 429 (apply 'vc-hg-command nil 0 files |
441 (nconc (list "commit" "-m" comment) extra-args))) | 430 (nconc (list "commit" "-m") |
431 (log-edit-extract-headers '(("Author" . "--user")) | |
432 comment)))) | |
442 | 433 |
443 (defun vc-hg-find-revision (file rev buffer) | 434 (defun vc-hg-find-revision (file rev buffer) |
444 (let ((coding-system-for-read 'binary) | 435 (let ((coding-system-for-read 'binary) |
445 (coding-system-for-write 'binary)) | 436 (coding-system-for-write 'binary)) |
446 (if rev | 437 (if rev |