diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2010-04-06 22:56:35 -0700 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2010-04-06 22:56:35 -0700 |
commit | 31527c568290029985483745056c92e443451365 (patch) | |
tree | 1a69cd39785f3451eef05b0d6bafa7e24fe9bee2 /lisp/vc-git.el | |
parent | 7ec69e2b1ababe37e14a3fd941133c0f05818f38 (diff) | |
download | emacs-31527c568290029985483745056c92e443451365.tar.gz |
Add new VC methods: vc-log-incoming and vc-log-outgoing.
* vc.el (vc-print-log-setup-buttons): New function split out from
vc-print-log-internal.
(vc-log-internal-common): New function, a parametrized version of
vc-print-log-internal.
(vc-print-log-internal): Just call vc-log-internal-common with the
right arguments.
(vc-incoming-outgoing-internal):
(vc-log-incoming, vc-log-outgoing): New functions.
(vc-log-view-type): New permanent local variable.
* vc-hooks.el (vc-menu-map): Bind vc-log-incoming and vc-log-outgoing.
* vc-bzr.el (vc-bzr-log-view-mode): Use vc-log-view-type instead
of the dynamic bound vc-short-log.
(vc-bzr-log-incoming, vc-bzr-log-outgoing): New functions.
* vc-git.el (vc-git-log-outgoing): New function.
(vc-git-log-view-mode): Use vc-log-view-type instead
of the dynamic bound vc-short-log.
* vc-hg.el (vc-hg-log-view-mode): Use vc-log-view-type instead
of the dynamic bound vc-short-log. Highlight the tag.
(vc-hg-log-incoming, vc-hg-log-outgoing): New functions.
(vc-hg-outgoing, vc-hg-incoming, vc-hg-outgoing-mode):
(vc-hg-incoming-mode): Remove.
(vc-hg-extra-menu-map): Do not bind vc-hg-incoming and vc-hg-outgoing.
Diffstat (limited to 'lisp/vc-git.el')
-rw-r--r-- | lisp/vc-git.el | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/vc-git.el b/lisp/vc-git.el index 93f9d8c6797..9283e5dcfcf 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el @@ -592,25 +592,32 @@ or an empty string if none." (when start-revision (list start-revision)) '("--"))))))) +(defun vc-git-log-outgoing (buffer remote-location) + (interactive) + (vc-git-command + buffer 0 nil + "log" (if (string= remote-location "") + ;; FIXME: this hardcodes the location, it should compute + ;; it properly. + "origin/master..HEAD" + remote-location))) + (defvar log-view-message-re) (defvar log-view-file-re) (defvar log-view-font-lock-keywords) (defvar log-view-per-file-logs) -;; Dynamically bound. -(defvar vc-short-log) - (define-derived-mode vc-git-log-view-mode log-view-mode "Git-Log-View" (require 'add-log) ;; We need the faces add-log. ;; Don't have file markers, so use impossible regexp. (set (make-local-variable 'log-view-file-re) "\\`a\\`") (set (make-local-variable 'log-view-per-file-logs) nil) (set (make-local-variable 'log-view-message-re) - (if vc-short-log + (if (eq vc-log-view-type 'short) "^\\(?:[*/\\| ]+ \\)?\\(?: ([^)]+)\\)?\\([0-9a-z]+\\) \\([-a-z0-9]+\\) \\(.*\\)" "^commit *\\([0-9a-z]+\\)")) (set (make-local-variable 'log-view-font-lock-keywords) - (if vc-short-log + (if (eq vc-log-view-type 'short) '( ;; Same as log-view-message-re, except that we don't ;; want the shy group for the tag name. |