Mercurial > emacs
comparison lisp/vc-svn.el @ 106472:6e0f1038bc44
Support showing a single log entry from vc-annotate.
* vc.el (print-log): Add a new argument: START-REVISION.
(vc-print-log-internal): Add a new optional argument and
pass it to the backend.
(vc-print-log, vc-print-root-log): Adjust callers.
* vc-annotate.el (vc-annotate-show-log-revision-at-line): If a
buffer already displays the requested log entry, use it.
Otherwise display only the log entry in question.
* vc-svn.el (vc-svn-print-log):
* vc-mtn.el (log-view-file-re):
* vc-hg.el (vc-hg-state):
* vc-git.el (vc-git-print-log): Add support for new argument START-REVISION.
(vc-git-show-log-entry): Return t on success.
* vc-bzr.el (vc-bzr-print-log): Add support new argument START-REVISION.
(vc-bzr-show-log-entry): Return t on success.
* vc-rcs.el (vc-rcs-print-log):
* vc-sccs.el (vc-sccs-print-log):
* vc-cvs.el (vc-cvs-print-log): Add new argument, ignore it.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Mon, 07 Dec 2009 09:02:11 +0000 |
parents | 2df31b09d293 |
children | 3ecd902dead9 |
comparison
equal
deleted
inserted
replaced
106471:9fe246ccb486 | 106472:6e0f1038bc44 |
---|---|
460 | 460 |
461 (define-derived-mode vc-svn-log-view-mode log-view-mode "SVN-Log-View" | 461 (define-derived-mode vc-svn-log-view-mode log-view-mode "SVN-Log-View" |
462 (require 'add-log) | 462 (require 'add-log) |
463 (set (make-local-variable 'log-view-per-file-logs) nil)) | 463 (set (make-local-variable 'log-view-per-file-logs) nil)) |
464 | 464 |
465 (defun vc-svn-print-log (files buffer &optional shortlog limit) | 465 (defun vc-svn-print-log (files buffer &optional shortlog start-revision limit) |
466 "Get change log(s) associated with FILES." | 466 "Get change log(s) associated with FILES." |
467 (save-current-buffer | 467 (save-current-buffer |
468 (vc-setup-buffer buffer) | 468 (vc-setup-buffer buffer) |
469 (let ((inhibit-read-only t)) | 469 (let ((inhibit-read-only t)) |
470 (goto-char (point-min)) | 470 (goto-char (point-min)) |
476 buffer | 476 buffer |
477 'async | 477 'async |
478 ;; (if (and (= (length files) 1) (vc-stay-local-p file 'SVN)) 'async 0) | 478 ;; (if (and (= (length files) 1) (vc-stay-local-p file 'SVN)) 'async 0) |
479 (list file) | 479 (list file) |
480 "log" | 480 "log" |
481 ;; By default Subversion only shows the log up to the | 481 (append |
482 ;; working revision, whereas we also want the log of the | 482 (list |
483 ;; subsequent commits. At least that's what the | 483 (if start-revision |
484 ;; vc-cvs.el code does. | 484 (format "-r%s" start-revision) |
485 "-rHEAD:0" | 485 ;; By default Subversion only shows the log up to the |
486 (when limit (list "-l" (format "%s" limit))))) | 486 ;; working revision, whereas we also want the log of the |
487 ;; subsequent commits. At least that's what the | |
488 ;; vc-cvs.el code does. | |
489 "-rHEAD:0")) | |
490 (when limit (list "-l" (format "%s" limit)))))) | |
487 ;; Dump log for the entire directory. | 491 ;; Dump log for the entire directory. |
488 (apply 'vc-svn-command buffer 0 nil "log" "-rHEAD:0" | 492 (apply 'vc-svn-command buffer 0 nil "log" |
489 (when limit (list "-l" (format "%s" limit)))))))) | 493 (append |
494 (list | |
495 (if start-revision (format "-r%s" start-revision) "-rHEAD:0")) | |
496 (when limit (list "-l" (format "%s" limit))))))))) | |
490 | 497 |
491 (defun vc-svn-diff (files &optional oldvers newvers buffer) | 498 (defun vc-svn-diff (files &optional oldvers newvers buffer) |
492 "Get a difference report using SVN between two revisions of fileset FILES." | 499 "Get a difference report using SVN between two revisions of fileset FILES." |
493 (and oldvers | 500 (and oldvers |
494 (not newvers) | 501 (not newvers) |