*** The VC mode-line entry now has a tooltip that explains the VC file status.
+*** In VC Annotate mode, for VC systems that support changesets, you can
+see the diff for the whole changeset (not only for the current file)
+by using the vc-annotate-show-changeset-diff-revision-at-line function.
+
*** In VC Annotate mode, you can type V to toggle the annotation visibility.
*** In VC Annotate mode, you can type f to show the file revision on
2008-06-13 Dan Nicolaescu <dann@ics.uci.edu>
- * vc.el (vc-delete-file): Bound default-directory before calling
+ * vc.el (vc-delete-file): Bind default-directory before calling
the backend.
+ (vc-annotate-show-diff-revision-at-line): Move most of the code to ...
+ (vc-annotate-show-diff-revision-at-line-internal): ... here. New
+ function.
+ (vc-annotate-show-changeset-diff-revision-at-line): New function.
+ (vc-annotate-mode-menu): Bind it.
2008-06-13 Jason Rumney <jasonr@gnu.org>
["Show log of revision at line" vc-annotate-show-log-revision-at-line
:help "Visit the log of the revision at line"]
["Show diff of revision at line" vc-annotate-show-diff-revision-at-line
- :help
- "Visit the diff of the revision at line from its previous revision"]
+ :help "Visit the diff of the revision at line from its previous revision"]
+ ["Show changeset diff of revision at line"
+ vc-annotate-show-changeset-diff-revision-at-line
+ :enable
+ (eq 'repository (vc-call-backend ,vc-annotate-backend 'revision-granularity))
+ :help "Visit the diff of the revision at line from its previous revision"]
["Visit revision at line" vc-annotate-find-revision-at-line
:help "Visit the revision identified in the current line"]))
(message "Cannot extract revision number from the current line")
(vc-print-log rev-at-line)))))
-(defun vc-annotate-show-diff-revision-at-line ()
- "Visit the diff of the revision at line from its previous revision."
- (interactive)
+(defun vc-annotate-show-diff-revision-at-line-internal (fileset)
(if (not (equal major-mode 'vc-annotate-mode))
(message "Cannot be invoked outside of a vc annotate buffer")
(let ((rev-at-line (vc-annotate-extract-revision-at-line))
nil
;; The value passed here should follow what
;; `vc-deduce-fileset' returns.
- (cons vc-annotate-backend
- (cons (list vc-annotate-parent-file) nil))
+ (cons vc-annotate-backend (cons fileset nil))
prev-rev rev-at-line))
(switch-to-buffer "*vc-diff*"))))))
+(defun vc-annotate-show-diff-revision-at-line ()
+ "Visit the diff of the revision at line from its previous revision."
+ (interactive)
+ (vc-annotate-show-diff-revision-at-line-internal (list vc-annotate-parent-file)))
+
+(defun vc-annotate-show-changeset-diff-revision-at-line ()
+ "Visit the diff of the revision at line from its previous revision for all files in the changeset."
+ (interactive)
+ (when (eq 'file (vc-call-backend vc-annotate-backend 'revision-granularity))
+ (error "The %s backend does not support changeset diffs" vc-annotate-backend))
+ (vc-annotate-show-diff-revision-at-line-internal nil))
+
(defun vc-annotate-warp-revision (revspec)
"Annotate the revision described by REVSPEC.