aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2010-06-03 16:26:39 -0700
committerDan Nicolaescu2010-06-03 16:26:39 -0700
commit6941ffecb2ae33279b7d111d0073f7412a559e5d (patch)
tree05f9aeea468a40c7f66c2699e53e640fa326c34f
parent54d3626e26da1d3d094e6182c308bb2ca968d691 (diff)
downloademacs-6941ffecb2ae33279b7d111d0073f7412a559e5d.tar.gz
emacs-6941ffecb2ae33279b7d111d0073f7412a559e5d.zip
vc-log-incoming/vc-log-outgoing improvements for Git.
* lisp/vc-git.el (vc-git-log-outgoing): Use the same format as the short log. (vc-git-log-incoming): Likewise. Run "git fetch" before the log command.
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc-git.el22
3 files changed, 22 insertions, 8 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 58546d31bb6..683b6597f83 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -164,6 +164,9 @@ read a file name from the minibuffer instead of using buffer-file-name.
164 164
165*** New VC commands: vc-log-incoming, vc-log-outgoing, vc-find-conflicted-file. 165*** New VC commands: vc-log-incoming, vc-log-outgoing, vc-find-conflicted-file.
166 166
167**** vc-log-incoming for Git runs "git fetch" so that the necessary
168data is available locally.
169
167*** New key bindings: C-x v I and C-x v O bound to vc-log-incoming and 170*** New key bindings: C-x v I and C-x v O bound to vc-log-incoming and
168vc-log-outgoing, respectively. 171vc-log-outgoing, respectively.
169 172
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e037c2579b8..8af8ba4d076 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
12010-06-03 Dan Nicolaescu <dann@ics.uci.edu> 12010-06-03 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 vc-log-incoming/vc-log-outgoing improvements for Git.
4 * vc-git.el (vc-git-log-outgoing): Use the same format as the
5 short log.
6 (vc-git-log-incoming): Likewise. Run "git fetch" before the log command.
7
3 Add bindings for vc-log-incoming and vc-log-outgoing. 8 Add bindings for vc-log-incoming and vc-log-outgoing.
4 * vc-hooks.el (vc-prefix-map): Add bindings for vc-log-incoming 9 * vc-hooks.el (vc-prefix-map): Add bindings for vc-log-incoming
5 and vc-log-outgoing. 10 and vc-log-outgoing.
diff --git a/lisp/vc-git.el b/lisp/vc-git.el
index 4f67e1b0679..145c44d9b42 100644
--- a/lisp/vc-git.el
+++ b/lisp/vc-git.el
@@ -622,23 +622,29 @@ for the --graph option."
622 (when (string-match "\\([^\n]+\\)" remote) 622 (when (string-match "\\([^\n]+\\)" remote)
623 (setq remote (match-string 1 remote))))))) 623 (setq remote (match-string 1 remote)))))))
624 624
625
626(defun vc-git-log-outgoing (buffer remote-location) 625(defun vc-git-log-outgoing (buffer remote-location)
627 (interactive) 626 (interactive)
628 (vc-git-command 627 (vc-git-command
629 buffer 0 nil 628 buffer 0 nil
630 "log" (if (string= remote-location "") 629 "log"
631 (concat (vc-git-compute-remote) "..HEAD") 630 "--no-color" "--graph" "--decorate" "--date=short"
632 remote-location))) 631 "--pretty=tformat:%d%h %ad %s" "--abbrev-commit"
633 632 (concat (if (string= remote-location "")
633 (vc-git-compute-remote)
634 remote-location)
635 "..HEAD")))
634 636
635(defun vc-git-log-incoming (buffer remote-location) 637(defun vc-git-log-incoming (buffer remote-location)
636 (interactive) 638 (interactive)
639 (vc-git-command nil 0 nil "fetch")
637 (vc-git-command 640 (vc-git-command
638 buffer 0 nil 641 buffer 0 nil
639 "log" (if (string= remote-location "") 642 "log"
640 (concat "HEAD.." (vc-git-compute-remote)) 643 "--no-color" "--graph" "--decorate" "--date=short"
641 remote-location))) 644 "--pretty=tformat:%d%h %ad %s" "--abbrev-commit"
645 (concat "HEAD.." (if (string= remote-location "")
646 (vc-git-compute-remote)
647 remote-location))))
642 648
643(defvar log-view-message-re) 649(defvar log-view-message-re)
644(defvar log-view-file-re) 650(defvar log-view-file-re)