Mercurial > emacs
annotate lisp/log-view.el @ 111352:9c78ac7dcdf0
* lisp/locate.el (locate, locate-mode): Doc fixes.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 31 Oct 2010 23:55:49 -0700 |
parents | 8027e412df98 |
children | 376148b31b5e |
rev | line source |
---|---|
29041
49e8918cab44
Fix file description.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28861
diff
changeset
|
1 ;;; log-view.el --- Major mode for browsing RCS/CVS/SCCS log output |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
2 |
104778
afa0e028ba97
Mark face aliases with "-face" suffix as obsolete.
Glenn Morris <rgm@gnu.org>
parents:
104366
diff
changeset
|
3 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
106815 | 4 ;; 2008, 2009, 2010 Free Software Foundation, Inc. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
5 |
70292
2b77fa42947f
Update my email address.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
68651
diff
changeset
|
6 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
106274
dcd016df9f8c
* log-view.el: Add "Keywords: tools", since its other keywords
Kevin Ryde <user42@zip.com.au>
parents:
105472
diff
changeset
|
7 ;; Keywords: rcs sccs cvs log version-control tools |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
8 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
9 ;; This file is part of GNU Emacs. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
10 |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93893
diff
changeset
|
11 ;; GNU Emacs is free software: you can redistribute it and/or modify |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
12 ;; it under the terms of the GNU General Public License as published by |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93893
diff
changeset
|
13 ;; the Free Software Foundation, either version 3 of the License, or |
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93893
diff
changeset
|
14 ;; (at your option) any later version. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
15 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
16 ;; GNU Emacs is distributed in the hope that it will be useful, |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
19 ;; GNU General Public License for more details. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
20 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
21 ;; You should have received a copy of the GNU General Public License |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93893
diff
changeset
|
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
23 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
24 ;;; Commentary: |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
25 |
67709
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
26 ;; Major mode to browse revision log histories. |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
27 ;; Currently supports the format output by: |
68098
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
28 ;; RCS, SCCS, CVS, Subversion, and DaRCS. |
67709
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
29 |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
30 ;; Examples of log output: |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
31 |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
32 ;;;; RCS/CVS: |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
33 |
67709
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
34 ;; ---------------------------- |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
35 ;; revision 1.35 locked by: turlutut |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
36 ;; date: 2005-03-22 18:48:38 +0000; author: monnier; state: Exp; lines: +6 -8 |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
37 ;; (gnus-display-time-event-handler): |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
38 ;; Check display-time-timer at runtime rather than only at load time |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
39 ;; in case display-time-mode is turned off in the mean time. |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
40 ;; ---------------------------- |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
41 ;; revision 1.34 |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
42 ;; date: 2005-02-09 15:50:38 +0000; author: kfstorm; state: Exp; lines: +7 -7 |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
43 ;; branches: 1.34.2; |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
44 ;; Change release version from 21.4 to 22.1 throughout. |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
45 ;; Change development version from 21.3.50 to 22.0.50. |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
46 |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
47 ;;;; SCCS: |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
48 |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
49 ;;;; Subversion: |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
50 |
87421
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
51 ;; ------------------------------------------------------------------------ |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
52 ;; r4622 | ckuethe | 2007-12-23 18:18:01 -0500 (Sun, 23 Dec 2007) | 2 lines |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
53 ;; |
87421
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
54 ;; uBlox AEK-4T in binary mode. Added to unstable because it breaks gpsfake |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
55 ;; |
87421
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
56 ;; ------------------------------------------------------------------------ |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
57 ;; r4621 | ckuethe | 2007-12-23 16:48:11 -0500 (Sun, 23 Dec 2007) | 3 lines |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
58 ;; |
87421
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
59 ;; Add a note about requiring usbfs to use the garmin gps18 (usb) |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
60 ;; Mention firmware testing the AC12 with firmware BQ00 and BQ04 |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
61 ;; |
87421
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
62 ;; ------------------------------------------------------------------------ |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
63 ;; r4620 | ckuethe | 2007-12-23 15:52:34 -0500 (Sun, 23 Dec 2007) | 1 line |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
64 ;; |
87421
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
65 ;; add link to latest hardware reference |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
66 ;; ------------------------------------------------------------------------ |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
67 ;; r4619 | ckuethe | 2007-12-23 14:37:31 -0500 (Sun, 23 Dec 2007) | 1 line |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
68 ;; |
87421
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
69 ;; there is now a regression test for AC12 without raw data output |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
70 |
68098
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
71 ;;;; Darcs: |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
72 |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
73 ;; Changes to darcsum.el: |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
74 ;; |
68098
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
75 ;; Mon Nov 28 15:19:38 GMT 2005 Dave Love <fx@gnu.org> |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
76 ;; * Abstract process startup into darcsum-start-process. Use TERM=dumb. |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
77 ;; TERM=dumb avoids escape characters, at least, for any old darcs that |
68098
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
78 ;; doesn't understand DARCS_DONT_COLOR & al. |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
79 ;; |
68098
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
80 ;; Thu Nov 24 15:20:45 GMT 2005 Dave Love <fx@gnu.org> |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
81 ;; * darcsum-mode-related changes. |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
82 ;; Don't call font-lock-mode (unnecessary) or use-local-map (redundant). |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
83 ;; Use mode-class 'special. Add :group. |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
84 ;; Add trailing-whitespace option to mode hook and fix |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
85 ;; darcsum-display-changeset not to use trailing whitespace. |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
86 |
87421
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
87 ;;;; Mercurial |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
88 |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
89 ;; changeset: 11:8ff1a4166444 |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
90 ;; tag: tip |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
91 ;; user: Eric S. Raymond <esr@thyrsus.com> |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
92 ;; date: Wed Dec 26 12:18:58 2007 -0500 |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
93 ;; summary: Explain keywords. Add markup fixes. |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
94 ;; |
87421
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
95 ;; changeset: 10:20abc7ab09c3 |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
96 ;; user: Eric S. Raymond <esr@thyrsus.com> |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
97 ;; date: Wed Dec 26 11:37:28 2007 -0500 |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
98 ;; summary: Typo fixes. |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
99 ;; |
87421
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
100 ;; changeset: 9:ada9f4da88aa |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
101 ;; user: Eric S. Raymond <esr@thyrsus.com> |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
102 ;; date: Wed Dec 26 11:23:00 2007 -0500 |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
103 ;; summary: Add RCS example session. |
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
104 |
67709
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
105 ;;; Todo: |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
106 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
107 ;; - add ability to modify a log-entry (via cvs-mode-admin ;-) |
29041
49e8918cab44
Fix file description.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28861
diff
changeset
|
108 ;; - remove references to cvs-* |
67709
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
109 ;; - make it easier to add support for new backends without changing the code. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
110 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
111 ;;; Code: |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
112 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
113 (eval-when-compile (require 'cl)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
114 (require 'pcvs-util) |
85139
8ba0e30716a5
Terminology cleanup.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85114
diff
changeset
|
115 (autoload 'vc-find-revision "vc") |
105472
7810759c427c
(log-view-diff): Use vc-diff-internal instead of
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105246
diff
changeset
|
116 (autoload 'vc-diff-internal "vc") |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
117 |
65293
f3b1607acf96
(cvs-minor-wrap-function): Add defvar.
Juanma Barranquero <lekktu@gmail.com>
parents:
64762
diff
changeset
|
118 (defvar cvs-minor-wrap-function) |
f3b1607acf96
(cvs-minor-wrap-function): Add defvar.
Juanma Barranquero <lekktu@gmail.com>
parents:
64762
diff
changeset
|
119 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
120 (defgroup log-view nil |
29041
49e8918cab44
Fix file description.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28861
diff
changeset
|
121 "Major mode for browsing log output of RCS/CVS/SCCS." |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
122 :group 'pcl-cvs |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
123 :prefix "log-view-") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
124 |
106847 | 125 ;; Needed because log-view-mode-map inherits from widget-keymap. (Bug#5311) |
126 (require 'wid-edit) | |
127 | |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
128 (easy-mmode-defmap log-view-mode-map |
104366
f02a9f76b408
(log-view-mode-map): Remove `q' binding, and unreliable
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
129 '(("z" . kill-this-buffer) |
106407
1119f2c554bc
(log-view-mode-map): "q" calls quit-window,
Sam Steingold <sds@gnu.org>
parents:
106336
diff
changeset
|
130 ("q" . quit-window) |
111350
8027e412df98
Backport VC improvements from trunk.
Chong Yidong <cyd@stupidchicken.com>
parents:
106847
diff
changeset
|
131 ("g" . revert-buffer) |
82826
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
132 ("m" . log-view-toggle-mark-entry) |
87432
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
133 ("e" . log-view-modify-change-comment) |
40958
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
134 ("d" . log-view-diff) |
106462
3affeccb7b33
* log-view.el (log-view-mode-map): Bind "=" to log-view-diff too.
Chong Yidong <cyd@stupidchicken.com>
parents:
106407
diff
changeset
|
135 ("=" . log-view-diff) |
95966
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
136 ("D" . log-view-diff-changeset) |
78867
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
137 ("a" . log-view-annotate-version) |
85139
8ba0e30716a5
Terminology cleanup.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85114
diff
changeset
|
138 ("f" . log-view-find-revision) |
40958
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
139 ("n" . log-view-msg-next) |
28251
21d27711125f
(log-view-(msg|file)-(prev|next)): Rename from
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
140 ("p" . log-view-msg-prev) |
78882
ccd0441c69e1
* pcvs-defs.el (cvs-mode-map): Bind TAB and backtab.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78867
diff
changeset
|
141 ("\t" . log-view-msg-next) |
ccd0441c69e1
* pcvs-defs.el (cvs-mode-map): Bind TAB and backtab.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78867
diff
changeset
|
142 ([backtab] . log-view-msg-prev) |
28251
21d27711125f
(log-view-(msg|file)-(prev|next)): Rename from
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
143 ("N" . log-view-file-next) |
21d27711125f
(log-view-(msg|file)-(prev|next)): Rename from
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
144 ("P" . log-view-file-prev) |
40450
d29fac587062
(log-view-mode-map): Bind `M-n' and `M-p', not `M n'
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
34652
diff
changeset
|
145 ("\M-n" . log-view-file-next) |
d29fac587062
(log-view-mode-map): Bind `M-n' and `M-p', not `M n'
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
34652
diff
changeset
|
146 ("\M-p" . log-view-file-prev)) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
147 "Log-View's keymap." |
106336
33c61d7ea5d8
Make vc-print-log buttons work.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
106274
diff
changeset
|
148 :inherit widget-keymap |
104366
f02a9f76b408
(log-view-mode-map): Remove `q' binding, and unreliable
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
149 :group 'log-view) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
150 |
78077
442f874e0b22
(log-view-mode-menu): New menu.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
75347
diff
changeset
|
151 (easy-menu-define log-view-mode-menu log-view-mode-map |
442f874e0b22
(log-view-mode-menu): New menu.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
75347
diff
changeset
|
152 "Log-View Display Menu" |
442f874e0b22
(log-view-mode-menu): New menu.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
75347
diff
changeset
|
153 `("Log-View" |
442f874e0b22
(log-view-mode-menu): New menu.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
75347
diff
changeset
|
154 ;; XXX Do we need menu entries for these? |
442f874e0b22
(log-view-mode-menu): New menu.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
75347
diff
changeset
|
155 ;; ["Quit" quit-window] |
442f874e0b22
(log-view-mode-menu): New menu.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
75347
diff
changeset
|
156 ;; ["Kill This Buffer" kill-this-buffer] |
93893
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
157 ["Mark Log Entry for Diff" set-mark-command |
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
158 :help ""] |
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
159 ["Diff Revisions" log-view-diff |
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
160 :help "Get the diff between two revisions"] |
95966
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
161 ["Changeset Diff" log-view-diff-changeset |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
162 :help "Get the changeset diff between two revisions"] |
93893
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
163 ["Visit Version" log-view-find-revision |
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
164 :help "Visit the version at point"] |
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
165 ["Annotate Version" log-view-annotate-version |
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
166 :help "Annotate the version at point"] |
93867
520490ae1b9a
* vc-rcs.el (vc-rcs-modify-change-comment):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
87562
diff
changeset
|
167 ["Modify Log Comment" log-view-modify-change-comment |
520490ae1b9a
* vc-rcs.el (vc-rcs-modify-change-comment):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
87562
diff
changeset
|
168 :help "Edit the change comment displayed at point"] |
520490ae1b9a
* vc-rcs.el (vc-rcs-modify-change-comment):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
87562
diff
changeset
|
169 "-----" |
93893
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
170 ["Next Log Entry" log-view-msg-next |
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
171 :help "Go to the next count'th log message"] |
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
172 ["Previous Log Entry" log-view-msg-prev |
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
173 :help "Go to the previous count'th log message"] |
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
174 ["Next File" log-view-file-next |
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
175 :help "Go to the next count'th file"] |
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
176 ["Previous File" log-view-file-prev |
ff99dcb2b31b
* outline.el (outline-mode-menu-bar-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
93867
diff
changeset
|
177 :help "Go to the previous count'th file"])) |
78077
442f874e0b22
(log-view-mode-menu): New menu.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
75347
diff
changeset
|
178 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
179 (defvar log-view-mode-hook nil |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
180 "Hook run at the end of `log-view-mode'.") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
181 |
63203
ecbe83adff58
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-374
Miles Bader <miles@gnu.org>
parents:
60145
diff
changeset
|
182 (defface log-view-file |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
183 '((((class color) (background light)) |
42456
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
42074
diff
changeset
|
184 (:background "grey70" :weight bold)) |
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
42074
diff
changeset
|
185 (t (:weight bold))) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
186 "Face for the file header line in `log-view-mode'." |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
187 :group 'log-view) |
104778
afa0e028ba97
Mark face aliases with "-face" suffix as obsolete.
Glenn Morris <rgm@gnu.org>
parents:
104366
diff
changeset
|
188 (define-obsolete-face-alias 'log-view-file-face 'log-view-file "22.1") |
63203
ecbe83adff58
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-374
Miles Bader <miles@gnu.org>
parents:
60145
diff
changeset
|
189 (defvar log-view-file-face 'log-view-file) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
190 |
63203
ecbe83adff58
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-374
Miles Bader <miles@gnu.org>
parents:
60145
diff
changeset
|
191 (defface log-view-message |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
192 '((((class color) (background light)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
193 (:background "grey85")) |
42456
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
42074
diff
changeset
|
194 (t (:weight bold))) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
195 "Face for the message header line in `log-view-mode'." |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
196 :group 'log-view) |
63203
ecbe83adff58
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-374
Miles Bader <miles@gnu.org>
parents:
60145
diff
changeset
|
197 ;; backward-compatibility alias |
104778
afa0e028ba97
Mark face aliases with "-face" suffix as obsolete.
Glenn Morris <rgm@gnu.org>
parents:
104366
diff
changeset
|
198 (define-obsolete-face-alias 'log-view-message-face 'log-view-message "22.1") |
63203
ecbe83adff58
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-374
Miles Bader <miles@gnu.org>
parents:
60145
diff
changeset
|
199 (defvar log-view-message-face 'log-view-message) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
200 |
81511
9785d18889ed
(log-view-font-lock-keywords): Use `eval' to consult the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
81330
diff
changeset
|
201 (defvar log-view-file-re |
81330
f7754bd2e73f
(log-view-file-re, log-view-message-re): Use \(?1:...\).
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
202 (concat "^\\(?:Working file: \\(?1:.+\\)" ;RCS and CVS. |
f7754bd2e73f
(log-view-file-re, log-view-message-re): Use \(?1:...\).
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
203 ;; Subversion has no such thing?? |
f7754bd2e73f
(log-view-file-re, log-view-message-re): Use \(?1:...\).
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
204 "\\|\\(?:SCCS/s\\.\\|Changes to \\)\\(?1:.+\\):" ;SCCS and Darcs. |
81567
0b055b6ebf6c
Add docstrings.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
81511
diff
changeset
|
205 "\\)\n") ;Include the \n for font-lock reasons. |
0b055b6ebf6c
Add docstrings.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
81511
diff
changeset
|
206 "Regexp matching the text identifying the file. |
0b055b6ebf6c
Add docstrings.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
81511
diff
changeset
|
207 The match group number 1 should match the file name itself.") |
67709
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
208 |
95966
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
209 (defvar log-view-per-file-logs t |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
210 "Set if to t if the logs are shown one file at a time.") |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
211 |
81511
9785d18889ed
(log-view-font-lock-keywords): Use `eval' to consult the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
81330
diff
changeset
|
212 (defvar log-view-message-re |
81330
f7754bd2e73f
(log-view-file-re, log-view-message-re): Use \(?1:...\).
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
213 (concat "^\\(?:revision \\(?1:[.0-9]+\\)\\(?:\t.*\\)?" ; RCS and CVS. |
f7754bd2e73f
(log-view-file-re, log-view-message-re): Use \(?1:...\).
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
214 "\\|r\\(?1:[0-9]+\\) | .* | .*" ; Subversion. |
f7754bd2e73f
(log-view-file-re, log-view-message-re): Use \(?1:...\).
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
215 "\\|D \\(?1:[.0-9]+\\) .*" ; SCCS. |
68098
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
216 ;; Darcs doesn't have revision names. VC-darcs uses patch names |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
217 ;; instead. Darcs patch names are hashcodes, which do not appear |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
218 ;; in the log output :-(, but darcs accepts any prefix of the log |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
219 ;; message as a patch name, so we match the first line of the log |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
220 ;; message. |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
221 ;; First loosely match the date format. |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
222 (concat "\\|[^ \n].*[^0-9\n][0-9][0-9]:[0-9][0-9][^0-9\n].*[^ \n]" |
150225f41e97
(log-view-file-re, log-view-message-re): Add support for DaRCS output.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67775
diff
changeset
|
223 ;;Email of user and finally Msg, used as revision name. |
81330
f7754bd2e73f
(log-view-file-re, log-view-message-re): Use \(?1:...\).
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
224 " .*@.*\n\\(?: \\* \\(?1:.*\\)\\)?") |
78525
33690fc4e175
(log-view-font-lock-keywords): Use `eval' so as to adapt to buffer settings.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78236
diff
changeset
|
225 "\\)$") |
81567
0b055b6ebf6c
Add docstrings.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
81511
diff
changeset
|
226 "Regexp matching the text identifying a revision. |
0b055b6ebf6c
Add docstrings.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
81511
diff
changeset
|
227 The match group number 1 should match the revision number itself.") |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
228 |
78525
33690fc4e175
(log-view-font-lock-keywords): Use `eval' so as to adapt to buffer settings.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78236
diff
changeset
|
229 (defvar log-view-font-lock-keywords |
33690fc4e175
(log-view-font-lock-keywords): Use `eval' so as to adapt to buffer settings.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78236
diff
changeset
|
230 ;; We use `eval' so as to use the buffer-local value of log-view-file-re |
33690fc4e175
(log-view-font-lock-keywords): Use `eval' so as to adapt to buffer settings.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78236
diff
changeset
|
231 ;; and log-view-message-re, if applicable. |
33690fc4e175
(log-view-font-lock-keywords): Use `eval' so as to adapt to buffer settings.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78236
diff
changeset
|
232 '((eval . `(,log-view-file-re |
81511
9785d18889ed
(log-view-font-lock-keywords): Use `eval' to consult the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
81330
diff
changeset
|
233 (1 (if (boundp 'cvs-filename-face) cvs-filename-face)) |
78525
33690fc4e175
(log-view-font-lock-keywords): Use `eval' so as to adapt to buffer settings.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78236
diff
changeset
|
234 (0 log-view-file-face append))) |
33690fc4e175
(log-view-font-lock-keywords): Use `eval' so as to adapt to buffer settings.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78236
diff
changeset
|
235 (eval . `(,log-view-message-re . log-view-message-face)))) |
33690fc4e175
(log-view-font-lock-keywords): Use `eval' so as to adapt to buffer settings.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78236
diff
changeset
|
236 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
237 (defconst log-view-font-lock-defaults |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
238 '(log-view-font-lock-keywords t nil nil nil)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
239 |
95966
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
240 (defvar log-view-vc-fileset nil |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
241 "Set this to the fileset corresponding to the current log.") |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
242 |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
243 (defvar log-view-vc-backend nil |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
244 "Set this to the VC backend that created the current log.") |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
245 |
40954 | 246 ;;;; |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
247 ;;;; Actual code |
40954 | 248 ;;;; |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
249 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
250 ;;;###autoload |
104366
f02a9f76b408
(log-view-mode-map): Remove `q' binding, and unreliable
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
251 (define-derived-mode log-view-mode special-mode "Log-View" |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
252 "Major mode for browsing CVS log output." |
40958
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
253 (setq buffer-read-only t) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
254 (set (make-local-variable 'font-lock-defaults) log-view-font-lock-defaults) |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
255 (set (make-local-variable 'beginning-of-defun-function) |
78867
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
256 'log-view-beginning-of-defun) |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
257 (set (make-local-variable 'end-of-defun-function) |
78867
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
258 'log-view-end-of-defun) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
259 (set (make-local-variable 'cvs-minor-wrap-function) 'log-view-minor-wrap)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
260 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
261 ;;;; |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
262 ;;;; Navigation |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
263 ;;;; |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
264 |
28251
21d27711125f
(log-view-(msg|file)-(prev|next)): Rename from
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
265 ;; define log-view-{msg,file}-{next,prev} |
21d27711125f
(log-view-(msg|file)-(prev|next)): Rename from
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
266 (easy-mmode-define-navigation log-view-msg log-view-message-re "log message") |
21d27711125f
(log-view-(msg|file)-(prev|next)): Rename from
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
267 (easy-mmode-define-navigation log-view-file log-view-file-re "file") |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
268 |
28861
bab7620d1466
(log-view-goto-rev): New function for the new VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28251
diff
changeset
|
269 (defun log-view-goto-rev (rev) |
bab7620d1466
(log-view-goto-rev): New function for the new VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28251
diff
changeset
|
270 (goto-char (point-min)) |
bab7620d1466
(log-view-goto-rev): New function for the new VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28251
diff
changeset
|
271 (ignore-errors |
bab7620d1466
(log-view-goto-rev): New function for the new VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28251
diff
changeset
|
272 (while (not (equal rev (log-view-current-tag))) |
bab7620d1466
(log-view-goto-rev): New function for the new VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28251
diff
changeset
|
273 (log-view-msg-next)) |
bab7620d1466
(log-view-goto-rev): New function for the new VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28251
diff
changeset
|
274 t)) |
bab7620d1466
(log-view-goto-rev): New function for the new VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28251
diff
changeset
|
275 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
276 ;;;; |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
277 ;;;; Linkage to PCL-CVS (mostly copied from cvs-status.el) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
278 ;;;; |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
279 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
280 (defconst log-view-dir-re "^cvs[.ex]* [a-z]+: Logging \\(.+\\)$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
281 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
282 (defun log-view-current-file () |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
283 (save-excursion |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
284 (forward-line 1) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
285 (or (re-search-backward log-view-file-re nil t) |
83843
bdd75f65c6cd
(log-view-current-file): Give a more explicit error if
Glenn Morris <rgm@gnu.org>
parents:
82852
diff
changeset
|
286 (re-search-forward log-view-file-re nil t) |
83845
0f772ae43706
(log-view-current-file): Balance parens.
Romain Francoise <romain@orebokech.com>
parents:
83843
diff
changeset
|
287 (error "Unable to determine the current file")) |
81330
f7754bd2e73f
(log-view-file-re, log-view-message-re): Use \(?1:...\).
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
75347
diff
changeset
|
288 (let* ((file (match-string 1)) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
289 (cvsdir (and (re-search-backward log-view-dir-re nil t) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
290 (match-string 1))) |
29041
49e8918cab44
Fix file description.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28861
diff
changeset
|
291 (pcldir (and (boundp 'cvs-pcl-cvs-dirchange-re) |
49e8918cab44
Fix file description.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28861
diff
changeset
|
292 (re-search-backward cvs-pcl-cvs-dirchange-re nil t) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
293 (match-string 1))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
294 (dir "")) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
295 (let ((default-directory "")) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
296 (when pcldir (setq dir (expand-file-name pcldir dir))) |
40958
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
297 (when cvsdir (setq dir (expand-file-name cvsdir dir)))) |
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
298 (expand-file-name file dir)))) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
299 |
40958
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
300 (defun log-view-current-tag (&optional where) |
28251
21d27711125f
(log-view-(msg|file)-(prev|next)): Rename from
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
301 (save-excursion |
40958
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
302 (when where (goto-char where)) |
28251
21d27711125f
(log-view-(msg|file)-(prev|next)): Rename from
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
303 (forward-line 1) |
21d27711125f
(log-view-(msg|file)-(prev|next)): Rename from
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
304 (let ((pt (point))) |
21d27711125f
(log-view-(msg|file)-(prev|next)): Rename from
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
305 (when (re-search-backward log-view-message-re nil t) |
82844
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
306 (let ((rev (match-string-no-properties 1))) |
28251
21d27711125f
(log-view-(msg|file)-(prev|next)): Rename from
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
307 (unless (re-search-forward log-view-file-re pt t) |
21d27711125f
(log-view-(msg|file)-(prev|next)): Rename from
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
308 rev)))))) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
309 |
82826
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
310 (defun log-view-toggle-mark-entry () |
82852
26de218dc2d9
(log-view-toggle-mark-entry): Add docstring.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82844
diff
changeset
|
311 "Toggle the marked state for the log entry at point. |
26de218dc2d9
(log-view-toggle-mark-entry): Add docstring.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82844
diff
changeset
|
312 Individual log entries can be marked and unmarked. The marked |
26de218dc2d9
(log-view-toggle-mark-entry): Add docstring.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82844
diff
changeset
|
313 entries are denoted by changing their background color. |
26de218dc2d9
(log-view-toggle-mark-entry): Add docstring.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82844
diff
changeset
|
314 `log-view-get-marked' returns the list of tags for the marked |
26de218dc2d9
(log-view-toggle-mark-entry): Add docstring.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82844
diff
changeset
|
315 log entries." |
82826
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
316 (interactive) |
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
317 (save-excursion |
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
318 (forward-line 1) |
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
319 (let ((pt (point))) |
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
320 (when (re-search-backward log-view-message-re nil t) |
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
321 (let ((beg (match-beginning 0)) |
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
322 end ov ovlist found tag) |
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
323 (unless (re-search-forward log-view-file-re pt t) |
82844
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
324 ;; Look to see if the current entry is marked. |
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
325 (setq found (get-char-property (point) 'log-view-self)) |
82826
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
326 (if found |
82844
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
327 (delete-overlay found) |
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
328 ;; Create an overlay that covers this entry and change |
87421
a7e1281f0f9e
Add log format samples for Subversion and Mercurial.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85474
diff
changeset
|
329 ;; its color. |
82826
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
330 (setq tag (log-view-current-tag (point))) |
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
331 (forward-line 1) |
82844
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
332 (setq end |
82826
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
333 (if (re-search-forward log-view-message-re nil t) |
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
334 (match-beginning 0) |
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
335 (point-max))) |
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
336 (setq ov (make-overlay beg end)) |
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
337 (overlay-put ov 'face 'log-view-file) |
82844
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
338 ;; This is used to check if the overlay is present. |
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
339 (overlay-put ov 'log-view-self ov) |
82826
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
340 (overlay-put ov 'log-view-marked tag)))))))) |
0d52789c865e
(log-view-toggle-mark-entry): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82365
diff
changeset
|
341 |
82844
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
342 (defun log-view-get-marked () |
82852
26de218dc2d9
(log-view-toggle-mark-entry): Add docstring.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82844
diff
changeset
|
343 "Return the list of tags for the marked log entries." |
82844
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
344 (save-excursion |
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
345 (let ((pos (point-min)) |
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
346 marked-list ov) |
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
347 (while (setq pos (next-single-property-change pos 'face)) |
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
348 (when (setq ov (get-char-property pos 'log-view-self)) |
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
349 (push (overlay-get ov 'log-view-marked) marked-list) |
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
350 (setq pos (overlay-end ov)))) |
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
351 marked-list))) |
a25b7156354b
(log-view-marked-list): Delete variable.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
82826
diff
changeset
|
352 |
78867
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
353 (defun log-view-beginning-of-defun () |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
354 ;; This assumes that a log entry starts with a line matching |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
355 ;; `log-view-message-re'. Modes that derive from `log-view-mode' |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
356 ;; for which this assumption is not valid will have to provide |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
357 ;; another implementation of this function. `log-view-msg-prev' |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
358 ;; does a similar job to this function, we can't use it here |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
359 ;; directly because it prints messages that are not appropriate in |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
360 ;; this context and it does not move to the beginning of the buffer |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
361 ;; when the point is before the first log entry. |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
362 |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
363 ;; `log-view-beginning-of-defun' and `log-view-end-of-defun' have |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
364 ;; been checked to work with logs produced by RCS, CVS, git, |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
365 ;; mercurial and subversion. |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
366 |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
367 (re-search-backward log-view-message-re nil 'move)) |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
368 |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
369 (defun log-view-end-of-defun () |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
370 ;; The idea in this function is to search for the beginning of the |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
371 ;; next log entry using `log-view-message-re' and then go back one |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
372 ;; line when finding it. Modes that derive from `log-view-mode' for |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
373 ;; which this assumption is not valid will have to provide another |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
374 ;; implementation of this function. |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
375 |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
376 ;; Look back and if there is no entry there it means we are before |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
377 ;; the first log entry, so go forward until finding one. |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
378 (unless (save-excursion (re-search-backward log-view-message-re nil t)) |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
379 (re-search-forward log-view-message-re nil t)) |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
380 |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
381 ;; In case we are at the end of log entry going forward a line will |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
382 ;; make us find the next entry when searching. If we are inside of |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
383 ;; an entry going forward a line will still keep the point inside |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
384 ;; the same entry. |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
385 (forward-line 1) |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
386 |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
387 ;; In case we are at the beginning of an entry, move past it. |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
388 (when (looking-at log-view-message-re) |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
389 (goto-char (match-end 0)) |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
390 (forward-line 1)) |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
391 |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
392 ;; Search for the start of the next log entry. Go to the end of the |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
393 ;; buffer if we could not find a next entry. |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
394 (when (re-search-forward log-view-message-re nil 'move) |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
395 (goto-char (match-beginning 0)) |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
396 (forward-line -1))) |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
397 |
67709
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
398 (defvar cvs-minor-current-files) |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
399 (defvar cvs-branch-prefix) |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
400 (defvar cvs-secondary-branch-prefix) |
6f549652480e
(log-view-file-re, log-view-message-re): Use shy groups.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67569
diff
changeset
|
401 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
402 (defun log-view-minor-wrap (buf f) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
403 (let ((data (with-current-buffer buf |
68370
89e7eb7d165b
(log-view-minor-wrap): First rev is the one at point.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
68221
diff
changeset
|
404 (let* ((beg (point)) |
89e7eb7d165b
(log-view-minor-wrap): First rev is the one at point.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
68221
diff
changeset
|
405 (end (if mark-active (mark) (point))) |
68221
4804f7b39bfe
(log-view-minor-wrap): Use the same logic to get revisions as `log-view-diff'.
Juri Linkov <juri@jurta.org>
parents:
68098
diff
changeset
|
406 (fr (log-view-current-tag beg)) |
4804f7b39bfe
(log-view-minor-wrap): Use the same logic to get revisions as `log-view-diff'.
Juri Linkov <juri@jurta.org>
parents:
68098
diff
changeset
|
407 (to (log-view-current-tag end))) |
4804f7b39bfe
(log-view-minor-wrap): Use the same logic to get revisions as `log-view-diff'.
Juri Linkov <juri@jurta.org>
parents:
68098
diff
changeset
|
408 (when (string-equal fr to) |
4804f7b39bfe
(log-view-minor-wrap): Use the same logic to get revisions as `log-view-diff'.
Juri Linkov <juri@jurta.org>
parents:
68098
diff
changeset
|
409 (save-excursion |
4804f7b39bfe
(log-view-minor-wrap): Use the same logic to get revisions as `log-view-diff'.
Juri Linkov <juri@jurta.org>
parents:
68098
diff
changeset
|
410 (goto-char end) |
4804f7b39bfe
(log-view-minor-wrap): Use the same logic to get revisions as `log-view-diff'.
Juri Linkov <juri@jurta.org>
parents:
68098
diff
changeset
|
411 (log-view-msg-next) |
4804f7b39bfe
(log-view-minor-wrap): Use the same logic to get revisions as `log-view-diff'.
Juri Linkov <juri@jurta.org>
parents:
68098
diff
changeset
|
412 (setq to (log-view-current-tag)))) |
4804f7b39bfe
(log-view-minor-wrap): Use the same logic to get revisions as `log-view-diff'.
Juri Linkov <juri@jurta.org>
parents:
68098
diff
changeset
|
413 (cons |
68370
89e7eb7d165b
(log-view-minor-wrap): First rev is the one at point.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
68221
diff
changeset
|
414 ;; The first revision has to be the one at point, for |
89e7eb7d165b
(log-view-minor-wrap): First rev is the one at point.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
68221
diff
changeset
|
415 ;; operations that only take one revision |
89e7eb7d165b
(log-view-minor-wrap): First rev is the one at point.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
68221
diff
changeset
|
416 ;; (e.g. cvs-mode-edit). |
89e7eb7d165b
(log-view-minor-wrap): First rev is the one at point.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
68221
diff
changeset
|
417 (cons (log-view-current-file) fr) |
89e7eb7d165b
(log-view-minor-wrap): First rev is the one at point.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
68221
diff
changeset
|
418 (cons (log-view-current-file) to)))))) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
419 (let ((cvs-branch-prefix (cdar data)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
420 (cvs-secondary-branch-prefix (and (cdar data) (cddr data))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
421 (cvs-minor-current-files |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
422 (cons (caar data) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
423 (when (and (cadr data) (not (equal (caar data) (cadr data)))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
424 (list (cadr data))))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
425 ;; FIXME: I need to force because the fileinfos are UNKNOWN |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
426 (cvs-force-command "/F")) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
427 (funcall f)))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
428 |
85139
8ba0e30716a5
Terminology cleanup.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
85114
diff
changeset
|
429 (defun log-view-find-revision (pos) |
41557
be985e4c1430
(log-view-find-version): New function.
André Spiegel <spiegel@gnu.org>
parents:
41137
diff
changeset
|
430 "Visit the version at point." |
be985e4c1430
(log-view-find-version): New function.
André Spiegel <spiegel@gnu.org>
parents:
41137
diff
changeset
|
431 (interactive "d") |
95966
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
432 (unless log-view-per-file-logs |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
433 (when (> (length log-view-vc-fileset) 1) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
434 (error "Multiple files shown in this buffer, cannot use this command here"))) |
41557
be985e4c1430
(log-view-find-version): New function.
André Spiegel <spiegel@gnu.org>
parents:
41137
diff
changeset
|
435 (save-excursion |
be985e4c1430
(log-view-find-version): New function.
André Spiegel <spiegel@gnu.org>
parents:
41137
diff
changeset
|
436 (goto-char pos) |
95966
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
437 (switch-to-buffer (vc-find-revision (if log-view-per-file-logs |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
438 (log-view-current-file) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
439 (car log-view-vc-fileset)) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
440 (log-view-current-tag))))) |
41557
be985e4c1430
(log-view-find-version): New function.
André Spiegel <spiegel@gnu.org>
parents:
41137
diff
changeset
|
441 |
87432
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
442 |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
443 (defun log-view-extract-comment () |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
444 "Parse comment from around the current point in the log." |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
445 (save-excursion |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
446 (let (st en (backend (vc-backend (log-view-current-file)))) |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
447 (log-view-end-of-defun) |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
448 (cond ((eq backend 'SVN) |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
449 (forward-line -1))) |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
450 (setq en (point)) |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
451 (log-view-beginning-of-defun) |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
452 (cond ((memq backend '(SCCS RCS CVS MCVS SVN)) |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
453 (forward-line 2)) |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
454 ((eq backend 'Hg) |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
455 (forward-line 4) |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
456 (re-search-forward "summary: *" nil t))) |
87432
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
457 (setq st (point)) |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
458 (buffer-substring st en)))) |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
459 |
87562
aeda902ed7fc
(vc-modify-change-comment): Declare for compiler.
Glenn Morris <rgm@gnu.org>
parents:
87432
diff
changeset
|
460 (declare-function vc-modify-change-comment "vc" (files rev oldcomment)) |
aeda902ed7fc
(vc-modify-change-comment): Declare for compiler.
Glenn Morris <rgm@gnu.org>
parents:
87432
diff
changeset
|
461 |
87432
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
462 (defun log-view-modify-change-comment () |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
463 "Edit the change comment displayed at point." |
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
464 (interactive) |
95966
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
465 (vc-modify-change-comment (list (if log-view-per-file-logs |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
466 (log-view-current-file) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
467 (car log-view-vc-fileset))) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
468 (log-view-current-tag) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
469 (log-view-extract-comment))) |
87432
315124ffb889
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87421
diff
changeset
|
470 |
78867
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
471 (defun log-view-annotate-version (pos) |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
472 "Annotate the version at point." |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
473 (interactive "d") |
95966
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
474 (unless log-view-per-file-logs |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
475 (when (> (length log-view-vc-fileset) 1) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
476 (error "Multiple files shown in this buffer, cannot use this command here"))) |
78867
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
477 (save-excursion |
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
478 (goto-char pos) |
99895
a7e92bcb2135
(log-view-annotate-version): Let vc-annotate manage windows instead
Chong Yidong <cyd@stupidchicken.com>
parents:
96006
diff
changeset
|
479 (vc-annotate (if log-view-per-file-logs |
a7e92bcb2135
(log-view-annotate-version): Let vc-annotate manage windows instead
Chong Yidong <cyd@stupidchicken.com>
parents:
96006
diff
changeset
|
480 (log-view-current-file) |
a7e92bcb2135
(log-view-annotate-version): Let vc-annotate manage windows instead
Chong Yidong <cyd@stupidchicken.com>
parents:
96006
diff
changeset
|
481 (car log-view-vc-fileset)) |
a7e92bcb2135
(log-view-annotate-version): Let vc-annotate manage windows instead
Chong Yidong <cyd@stupidchicken.com>
parents:
96006
diff
changeset
|
482 (log-view-current-tag)))) |
78867
82b0e30f9888
* files.el (file-name-sans-versions): Allow - and a-z in version
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78525
diff
changeset
|
483 |
42074
fdee0c7c3bf1
(log-view-message-re, log-view-current-tag):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
41557
diff
changeset
|
484 ;; |
fdee0c7c3bf1
(log-view-message-re, log-view-current-tag):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
41557
diff
changeset
|
485 ;; diff |
fdee0c7c3bf1
(log-view-message-re, log-view-current-tag):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
41557
diff
changeset
|
486 ;; |
40958
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
487 |
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
488 (defun log-view-diff (beg end) |
67569 | 489 "Get the diff between two revisions. |
490 If the mark is not active or the mark is on the revision at point, | |
491 get the diff between the revision at point and its previous revision. | |
492 Otherwise, get the diff between the revisions where the region starts | |
105246
e0bd6a2a8ee5
(log-view-diff,log-view-diff-changeset): Improve docstring.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104778
diff
changeset
|
493 and ends. |
e0bd6a2a8ee5
(log-view-diff,log-view-diff-changeset): Improve docstring.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104778
diff
changeset
|
494 Contrary to `log-view-diff-changeset', it will only show the part of the |
e0bd6a2a8ee5
(log-view-diff,log-view-diff-changeset): Improve docstring.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104778
diff
changeset
|
495 changeset that affected the currently considered file(s)." |
55175
e7a5be902830
(log-view-diff): Replace interactive code "r"
Juri Linkov <juri@jurta.org>
parents:
52401
diff
changeset
|
496 (interactive |
e7a5be902830
(log-view-diff): Replace interactive code "r"
Juri Linkov <juri@jurta.org>
parents:
52401
diff
changeset
|
497 (list (if mark-active (region-beginning) (point)) |
e7a5be902830
(log-view-diff): Replace interactive code "r"
Juri Linkov <juri@jurta.org>
parents:
52401
diff
changeset
|
498 (if mark-active (region-end) (point)))) |
40958
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
499 (let ((fr (log-view-current-tag beg)) |
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
500 (to (log-view-current-tag end))) |
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
501 (when (string-equal fr to) |
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
502 (save-excursion |
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
503 (goto-char end) |
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
504 (log-view-msg-next) |
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
505 (setq to (log-view-current-tag)))) |
105472
7810759c427c
(log-view-diff): Use vc-diff-internal instead of
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105246
diff
changeset
|
506 (vc-diff-internal |
7810759c427c
(log-view-diff): Use vc-diff-internal instead of
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105246
diff
changeset
|
507 t (list log-view-vc-backend |
7810759c427c
(log-view-diff): Use vc-diff-internal instead of
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105246
diff
changeset
|
508 (if log-view-per-file-logs |
7810759c427c
(log-view-diff): Use vc-diff-internal instead of
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105246
diff
changeset
|
509 (list (log-view-current-file)) |
7810759c427c
(log-view-diff): Use vc-diff-internal instead of
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105246
diff
changeset
|
510 log-view-vc-fileset)) |
7810759c427c
(log-view-diff): Use vc-diff-internal instead of
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105246
diff
changeset
|
511 to fr))) |
95966
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
512 |
96006
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
513 (declare-function vc-diff-internal "vc" |
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
514 (async vc-fileset rev1 rev2 &optional verbose)) |
4a520700b8b4
(vc-diff-internal): Declare for compiler.
Juanma Barranquero <lekktu@gmail.com>
parents:
95966
diff
changeset
|
515 |
95966
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
516 (defun log-view-diff-changeset (beg end) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
517 "Get the diff between two revisions. |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
518 If the mark is not active or the mark is on the revision at point, |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
519 get the diff between the revision at point and its previous revision. |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
520 Otherwise, get the diff between the revisions where the region starts |
105246
e0bd6a2a8ee5
(log-view-diff,log-view-diff-changeset): Improve docstring.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104778
diff
changeset
|
521 and ends. |
e0bd6a2a8ee5
(log-view-diff,log-view-diff-changeset): Improve docstring.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104778
diff
changeset
|
522 Contrary to `log-view-diff', it will show the whole changeset including |
e0bd6a2a8ee5
(log-view-diff,log-view-diff-changeset): Improve docstring.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104778
diff
changeset
|
523 the changes that affected other files than the currently considered file(s)." |
95966
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
524 (interactive |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
525 (list (if mark-active (region-beginning) (point)) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
526 (if mark-active (region-end) (point)))) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
527 (when (eq (vc-call-backend log-view-vc-backend 'revision-granularity) 'file) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
528 (error "The %s backend does not support changeset diffs" log-view-vc-backend)) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
529 (let ((fr (log-view-current-tag beg)) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
530 (to (log-view-current-tag end))) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
531 (when (string-equal fr to) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
532 ;; TO and FR are the same, look at the previous revision. |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
533 (setq to (vc-call-backend log-view-vc-backend 'previous-revision nil fr))) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
534 (vc-diff-internal |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
535 t |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
536 ;; We want to see the diff for all the files in the changeset, so |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
537 ;; pass NIL for the file list. The value passed here should |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
538 ;; follow what `vc-deduce-fileset' returns. |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
539 (list log-view-vc-backend nil) |
054335cbee3d
* log-view.el (log-view-diff-changeset): New function.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
94678
diff
changeset
|
540 to fr))) |
40958
4b4504c5aa56
* vc.el (vc-print-log): Bind `inhibit-read-only' to t before and
Sam Steingold <sds@gnu.org>
parents:
40954
diff
changeset
|
541 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
542 (provide 'log-view) |
28251
21d27711125f
(log-view-(msg|file)-(prev|next)): Rename from
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
543 |
60145
e7ec1f80fc80
(log-view-message-re): Fix up Subversion regexp.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
55175
diff
changeset
|
544 ;; arch-tag: 0d64220b-ce7e-4f62-9c2a-6b04c2f81f4f |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
545 ;;; log-view.el ends here |