emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r100533: vc-log-incoming/vc-log-outgo


From: Dan Nicolaescu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100533: vc-log-incoming/vc-log-outgoing fixes for Git.
Date: Sat, 05 Jun 2010 02:56:22 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100533
committer: Dan Nicolaescu <address@hidden>
branch nick: trunk
timestamp: Sat 2010-06-05 02:56:22 -0700
message:
  vc-log-incoming/vc-log-outgoing fixes for Git.
  * lisp/vc-git.el (vc-git-log-view-mode): Fix font lock for
  incoming/outgoing logs.
  (vc-git-log-outgoing, vc-git-log-incoming): Use @{upstream}
  instead of vc-git-compute-remote.
  (vc-git-compute-remote): Remove.
modified:
  etc/NEWS
  lisp/ChangeLog
  lisp/vc-git.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2010-06-03 23:26:39 +0000
+++ b/etc/NEWS  2010-06-05 09:56:22 +0000
@@ -167,6 +167,8 @@
 **** vc-log-incoming for Git runs "git fetch" so that the necessary
 data is available locally.
 
+**** vc-log-incoming and vc-log-outgoing for Git require version 1.7 (or 
newer).
+
 *** New key bindings: C-x v I and C-x v O bound to vc-log-incoming and
 vc-log-outgoing, respectively.
 

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-06-04 18:38:11 +0000
+++ b/lisp/ChangeLog    2010-06-05 09:56:22 +0000
@@ -1,3 +1,12 @@
+2010-06-05  Dan Nicolaescu  <address@hidden>
+
+       vc-log-incoming/vc-log-outgoing fixes for Git.
+       * vc-git.el (vc-git-log-view-mode): Fix font lock for
+       incoming/outgoing logs.
+       (vc-git-log-outgoing, vc-git-log-incoming): Use @{upstream}
+       instead of vc-git-compute-remote.
+       (vc-git-compute-remote): Remove.
+
 2010-06-04  Juri Linkov  <address@hidden>
 
        * simple.el (kill-new): Fix logic of kill-do-not-save-duplicates.

=== modified file 'lisp/vc-git.el'
--- a/lisp/vc-git.el    2010-06-03 23:26:39 +0000
+++ b/lisp/vc-git.el    2010-06-05 09:56:22 +0000
@@ -606,31 +606,15 @@
                (when start-revision (list start-revision))
                '("--")))))))
 
-(defun vc-git-compute-remote ()
-  (let ((str (with-output-to-string
-              (with-current-buffer standard-output
-                (vc-git--out-ok "symbolic-ref" "HEAD"))))
-       branch remote)
-    (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str)
-       (progn
-         (setq branch (match-string 2 str))
-         (setq remote
-               (with-output-to-string
-                 (with-current-buffer standard-output
-                   (vc-git--out-ok "config"
-                                   (concat "branch." branch ".remote")))))
-         (when (string-match "\\([^\n]+\\)" remote)
-           (setq remote (match-string 1 remote)))))))
-
 (defun vc-git-log-outgoing (buffer remote-location)
   (interactive)
   (vc-git-command
    buffer 0 nil
    "log"
    "--no-color" "--graph" "--decorate" "--date=short"
-   "--pretty=tformat:%d%h  %ad  %s" "--abbrev-commit" 
+   "--pretty=tformat:%d%h  %ad  %s" "--abbrev-commit"
    (concat (if (string= remote-location "")
-              (vc-git-compute-remote)
+              "@{upstream}"
             remote-location)
           "..HEAD")))
 
@@ -641,9 +625,9 @@
    buffer 0 nil
    "log" 
    "--no-color" "--graph" "--decorate" "--date=short"
-   "--pretty=tformat:%d%h  %ad  %s" "--abbrev-commit" 
+   "--pretty=tformat:%d%h  %ad  %s" "--abbrev-commit"
    (concat "HEAD.." (if (string= remote-location "")
-                       (vc-git-compute-remote)
+                       "@{upstream}"
                      remote-location))))
 
 (defvar log-view-message-re)
@@ -657,11 +641,11 @@
   (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 (eq vc-log-view-type 'short)
+       (if (not (eq vc-log-view-type 'long))
           "^\\(?:[*/\\| ]+ \\)?\\(?: ([^)]+)\\)?\\([0-9a-z]+\\)  
\\([-a-z0-9]+\\)  \\(.*\\)"
         "^commit *\\([0-9a-z]+\\)"))
   (set (make-local-variable 'log-view-font-lock-keywords)
-       (if (eq vc-log-view-type 'short)
+       (if (not (eq vc-log-view-type 'long))
           '(
             ;; Same as log-view-message-re, except that we don't
             ;; want the shy group for the tag name.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]