diff options
| author | Dan Nicolaescu | 2009-07-23 05:21:34 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2009-07-23 05:21:34 +0000 |
| commit | d6a62b0d7a23e494dc8adf06ca34d5b2cfe9c319 (patch) | |
| tree | a757707653b85905802b0e5288d6b26a8af347f2 | |
| parent | 291bc6bdf9d75dc1d90a599d84ed45e842d3f1ea (diff) | |
| download | emacs-d6a62b0d7a23e494dc8adf06ca34d5b2cfe9c319.tar.gz emacs-d6a62b0d7a23e494dc8adf06ca34d5b2cfe9c319.zip | |
(vc-print-log-internal): New function, split out from ...
(vc-print-log): ... here.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/vc.el | 52 |
2 files changed, 33 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b0f249d105f..70b899c2f51 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2009-07-22 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2009-07-22 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 2 | ||
| 3 | * vc.el (vc-print-log-internal): New function, split out from ... | ||
| 4 | (vc-print-log): ... here. | ||
| 5 | |||
| 3 | * vc-git.el (vc-git-add-signoff): New variable. | 6 | * vc-git.el (vc-git-add-signoff): New variable. |
| 4 | (vc-git-checkin): Use it. | 7 | (vc-git-checkin): Use it. |
| 5 | (vc-git-toggle-signoff): New function. | 8 | (vc-git-toggle-signoff): New function. |
diff --git a/lisp/vc.el b/lisp/vc.el index d063c2c8abc..590787e019c 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -1815,6 +1815,35 @@ allowed and simply skipped)." | |||
| 1815 | 1815 | ||
| 1816 | ;; Miscellaneous other entry points | 1816 | ;; Miscellaneous other entry points |
| 1817 | 1817 | ||
| 1818 | (defun vc-print-log-internal (backend files working-revision) | ||
| 1819 | ;; Don't switch to the output buffer before running the command, | ||
| 1820 | ;; so that any buffer-local settings in the vc-controlled | ||
| 1821 | ;; buffer can be accessed by the command. | ||
| 1822 | (vc-call-backend backend 'print-log files "*vc-change-log*") | ||
| 1823 | (pop-to-buffer "*vc-change-log*") | ||
| 1824 | (vc-exec-after | ||
| 1825 | `(let ((inhibit-read-only t)) | ||
| 1826 | (vc-call-backend ',backend 'log-view-mode) | ||
| 1827 | (set (make-local-variable 'log-view-vc-backend) ',backend) | ||
| 1828 | (set (make-local-variable 'log-view-vc-fileset) ',files) | ||
| 1829 | |||
| 1830 | ;; FIXME: this seems to apply only to RCS/CVS, it doesn't quite | ||
| 1831 | ;; belong here in the generic code. | ||
| 1832 | (goto-char (point-max)) | ||
| 1833 | (forward-line -1) | ||
| 1834 | (while (looking-at "=*\n") | ||
| 1835 | (delete-char (- (match-end 0) (match-beginning 0))) | ||
| 1836 | (forward-line -1)) | ||
| 1837 | (goto-char (point-min)) | ||
| 1838 | (when (looking-at "[\b\t\n\v\f\r ]+") | ||
| 1839 | (delete-char (- (match-end 0) (match-beginning 0)))) | ||
| 1840 | |||
| 1841 | (shrink-window-if-larger-than-buffer) | ||
| 1842 | ;; move point to the log entry for the working revision | ||
| 1843 | (vc-call-backend ',backend 'show-log-entry ',working-revision) | ||
| 1844 | (setq vc-sentinel-movepoint (point)) | ||
| 1845 | (set-buffer-modified-p nil)))) | ||
| 1846 | |||
| 1818 | ;;;###autoload | 1847 | ;;;###autoload |
| 1819 | (defun vc-print-log (&optional working-revision) | 1848 | (defun vc-print-log (&optional working-revision) |
| 1820 | "List the change log of the current fileset in a window. | 1849 | "List the change log of the current fileset in a window. |
| @@ -1824,28 +1853,7 @@ If WORKING-REVISION is non-nil, leave the point at that revision." | |||
| 1824 | (backend (car vc-fileset)) | 1853 | (backend (car vc-fileset)) |
| 1825 | (files (cadr vc-fileset)) | 1854 | (files (cadr vc-fileset)) |
| 1826 | (working-revision (or working-revision (vc-working-revision (car files))))) | 1855 | (working-revision (or working-revision (vc-working-revision (car files))))) |
| 1827 | ;; Don't switch to the output buffer before running the command, | 1856 | (vc-print-log-internal backend files working-revision))) |
| 1828 | ;; so that any buffer-local settings in the vc-controlled | ||
| 1829 | ;; buffer can be accessed by the command. | ||
| 1830 | (vc-call-backend backend 'print-log files "*vc-change-log*") | ||
| 1831 | (pop-to-buffer "*vc-change-log*") | ||
| 1832 | (vc-exec-after | ||
| 1833 | `(let ((inhibit-read-only t)) | ||
| 1834 | (vc-call-backend ',backend 'log-view-mode) | ||
| 1835 | (set (make-local-variable 'log-view-vc-backend) ',backend) | ||
| 1836 | (set (make-local-variable 'log-view-vc-fileset) ',files) | ||
| 1837 | (goto-char (point-max)) (forward-line -1) | ||
| 1838 | (while (looking-at "=*\n") | ||
| 1839 | (delete-char (- (match-end 0) (match-beginning 0))) | ||
| 1840 | (forward-line -1)) | ||
| 1841 | (goto-char (point-min)) | ||
| 1842 | (when (looking-at "[\b\t\n\v\f\r ]+") | ||
| 1843 | (delete-char (- (match-end 0) (match-beginning 0)))) | ||
| 1844 | (shrink-window-if-larger-than-buffer) | ||
| 1845 | ;; move point to the log entry for the working revision | ||
| 1846 | (vc-call-backend ',backend 'show-log-entry ',working-revision) | ||
| 1847 | (setq vc-sentinel-movepoint (point)) | ||
| 1848 | (set-buffer-modified-p nil))))) | ||
| 1849 | 1857 | ||
| 1850 | ;;;###autoload | 1858 | ;;;###autoload |
| 1851 | (defun vc-revert () | 1859 | (defun vc-revert () |