emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp ChangeLog vc-git.el


From: Dan Nicolaescu
Subject: [Emacs-diffs] emacs/lisp ChangeLog vc-git.el
Date: Sun, 06 Dec 2009 22:18:07 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Dan Nicolaescu <dann>   09/12/06 22:18:06

Modified files:
        lisp           : ChangeLog vc-git.el 

Log message:
        * vc-git.el (vc-git-print-log): Handle a limit argument.  Display
        the short log in graph form and with labels.
        (vc-git-log-view-mode): Handle labels.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16847&r2=1.16848
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/vc-git.el?cvsroot=emacs&r1=1.103&r2=1.104

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16847
retrieving revision 1.16848
diff -u -b -r1.16847 -r1.16848
--- ChangeLog   6 Dec 2009 21:25:55 -0000       1.16847
+++ ChangeLog   6 Dec 2009 22:18:03 -0000       1.16848
@@ -1,5 +1,9 @@
 2009-12-06  Dan Nicolaescu  <address@hidden>
 
+       * vc-git.el (vc-git-print-log): Handle a limit argument.  Display
+       the short log in graph form and with labels.
+       (vc-git-log-view-mode): Handle labels.
+
        Make vc-revert change VC state from 'added to 'unregistered.
        * vc-git.el (vc-git-revert): Call git reset first.
 

Index: vc-git.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-git.el,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -b -r1.103 -r1.104
--- vc-git.el   6 Dec 2009 21:25:58 -0000       1.103
+++ vc-git.el   6 Dec 2009 22:18:06 -0000       1.104
@@ -551,15 +551,15 @@
     (let ((inhibit-read-only t))
       (with-current-buffer
           buffer
-       (if shortlog
-       (vc-git-command buffer 'async files
-                           "log" ;; "--graph"
-                           "--date=short" "--pretty=format:%h  %ad  %s" 
"--abbrev-commit"
-                           "--")
-         (vc-git-command buffer 'async files
-                         "rev-list" ;; "--graph"
-                         "--pretty" "HEAD" "--")))
-        (when limit 'limit-unsupported))))
+       (apply 'vc-git-command buffer
+              'async files
+              (append
+               '("log")
+               (when shortlog
+                 '("--graph" "--decorate"
+                   "--date=short" "--pretty=format:%d%h  %ad  %s" 
"--abbrev-commit"))
+               (when limit (list "-n" (format "%s" limit)))
+               '("--")))))))
 
 (defvar log-view-message-re)
 (defvar log-view-file-re)
@@ -576,14 +576,17 @@
   (set (make-local-variable 'log-view-per-file-logs) nil)
   (set (make-local-variable 'log-view-message-re)
        (if vc-short-log
-        "^\\(?:[*/\\| ]+ \\)?\\([0-9a-z]+\\)  \\([-a-z0-9]+\\)  \\(.*\\)"
+          "^\\(?:[*/\\| ]+ \\)?\\(?: ([^)]+)\\)?\\([0-9a-z]+\\)  
\\([-a-z0-9]+\\)  \\(.*\\)"
         "^commit *\\([0-9a-z]+\\)"))
   (set (make-local-variable 'log-view-font-lock-keywords)
        (if vc-short-log
-          (append
-           `((,log-view-message-re
-              (1 'change-log-acknowledgement)
-              (2 'change-log-date))))
+          '(
+            ;; Same as log-view-message-re, except that we don't
+            ;; want the shy group for the tag name.
+            ("^\\(?:[*/\\| ]+ \\)?\\( ([^)]+)\\)?\\([0-9a-z]+\\)  
\\([-a-z0-9]+\\)  \\(.*\\)"
+             (1 'highlight nil lax)
+             (2 'change-log-acknowledgement)
+             (3 'change-log-date)))
        (append
         `((,log-view-message-re  (1 'change-log-acknowledgement)))
         ;; Handle the case:




reply via email to

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