Mercurial > emacs
annotate lisp/vc-cvs.el @ 89464:3bd06346cb4b
(font-lock-match-c-style-declaration-item-and-skip-to-next):
Check (match-end 2) before goto there.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 05 Jun 2003 12:58:44 +0000 |
parents | d4dab5e8395f |
children | 1163adb21e5d |
rev | line source |
---|---|
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
1 ;;; vc-cvs.el --- non-resident support for CVS version-control |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
2 |
35839
7349d241e60b
Remove autoloads. Require vc when compiling.
André Spiegel <spiegel@gnu.org>
parents:
35821
diff
changeset
|
3 ;; Copyright (C) 1995,98,99,2000,2001 Free Software Foundation, Inc. |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
4 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
5 ;; Author: FSF (see vc.el for full credits) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
7 |
43533
d4dab5e8395f
(vc-cvs-diff, vc-cvs-diff-tree): Use consistent parameter format for
André Spiegel <spiegel@gnu.org>
parents:
43447
diff
changeset
|
8 ;; $Id: vc-cvs.el,v 1.33 2002/02/21 20:16:47 spiegel Exp $ |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
9 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
10 ;; This file is part of GNU Emacs. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
11 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
13 ;; it under the terms of the GNU General Public License as published by |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
14 ;; the Free Software Foundation; either version 2, or (at your option) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
15 ;; any later version. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
16 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
17 ;; GNU Emacs is distributed in the hope that it will be useful, |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
20 ;; GNU General Public License for more details. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
21 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
22 ;; You should have received a copy of the GNU General Public License |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
25 ;; Boston, MA 02111-1307, USA. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
26 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
27 ;;; Commentary: |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
28 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
29 ;;; Code: |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
30 |
35702
395d188bb71d
replaced require with autoloads
Sam Steingold <sds@gnu.org>
parents:
35584
diff
changeset
|
31 (eval-when-compile |
35839
7349d241e60b
Remove autoloads. Require vc when compiling.
André Spiegel <spiegel@gnu.org>
parents:
35821
diff
changeset
|
32 (require 'vc)) |
35584 | 33 |
35569 | 34 ;;; |
33560 | 35 ;;; Customization options |
36 ;;; | |
37 | |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
38 (defcustom vc-cvs-register-switches nil |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
39 "*Extra switches for registering a file into CVS. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
40 A string or list of strings passed to the checkin program by |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
41 \\[vc-register]." |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
42 :type '(choice (const :tag "None" nil) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
43 (string :tag "Argument String") |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
44 (repeat :tag "Argument List" |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
45 :value ("") |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
46 string)) |
31475 | 47 :version "21.1" |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
48 :group 'vc) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
49 |
35821
6b1ff979e045
(vc-cvs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents:
35702
diff
changeset
|
50 (defcustom vc-cvs-diff-switches nil |
6b1ff979e045
(vc-cvs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents:
35702
diff
changeset
|
51 "*A string or list of strings specifying extra switches for cvs diff under VC." |
6b1ff979e045
(vc-cvs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents:
35702
diff
changeset
|
52 :type '(choice (const :tag "None" nil) |
6b1ff979e045
(vc-cvs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents:
35702
diff
changeset
|
53 (string :tag "Argument String") |
6b1ff979e045
(vc-cvs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents:
35702
diff
changeset
|
54 (repeat :tag "Argument List" |
6b1ff979e045
(vc-cvs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents:
35702
diff
changeset
|
55 :value ("") |
6b1ff979e045
(vc-cvs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents:
35702
diff
changeset
|
56 string)) |
6b1ff979e045
(vc-cvs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents:
35702
diff
changeset
|
57 :version "21.1" |
6b1ff979e045
(vc-cvs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents:
35702
diff
changeset
|
58 :group 'vc) |
6b1ff979e045
(vc-cvs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents:
35702
diff
changeset
|
59 |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
60 (defcustom vc-cvs-header (or (cdr (assoc 'CVS vc-header-alist)) '("\$Id\$")) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
61 "*Header keywords to be inserted by `vc-insert-headers'." |
31475 | 62 :version "21.1" |
35177 | 63 :type '(repeat string) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
64 :group 'vc) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
65 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
66 (defcustom vc-cvs-use-edit t |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
67 "*Non-nil means to use `cvs edit' to \"check out\" a file. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
68 This is only meaningful if you don't use the implicit checkout model |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
69 \(i.e. if you have $CVSREAD set)." |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
70 :type 'boolean |
31475 | 71 :version "21.1" |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
72 :group 'vc) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
73 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
74 (defcustom vc-cvs-stay-local t |
31475 | 75 "*Non-nil means use local operations when possible for remote repositories. |
38288
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
76 This avoids slow queries over the network and instead uses heuristics |
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
77 and past information to determine the current status of a file. |
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
78 The value can also be a regular expression to match against the host name |
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
79 of a repository; then VC only stays local for hosts that match it." |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
80 :type '(choice (const :tag "Always stay local" t) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
81 (string :tag "Host regexp") |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
82 (const :tag "Don't stay local" nil)) |
31475 | 83 :version "21.1" |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
84 :group 'vc) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
85 |
43447
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
86 (defcustom vc-cvs-sticky-date-format-string "%c" |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
87 "*Format string for mode-line display of sticky date. |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
88 Format is according to `format-time-string'. Only used if |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
89 `vc-cvs-sticky-tag-display' is t." |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
90 :type '(string) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
91 :version "21.3" |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
92 :group 'vc) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
93 |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
94 (defcustom vc-cvs-sticky-tag-display t |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
95 "*Specify the mode-line display of sticky tags. |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
96 Value t means default display, nil means no display at all. If the |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
97 value is a function or macro, it is called with the sticky tag and |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
98 its' type as parameters, in that order. TYPE can have three different |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
99 values: `symbolic-name' (TAG is a string), `revision-number' (TAG is a |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
100 string) and `date' (TAG is a date as returned by `encode-time'). The |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
101 return value of the function or macro will be displayed as a string. |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
102 |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
103 Here's an example that will display the formatted date for sticky |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
104 dates and the word \"Sticky\" for sticky tag names and revisions. |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
105 |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
106 (lambda (tag type) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
107 (cond ((eq type 'date) (format-time-string |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
108 vc-cvs-sticky-date-format-string tag)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
109 ((eq type 'revision-number) \"Sticky\") |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
110 ((eq type 'symbolic-name) \"Sticky\"))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
111 |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
112 Here's an example that will abbreviate to the first character only, |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
113 any text before the first occurence of `-' for sticky symbolic tags. |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
114 If the sticky tag is a revision number, the word \"Sticky\" is |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
115 displayed. Date and time is displayed for sticky dates. |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
116 |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
117 (lambda (tag type) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
118 (cond ((eq type 'date) (format-time-string \"%Y%m%d %H:%M\" tag)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
119 ((eq type 'revision-number) \"Sticky\") |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
120 ((eq type 'symbolic-name) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
121 (condition-case nil |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
122 (progn |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
123 (string-match \"\\\\([^-]*\\\\)\\\\(.*\\\\)\" tag) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
124 (concat (substring (match-string 1 tag) 0 1) \":\" |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
125 (substring (match-string 2 tag) 1 nil))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
126 (error tag))))) ; Fall-back to given tag name. |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
127 |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
128 See also variable `vc-cvs-sticky-date-format-string'." |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
129 :type '(choice boolean function) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
130 :version "21.3" |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
131 :group 'vc) |
35569 | 132 |
33560 | 133 ;;; |
134 ;;; Internal variables | |
135 ;;; | |
136 | |
137 (defvar vc-cvs-local-month-numbers | |
138 '(("Jan" . 1) ("Feb" . 2) ("Mar" . 3) ("Apr" . 4) | |
139 ("May" . 5) ("Jun" . 6) ("Jul" . 7) ("Aug" . 8) | |
140 ("Sep" . 9) ("Oct" . 10) ("Nov" . 11) ("Dec" . 12)) | |
141 "Local association list of month numbers.") | |
142 | |
35569 | 143 |
33560 | 144 ;;; |
35569 | 145 ;;; State-querying functions |
33560 | 146 ;;; |
147 | |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
148 ;;;###autoload (defun vc-cvs-registered (f) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
149 ;;;###autoload (when (file-readable-p (expand-file-name |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
150 ;;;###autoload "CVS/Entries" (file-name-directory f))) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
151 ;;;###autoload (require 'vc-cvs) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
152 ;;;###autoload (vc-cvs-registered f))) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
153 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
154 (defun vc-cvs-registered (file) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
155 "Check if FILE is CVS registered." |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
156 (let ((dirname (or (file-name-directory file) "")) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
157 (basename (file-name-nondirectory file)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
158 ;; make sure that the file name is searched case-sensitively |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
159 (case-fold-search nil)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
160 (if (file-readable-p (expand-file-name "CVS/Entries" dirname)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
161 (with-temp-buffer |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
162 (vc-insert-file (expand-file-name "CVS/Entries" dirname)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
163 (goto-char (point-min)) |
31475 | 164 (cond |
165 ((re-search-forward | |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
166 (concat "^/" (regexp-quote basename) "/") nil t) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
167 (beginning-of-line) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
168 (vc-cvs-parse-entry file) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
169 t) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
170 (t nil))) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
171 nil))) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
172 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
173 (defun vc-cvs-state (file) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
174 "CVS-specific version of `vc-state'." |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
175 (if (vc-cvs-stay-local-p file) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
176 (let ((state (vc-file-getprop file 'vc-state))) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
177 ;; If we should stay local, use the heuristic but only if |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
178 ;; we don't have a more precise state already available. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
179 (if (memq state '(up-to-date edited)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
180 (vc-cvs-state-heuristic file) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
181 state)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
182 (with-temp-buffer |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
183 (cd (file-name-directory file)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
184 (vc-do-command t 0 "cvs" file "status") |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
185 (vc-cvs-parse-status t)))) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
186 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
187 (defun vc-cvs-state-heuristic (file) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
188 "CVS-specific state heuristic." |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
189 ;; If the file has not changed since checkout, consider it `up-to-date'. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
190 ;; Otherwise consider it `edited'. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
191 (let ((checkout-time (vc-file-getprop file 'vc-checkout-time)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
192 (lastmod (nth 5 (file-attributes file)))) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
193 (if (equal checkout-time lastmod) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
194 'up-to-date |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
195 'edited))) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
196 |
33560 | 197 (defun vc-cvs-dir-state (dir) |
198 "Find the CVS state of all files in DIR." | |
199 (if (vc-cvs-stay-local-p dir) | |
200 (vc-cvs-dir-state-heuristic dir) | |
201 (let ((default-directory dir)) | |
202 ;; Don't specify DIR in this command, the default-directory is | |
203 ;; enough. Otherwise it might fail with remote repositories. | |
204 (with-temp-buffer | |
205 (vc-do-command t 0 "cvs" nil "status" "-l") | |
206 (goto-char (point-min)) | |
207 (while (re-search-forward "^=+\n\\([^=\n].*\n\\|\n\\)+" nil t) | |
208 (narrow-to-region (match-beginning 0) (match-end 0)) | |
209 (vc-cvs-parse-status) | |
210 (goto-char (point-max)) | |
211 (widen)))))) | |
212 | |
213 (defun vc-cvs-workfile-version (file) | |
214 "CVS-specific version of `vc-workfile-version'." | |
215 ;; There is no need to consult RCS headers under CVS, because we | |
216 ;; get the workfile version for free when we recognize that a file | |
217 ;; is registered in CVS. | |
218 (vc-cvs-registered file) | |
219 (vc-file-getprop file 'vc-workfile-version)) | |
220 | |
221 (defun vc-cvs-checkout-model (file) | |
222 "CVS-specific version of `vc-checkout-model'." | |
223 (if (or (getenv "CVSREAD") | |
224 ;; If the file is not writable (despite CVSREAD being | |
225 ;; undefined), this is probably because the file is being | |
226 ;; "watched" by other developers. | |
227 ;; (If vc-mistrust-permissions was t, we actually shouldn't | |
228 ;; trust this, but there is no other way to learn this from CVS | |
229 ;; at the moment (version 1.9).) | |
230 (string-match "r-..-..-." (nth 8 (file-attributes file)))) | |
231 'announce | |
232 'implicit)) | |
233 | |
31404
f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
31384
diff
changeset
|
234 (defun vc-cvs-mode-line-string (file) |
f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
31384
diff
changeset
|
235 "Return string for placement into the modeline for FILE. |
43447
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
236 Compared to the default implementation, this function does two things: |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
237 Handle the special case of a CVS file that is added but not yet |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
238 committed and support display of sticky tags." |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
239 (let* ((state (vc-state file)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
240 (rev (vc-workfile-version file)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
241 (sticky-tag (vc-file-getprop file 'vc-cvs-sticky-tag)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
242 (sticky-tag-printable (and sticky-tag |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
243 (not (string= sticky-tag "")) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
244 (concat "[" sticky-tag "]")))) |
31404
f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
31384
diff
changeset
|
245 (cond ((string= rev "0") |
35569 | 246 ;; A file that is added but not yet committed. |
31404
f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
31384
diff
changeset
|
247 "CVS @@") |
f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
31384
diff
changeset
|
248 ((or (eq state 'up-to-date) |
f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
31384
diff
changeset
|
249 (eq state 'needs-patch)) |
43447
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
250 (concat "CVS-" rev sticky-tag-printable)) |
31404
f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
31384
diff
changeset
|
251 ((stringp state) |
43447
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
252 (concat "CVS:" state ":" rev sticky-tag-printable)) |
31404
f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
31384
diff
changeset
|
253 (t |
f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
31384
diff
changeset
|
254 ;; Not just for the 'edited state, but also a fallback |
f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
31384
diff
changeset
|
255 ;; for all other states. Think about different symbols |
f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
31384
diff
changeset
|
256 ;; for 'needs-patch and 'needs-merge. |
43447
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
257 (concat "CVS:" rev sticky-tag-printable))))) |
31404
f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
31384
diff
changeset
|
258 |
33560 | 259 (defun vc-cvs-dired-state-info (file) |
260 "CVS-specific version of `vc-dired-state-info'." | |
261 (let* ((cvs-state (vc-state file)) | |
38288
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
262 (state (cond ((eq cvs-state 'edited) "modified") |
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
263 ((eq cvs-state 'needs-patch) "patch") |
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
264 ((eq cvs-state 'needs-merge) "merge") |
33560 | 265 ;; FIXME: those two states cannot occur right now |
38288
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
266 ((eq cvs-state 'unlocked-changes) "conflict") |
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
267 ((eq cvs-state 'locally-added) "added") |
33560 | 268 ))) |
269 (if state (concat "(" state ")")))) | |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
270 |
35569 | 271 |
33560 | 272 ;;; |
273 ;;; State-changing functions | |
274 ;;; | |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
275 |
33560 | 276 (defun vc-cvs-register (file &optional rev comment) |
277 "Register FILE into the CVS version-control system. | |
278 COMMENT can be used to provide an initial description of FILE. | |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
279 |
33560 | 280 `vc-register-switches' and `vc-cvs-register-switches' are passed to |
281 the CVS command (in that order)." | |
282 (let ((switches (list | |
283 (if (stringp vc-register-switches) | |
284 (list vc-register-switches) | |
285 vc-register-switches) | |
286 (if (stringp vc-cvs-register-switches) | |
287 (list vc-cvs-register-switches) | |
288 vc-cvs-register-switches)))) | |
35569 | 289 |
33560 | 290 (apply 'vc-do-command nil 0 "cvs" file |
291 "add" | |
292 (and comment (string-match "[^\t\n ]" comment) | |
293 (concat "-m" comment)) | |
294 switches))) | |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
295 |
33560 | 296 (defun vc-cvs-responsible-p (file) |
297 "Return non-nil if CVS thinks it is responsible for FILE." | |
298 (file-directory-p (expand-file-name "CVS" | |
299 (if (file-directory-p file) | |
300 file | |
301 (file-name-directory file))))) | |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
302 |
33560 | 303 (defun vc-cvs-could-register (file) |
304 "Return non-nil if FILE could be registered in CVS. | |
305 This is only possible if CVS is responsible for FILE's directory." | |
306 (vc-cvs-responsible-p file)) | |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
307 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
308 (defun vc-cvs-checkin (file rev comment) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
309 "CVS-specific version of `vc-backend-checkin'." |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
310 (let ((switches (if (stringp vc-checkin-switches) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
311 (list vc-checkin-switches) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
312 vc-checkin-switches)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
313 status) |
43447
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
314 (if (not rev) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
315 (setq status (apply 'vc-do-command nil 1 "cvs" file |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
316 "ci" (if rev (concat "-r" rev)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
317 (concat "-m" comment) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
318 switches)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
319 (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
320 (error "%s is not a valid symbolic tag name") |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
321 ;; If the input revison is a valid symbolic tag name, we create it |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
322 ;; as a branch, commit and switch to it. |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
323 (apply 'vc-do-command nil 0 "cvs" file "tag" "-b" (list rev)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
324 (apply 'vc-do-command nil 0 "cvs" file "update" "-r" (list rev)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
325 (setq status (apply 'vc-do-command nil 1 "cvs" file |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
326 "ci" |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
327 (concat "-m" comment) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
328 switches)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
329 (vc-file-setprop file 'vc-cvs-sticky-tag rev))) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
330 (set-buffer "*vc*") |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
331 (goto-char (point-min)) |
32948
3c95af2888f6
(vc-cvs-checkin): Check both status and error message after command.
André Spiegel <spiegel@gnu.org>
parents:
32747
diff
changeset
|
332 (when (not (zerop status)) |
3c95af2888f6
(vc-cvs-checkin): Check both status and error message after command.
André Spiegel <spiegel@gnu.org>
parents:
32747
diff
changeset
|
333 ;; Check checkin problem. |
3c95af2888f6
(vc-cvs-checkin): Check both status and error message after command.
André Spiegel <spiegel@gnu.org>
parents:
32747
diff
changeset
|
334 (cond |
3c95af2888f6
(vc-cvs-checkin): Check both status and error message after command.
André Spiegel <spiegel@gnu.org>
parents:
32747
diff
changeset
|
335 ((re-search-forward "Up-to-date check failed" nil t) |
3c95af2888f6
(vc-cvs-checkin): Check both status and error message after command.
André Spiegel <spiegel@gnu.org>
parents:
32747
diff
changeset
|
336 (vc-file-setprop file 'vc-state 'needs-merge) |
3c95af2888f6
(vc-cvs-checkin): Check both status and error message after command.
André Spiegel <spiegel@gnu.org>
parents:
32747
diff
changeset
|
337 (error (substitute-command-keys |
3c95af2888f6
(vc-cvs-checkin): Check both status and error message after command.
André Spiegel <spiegel@gnu.org>
parents:
32747
diff
changeset
|
338 (concat "Up-to-date check failed: " |
3c95af2888f6
(vc-cvs-checkin): Check both status and error message after command.
André Spiegel <spiegel@gnu.org>
parents:
32747
diff
changeset
|
339 "type \\[vc-next-action] to merge in changes")))) |
3c95af2888f6
(vc-cvs-checkin): Check both status and error message after command.
André Spiegel <spiegel@gnu.org>
parents:
32747
diff
changeset
|
340 (t |
3c95af2888f6
(vc-cvs-checkin): Check both status and error message after command.
André Spiegel <spiegel@gnu.org>
parents:
32747
diff
changeset
|
341 (pop-to-buffer (current-buffer)) |
3c95af2888f6
(vc-cvs-checkin): Check both status and error message after command.
André Spiegel <spiegel@gnu.org>
parents:
32747
diff
changeset
|
342 (goto-char (point-min)) |
3c95af2888f6
(vc-cvs-checkin): Check both status and error message after command.
André Spiegel <spiegel@gnu.org>
parents:
32747
diff
changeset
|
343 (shrink-window-if-larger-than-buffer) |
3c95af2888f6
(vc-cvs-checkin): Check both status and error message after command.
André Spiegel <spiegel@gnu.org>
parents:
32747
diff
changeset
|
344 (error "Check-in failed")))) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
345 ;; Update file properties |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
346 (vc-file-setprop |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
347 file 'vc-workfile-version |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
348 (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
349 ;; Forget the checkout model of the file, because we might have |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
350 ;; guessed wrong when we found the file. After commit, we can |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
351 ;; tell it from the permissions of the file (see |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
352 ;; vc-cvs-checkout-model). |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
353 (vc-file-setprop file 'vc-checkout-model nil) |
43447
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
354 |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
355 ;; if this was an explicit check-in (does not include creation of |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
356 ;; a branch), remove the sticky tag. |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
357 (if (and rev (not (vc-cvs-valid-symbolic-tag-name-p rev))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
358 (vc-do-command nil 0 "cvs" file "update" "-A")))) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
359 |
35132
78bce41f17c5
(vc-cvs-latest-on-branch-p): Removed.
André Spiegel <spiegel@gnu.org>
parents:
33637
diff
changeset
|
360 (defun vc-cvs-checkout (file &optional editable rev workfile) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
361 "Retrieve a revision of FILE into a WORKFILE. |
35132
78bce41f17c5
(vc-cvs-latest-on-branch-p): Removed.
André Spiegel <spiegel@gnu.org>
parents:
33637
diff
changeset
|
362 EDITABLE non-nil means that the file should be writable. |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
363 REV is the revision to check out into WORKFILE." |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
364 (let ((filename (or workfile file)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
365 (file-buffer (get-file-buffer file)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
366 switches) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
367 (message "Checking out %s..." filename) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
368 (save-excursion |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
369 ;; Change buffers to get local value of vc-checkout-switches. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
370 (if file-buffer (set-buffer file-buffer)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
371 (setq switches (if (stringp vc-checkout-switches) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
372 (list vc-checkout-switches) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
373 vc-checkout-switches)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
374 ;; Save this buffer's default-directory |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
375 ;; and use save-excursion to make sure it is restored |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
376 ;; in the same buffer it was saved in. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
377 (let ((default-directory default-directory)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
378 (save-excursion |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
379 ;; Adjust the default-directory so that the check-out creates |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
380 ;; the file in the right place. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
381 (setq default-directory (file-name-directory filename)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
382 (if workfile |
35569 | 383 (let ((failed t) |
33637
6cab2125de9c
(vc-cvs-checkout): Fix bug that broke C-x v ~-style checkouts.
André Spiegel <spiegel@gnu.org>
parents:
33560
diff
changeset
|
384 (backup-name (if (string= file workfile) |
33549
8a998774febc
(vc-cvs-revert): Use `cvs unedit' only if `vc-cvs-use-edit' is on.
André Spiegel <spiegel@gnu.org>
parents:
33545
diff
changeset
|
385 (car (find-backup-file-name filename))))) |
8a998774febc
(vc-cvs-revert): Use `cvs unedit' only if `vc-cvs-use-edit' is on.
André Spiegel <spiegel@gnu.org>
parents:
33545
diff
changeset
|
386 (when backup-name |
35569 | 387 (copy-file filename backup-name |
33549
8a998774febc
(vc-cvs-revert): Use `cvs unedit' only if `vc-cvs-use-edit' is on.
André Spiegel <spiegel@gnu.org>
parents:
33545
diff
changeset
|
388 'ok-if-already-exists 'keep-date) |
8a998774febc
(vc-cvs-revert): Use `cvs unedit' only if `vc-cvs-use-edit' is on.
André Spiegel <spiegel@gnu.org>
parents:
33545
diff
changeset
|
389 (unless (file-writable-p filename) |
8a998774febc
(vc-cvs-revert): Use `cvs unedit' only if `vc-cvs-use-edit' is on.
André Spiegel <spiegel@gnu.org>
parents:
33545
diff
changeset
|
390 (set-file-modes filename |
8a998774febc
(vc-cvs-revert): Use `cvs unedit' only if `vc-cvs-use-edit' is on.
André Spiegel <spiegel@gnu.org>
parents:
33545
diff
changeset
|
391 (logior (file-modes filename) 128)))) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
392 (unwind-protect |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
393 (progn |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
394 (let ((coding-system-for-read 'no-conversion) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
395 (coding-system-for-write 'no-conversion)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
396 (with-temp-file filename |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
397 (apply 'vc-do-command |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
398 (current-buffer) 0 "cvs" file |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
399 "-Q" ; suppress diagnostic output |
38288
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
400 "update" |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
401 (and rev (not (string= rev "")) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
402 (concat "-r" rev)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
403 "-p" |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
404 switches))) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
405 (setq failed nil)) |
35569 | 406 (if failed |
33637
6cab2125de9c
(vc-cvs-checkout): Fix bug that broke C-x v ~-style checkouts.
André Spiegel <spiegel@gnu.org>
parents:
33560
diff
changeset
|
407 (if backup-name |
35569 | 408 (rename-file backup-name filename |
33637
6cab2125de9c
(vc-cvs-checkout): Fix bug that broke C-x v ~-style checkouts.
André Spiegel <spiegel@gnu.org>
parents:
33560
diff
changeset
|
409 'ok-if-already-exists) |
6cab2125de9c
(vc-cvs-checkout): Fix bug that broke C-x v ~-style checkouts.
André Spiegel <spiegel@gnu.org>
parents:
33560
diff
changeset
|
410 (if (file-exists-p filename) |
6cab2125de9c
(vc-cvs-checkout): Fix bug that broke C-x v ~-style checkouts.
André Spiegel <spiegel@gnu.org>
parents:
33560
diff
changeset
|
411 (delete-file filename))) |
33549
8a998774febc
(vc-cvs-revert): Use `cvs unedit' only if `vc-cvs-use-edit' is on.
André Spiegel <spiegel@gnu.org>
parents:
33545
diff
changeset
|
412 (and backup-name |
8a998774febc
(vc-cvs-revert): Use `cvs unedit' only if `vc-cvs-use-edit' is on.
André Spiegel <spiegel@gnu.org>
parents:
33545
diff
changeset
|
413 (not vc-make-backup-files) |
8a998774febc
(vc-cvs-revert): Use `cvs unedit' only if `vc-cvs-use-edit' is on.
André Spiegel <spiegel@gnu.org>
parents:
33545
diff
changeset
|
414 (delete-file backup-name))))) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
415 (if (and (file-exists-p file) (not rev)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
416 ;; If no revision was specified, just make the file writable |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
417 ;; if necessary (using `cvs-edit' if requested). |
38288
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
418 (and editable (not (eq (vc-cvs-checkout-model file) 'implicit)) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
419 (if vc-cvs-use-edit |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
420 (vc-do-command nil 0 "cvs" file "edit") |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
421 (set-file-modes file (logior (file-modes file) 128)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
422 (if file-buffer (toggle-read-only -1)))) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
423 ;; Check out a particular version (or recreate the file). |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
424 (vc-file-setprop file 'vc-workfile-version nil) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
425 (apply 'vc-do-command nil 0 "cvs" file |
38288
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
426 (and editable |
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
427 (or (not (file-exists-p file)) |
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
428 (not (eq (vc-cvs-checkout-model file) |
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
429 'implicit))) |
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
430 "-w") |
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
431 "update" |
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
432 ;; default for verbose checkout: clear the sticky tag so |
6934c28c6bc5
(vc-cvs-stay-local): doc fix.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
37358
diff
changeset
|
433 ;; that the actual update will get the head of the trunk |
31475 | 434 (if (or (not rev) (string= rev "")) |
435 "-A" | |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
436 (concat "-r" rev)) |
31404
f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
31384
diff
changeset
|
437 switches)))) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
438 (vc-mode-line file) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
439 (message "Checking out %s...done" filename))))) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
440 |
39001
d13c2139752b
(vc-*-revert-file): Handle new optional arg CONTENTS-DONE.
André Spiegel <spiegel@gnu.org>
parents:
38288
diff
changeset
|
441 (defun vc-cvs-revert (file &optional contents-done) |
33560 | 442 "Revert FILE to the version it was based on." |
39001
d13c2139752b
(vc-*-revert-file): Handle new optional arg CONTENTS-DONE.
André Spiegel <spiegel@gnu.org>
parents:
38288
diff
changeset
|
443 (unless contents-done |
d13c2139752b
(vc-*-revert-file): Handle new optional arg CONTENTS-DONE.
André Spiegel <spiegel@gnu.org>
parents:
38288
diff
changeset
|
444 ;; Check out via standard output (caused by the final argument |
d13c2139752b
(vc-*-revert-file): Handle new optional arg CONTENTS-DONE.
André Spiegel <spiegel@gnu.org>
parents:
38288
diff
changeset
|
445 ;; FILE below), so that no sticky tag is set. |
d13c2139752b
(vc-*-revert-file): Handle new optional arg CONTENTS-DONE.
André Spiegel <spiegel@gnu.org>
parents:
38288
diff
changeset
|
446 (vc-cvs-checkout file nil (vc-workfile-version file) file)) |
d13c2139752b
(vc-*-revert-file): Handle new optional arg CONTENTS-DONE.
André Spiegel <spiegel@gnu.org>
parents:
38288
diff
changeset
|
447 (unless (eq (vc-checkout-model file) 'implicit) |
d13c2139752b
(vc-*-revert-file): Handle new optional arg CONTENTS-DONE.
André Spiegel <spiegel@gnu.org>
parents:
38288
diff
changeset
|
448 (if vc-cvs-use-edit |
d13c2139752b
(vc-*-revert-file): Handle new optional arg CONTENTS-DONE.
André Spiegel <spiegel@gnu.org>
parents:
38288
diff
changeset
|
449 (vc-do-command nil 0 "cvs" file "unedit") |
d13c2139752b
(vc-*-revert-file): Handle new optional arg CONTENTS-DONE.
André Spiegel <spiegel@gnu.org>
parents:
38288
diff
changeset
|
450 ;; Make the file read-only by switching off all w-bits |
d13c2139752b
(vc-*-revert-file): Handle new optional arg CONTENTS-DONE.
André Spiegel <spiegel@gnu.org>
parents:
38288
diff
changeset
|
451 (set-file-modes file (logand (file-modes file) 3950))))) |
33560 | 452 |
453 (defun vc-cvs-merge (file first-version &optional second-version) | |
454 "Merge changes into current working copy of FILE. | |
455 The changes are between FIRST-VERSION and SECOND-VERSION." | |
456 (vc-do-command nil 0 "cvs" file | |
457 "update" "-kk" | |
458 (concat "-j" first-version) | |
459 (concat "-j" second-version)) | |
460 (vc-file-setprop file 'vc-state 'edited) | |
461 (save-excursion | |
462 (set-buffer (get-buffer "*vc*")) | |
463 (goto-char (point-min)) | |
464 (if (re-search-forward "conflicts during merge" nil t) | |
465 1 ; signal error | |
466 0))) ; signal success | |
467 | |
468 (defun vc-cvs-merge-news (file) | |
469 "Merge in any new changes made to FILE." | |
470 (message "Merging changes into %s..." file) | |
471 (save-excursion | |
472 ;; (vc-file-setprop file 'vc-workfile-version nil) | |
473 (vc-file-setprop file 'vc-checkout-time 0) | |
474 (vc-do-command nil 0 "cvs" file "update") | |
475 ;; Analyze the merge result reported by CVS, and set | |
476 ;; file properties accordingly. | |
477 (set-buffer (get-buffer "*vc*")) | |
478 (goto-char (point-min)) | |
479 ;; get new workfile version | |
480 (if (re-search-forward (concat "^Merging differences between " | |
481 "[01234567890.]* and " | |
482 "\\([01234567890.]*\\) into") | |
483 nil t) | |
484 (vc-file-setprop file 'vc-workfile-version (match-string 1)) | |
485 (vc-file-setprop file 'vc-workfile-version nil)) | |
486 ;; get file status | |
487 (prog1 | |
488 (if (eq (buffer-size) 0) | |
489 0 ;; there were no news; indicate success | |
490 (if (re-search-forward | |
491 (concat "^\\([CMUP] \\)?" | |
492 (regexp-quote (file-name-nondirectory file)) | |
493 "\\( already contains the differences between \\)?") | |
494 nil t) | |
495 (cond | |
496 ;; Merge successful, we are in sync with repository now | |
497 ((or (match-string 2) | |
498 (string= (match-string 1) "U ") | |
499 (string= (match-string 1) "P ")) | |
500 (vc-file-setprop file 'vc-state 'up-to-date) | |
501 (vc-file-setprop file 'vc-checkout-time | |
502 (nth 5 (file-attributes file))) | |
503 0);; indicate success to the caller | |
504 ;; Merge successful, but our own changes are still in the file | |
505 ((string= (match-string 1) "M ") | |
506 (vc-file-setprop file 'vc-state 'edited) | |
507 0);; indicate success to the caller | |
508 ;; Conflicts detected! | |
509 (t | |
510 (vc-file-setprop file 'vc-state 'edited) | |
511 1);; signal the error to the caller | |
512 ) | |
513 (pop-to-buffer "*vc*") | |
514 (error "Couldn't analyze cvs update result"))) | |
515 (message "Merging changes into %s...done" file)))) | |
516 | |
35569 | 517 |
33560 | 518 ;;; |
519 ;;; History functions | |
520 ;;; | |
521 | |
522 (defun vc-cvs-print-log (file) | |
523 "Get change log associated with FILE." | |
37358
ae55f4048b3b
(vc-cvs-print-log, vc-cvs-diff): Don't invoke CVS as
Eli Zaretskii <eliz@gnu.org>
parents:
36711
diff
changeset
|
524 (vc-do-command |
ae55f4048b3b
(vc-cvs-print-log, vc-cvs-diff): Don't invoke CVS as
Eli Zaretskii <eliz@gnu.org>
parents:
36711
diff
changeset
|
525 nil |
ae55f4048b3b
(vc-cvs-print-log, vc-cvs-diff): Don't invoke CVS as
Eli Zaretskii <eliz@gnu.org>
parents:
36711
diff
changeset
|
526 (if (and (vc-cvs-stay-local-p file) (fboundp 'start-process)) 'async 0) |
ae55f4048b3b
(vc-cvs-print-log, vc-cvs-diff): Don't invoke CVS as
Eli Zaretskii <eliz@gnu.org>
parents:
36711
diff
changeset
|
527 "cvs" file "log")) |
33560 | 528 |
529 (defun vc-cvs-show-log-entry (version) | |
530 (when (re-search-forward | |
531 ;; also match some context, for safety | |
532 (concat "----\nrevision " version | |
533 "\\(\tlocked by:.*\n\\|\n\\)date: ") nil t) | |
534 ;; set the display window so that | |
535 ;; the whole log entry is displayed | |
536 (let (start end lines) | |
537 (beginning-of-line) (forward-line -1) (setq start (point)) | |
538 (if (not (re-search-forward "^----*\nrevision" nil t)) | |
539 (setq end (point-max)) | |
540 (beginning-of-line) (forward-line -1) (setq end (point))) | |
541 (setq lines (count-lines start end)) | |
542 (cond | |
543 ;; if the global information and this log entry fit | |
544 ;; into the window, display from the beginning | |
545 ((< (count-lines (point-min) end) (window-height)) | |
546 (goto-char (point-min)) | |
547 (recenter 0) | |
548 (goto-char start)) | |
549 ;; if the whole entry fits into the window, | |
550 ;; display it centered | |
551 ((< (1+ lines) (window-height)) | |
552 (goto-char start) | |
553 (recenter (1- (- (/ (window-height) 2) (/ lines 2))))) | |
554 ;; otherwise (the entry is too large for the window), | |
555 ;; display from the start | |
556 (t | |
557 (goto-char start) | |
558 (recenter 0)))))) | |
559 | |
560 (defun vc-cvs-diff (file &optional oldvers newvers) | |
561 "Get a difference report using CVS between two versions of FILE." | |
43533
d4dab5e8395f
(vc-cvs-diff, vc-cvs-diff-tree): Use consistent parameter format for
André Spiegel <spiegel@gnu.org>
parents:
43447
diff
changeset
|
562 (let (options status (diff-switches-list (vc-diff-switches-list 'CVS))) |
33560 | 563 (if (string= (vc-workfile-version file) "0") |
564 ;; This file is added but not yet committed; there is no master file. | |
565 (if (or oldvers newvers) | |
566 (error "No revisions of %s exist" file) | |
567 ;; we regard this as "changed". | |
568 ;; diff it against /dev/null. | |
36711
22fd463447c3
(vc-cvs-checkin): When removing the sticky tag, make output go to
André Spiegel <spiegel@gnu.org>
parents:
35839
diff
changeset
|
569 (apply 'vc-do-command "*vc-diff*" |
33560 | 570 1 "diff" file |
571 (append diff-switches-list '("/dev/null")))) | |
572 (setq status | |
36711
22fd463447c3
(vc-cvs-checkin): When removing the sticky tag, make output go to
André Spiegel <spiegel@gnu.org>
parents:
35839
diff
changeset
|
573 (apply 'vc-do-command "*vc-diff*" |
37358
ae55f4048b3b
(vc-cvs-print-log, vc-cvs-diff): Don't invoke CVS as
Eli Zaretskii <eliz@gnu.org>
parents:
36711
diff
changeset
|
574 (if (and (vc-cvs-stay-local-p file) |
ae55f4048b3b
(vc-cvs-print-log, vc-cvs-diff): Don't invoke CVS as
Eli Zaretskii <eliz@gnu.org>
parents:
36711
diff
changeset
|
575 (fboundp 'start-process)) |
ae55f4048b3b
(vc-cvs-print-log, vc-cvs-diff): Don't invoke CVS as
Eli Zaretskii <eliz@gnu.org>
parents:
36711
diff
changeset
|
576 'async |
ae55f4048b3b
(vc-cvs-print-log, vc-cvs-diff): Don't invoke CVS as
Eli Zaretskii <eliz@gnu.org>
parents:
36711
diff
changeset
|
577 1) |
33560 | 578 "cvs" file "diff" |
579 (and oldvers (concat "-r" oldvers)) | |
580 (and newvers (concat "-r" newvers)) | |
581 diff-switches-list)) | |
35569 | 582 (if (vc-cvs-stay-local-p file) |
583 1 ;; async diff, pessimistic assumption | |
33560 | 584 status)))) |
585 | |
40125
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
586 (defun vc-cvs-diff-tree (dir &optional rev1 rev2) |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
587 "Diff all files at and below DIR." |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
588 (with-current-buffer "*vc-diff*" |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
589 (setq default-directory dir) |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
590 (if (vc-cvs-stay-local-p dir) |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
591 ;; local diff: do it filewise, and only for files that are modified |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
592 (vc-file-tree-walk |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
593 dir |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
594 (lambda (f) |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
595 (vc-exec-after |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
596 `(let ((coding-system-for-read (vc-coding-system-for-diff ',f))) |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
597 ;; possible optimization: fetch the state of all files |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
598 ;; in the tree via vc-cvs-dir-state-heuristic |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
599 (unless (vc-up-to-date-p ',f) |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
600 (message "Looking at %s" ',f) |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
601 (vc-diff-internal ',f ',rel1 ',rel2)))))) |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
602 ;; cvs diff: use a single call for the entire tree |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
603 (let ((coding-system-for-read |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
604 (or coding-system-for-read 'undecided))) |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
605 (apply 'vc-do-command "*vc-diff*" 1 "cvs" nil "diff" |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
606 (and rel1 (concat "-r" rel1)) |
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
607 (and rel2 (concat "-r" rel2)) |
43533
d4dab5e8395f
(vc-cvs-diff, vc-cvs-diff-tree): Use consistent parameter format for
André Spiegel <spiegel@gnu.org>
parents:
43447
diff
changeset
|
608 (vc-diff-switches-list 'CVS)))))) |
40125
b2e4b1a5315a
(vc-cvs-diff-tree): New function.
André Spiegel <spiegel@gnu.org>
parents:
39001
diff
changeset
|
609 |
33545
5411250e7971
(vc-cvs-annotate-command): New optional arg VERSION. Use
André Spiegel <spiegel@gnu.org>
parents:
32959
diff
changeset
|
610 (defun vc-cvs-annotate-command (file buffer &optional version) |
5411250e7971
(vc-cvs-annotate-command): New optional arg VERSION. Use
André Spiegel <spiegel@gnu.org>
parents:
32959
diff
changeset
|
611 "Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER. |
5411250e7971
(vc-cvs-annotate-command): New optional arg VERSION. Use
André Spiegel <spiegel@gnu.org>
parents:
32959
diff
changeset
|
612 Optional arg VERSION is a version to annotate from." |
5411250e7971
(vc-cvs-annotate-command): New optional arg VERSION. Use
André Spiegel <spiegel@gnu.org>
parents:
32959
diff
changeset
|
613 (vc-do-command buffer 0 "cvs" file "annotate" (if version |
5411250e7971
(vc-cvs-annotate-command): New optional arg VERSION. Use
André Spiegel <spiegel@gnu.org>
parents:
32959
diff
changeset
|
614 (concat "-r" version)))) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
615 |
40171
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
616 (defun vc-cvs-annotate-current-time () |
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
617 "Return the current time, based at midnight of the current day, and |
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
618 encoded as fractional days." |
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
619 (vc-annotate-convert-time |
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
620 (apply 'encode-time 0 0 0 (nthcdr 3 (decode-time (current-time)))))) |
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
621 |
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
622 (defun vc-cvs-annotate-time () |
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
623 "Return the time of the next annotation (as fraction of days) |
42206 | 624 systime, or nil if there is none." |
40171
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
625 (let ((time-stamp |
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
626 "^\\S-+\\s-+\\S-+\\s-+\\([0-9]+\\)-\\(\\sw+\\)-\\([0-9]+\\)): ")) |
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
627 (if (looking-at time-stamp) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
628 (progn |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
629 (let* ((day (string-to-number (match-string 1))) |
40171
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
630 (month (cdr (assoc (match-string 2) |
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
631 vc-cvs-local-month-numbers))) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
632 (year-tmp (string-to-number (match-string 3))) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
633 ;; Years 0..68 are 2000..2068. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
634 ;; Years 69..99 are 1969..1999. |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
635 (year (+ (cond ((> 69 year-tmp) 2000) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
636 ((> 100 year-tmp) 1900) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
637 (t 0)) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
638 year-tmp))) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
639 (goto-char (match-end 0)) ; Position at end makes for nicer overlay result |
40171
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
640 (vc-annotate-convert-time (encode-time 0 0 0 day month year)))) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
641 ;; If we did not look directly at an annotation, there might be |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
642 ;; some further down. This is the case if we are positioned at |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
643 ;; the very top of the buffer, for instance. |
40171
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
644 (if (re-search-forward time-stamp nil t) |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
645 (progn |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
646 (beginning-of-line nil) |
40171
91eda91380cb
New scaling algorithm for vc-annotate.
André Spiegel <spiegel@gnu.org>
parents:
40125
diff
changeset
|
647 (vc-cvs-annotate-time)))))) |
35569 | 648 |
33560 | 649 ;;; |
650 ;;; Snapshot system | |
651 ;;; | |
652 | |
653 (defun vc-cvs-create-snapshot (dir name branchp) | |
654 "Assign to DIR's current version a given NAME. | |
655 If BRANCHP is non-nil, the name is created as a branch (and the current | |
656 workspace is immediately moved to that new branch)." | |
657 (vc-do-command nil 0 "cvs" dir "tag" "-c" (if branchp "-b") name) | |
658 (when branchp (vc-do-command nil 0 "cvs" dir "update" "-r" name))) | |
659 | |
660 (defun vc-cvs-retrieve-snapshot (dir name update) | |
661 "Retrieve a snapshot at and below DIR. | |
662 NAME is the name of the snapshot; if it is empty, do a `cvs update'. | |
663 If UPDATE is non-nil, then update (resynch) any affected buffers." | |
664 (with-current-buffer (get-buffer-create "*vc*") | |
43447
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
665 (let ((default-directory dir) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
666 (sticky-tag)) |
33560 | 667 (erase-buffer) |
668 (if (or (not name) (string= name "")) | |
669 (vc-do-command t 0 "cvs" nil "update") | |
43447
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
670 (vc-do-command t 0 "cvs" nil "update" "-r" name) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
671 (setq sticky-tag name)) |
33560 | 672 (when update |
673 (goto-char (point-min)) | |
674 (while (not (eobp)) | |
675 (if (looking-at "\\([CMUP]\\) \\(.*\\)") | |
676 (let* ((file (expand-file-name (match-string 2) dir)) | |
677 (state (match-string 1)) | |
678 (buffer (find-buffer-visiting file))) | |
679 (when buffer | |
680 (cond | |
681 ((or (string= state "U") | |
682 (string= state "P")) | |
683 (vc-file-setprop file 'vc-state 'up-to-date) | |
684 (vc-file-setprop file 'vc-workfile-version nil) | |
685 (vc-file-setprop file 'vc-checkout-time | |
686 (nth 5 (file-attributes file)))) | |
687 ((or (string= state "M") | |
688 (string= state "C")) | |
689 (vc-file-setprop file 'vc-state 'edited) | |
690 (vc-file-setprop file 'vc-workfile-version nil) | |
691 (vc-file-setprop file 'vc-checkout-time 0))) | |
43447
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
692 (vc-file-setprop file 'vc-cvs-sticky-tag sticky-tag) |
33560 | 693 (vc-resynch-buffer file t t)))) |
694 (forward-line 1)))))) | |
695 | |
35569 | 696 |
33560 | 697 ;;; |
698 ;;; Miscellaneous | |
699 ;;; | |
700 | |
701 (defun vc-cvs-make-version-backups-p (file) | |
702 "Return non-nil if version backups should be made for FILE." | |
703 (vc-cvs-stay-local-p file)) | |
704 | |
705 (defun vc-cvs-check-headers () | |
706 "Check if the current file has any headers in it." | |
707 (save-excursion | |
708 (goto-char (point-min)) | |
709 (re-search-forward "\\$[A-Za-z\300-\326\330-\366\370-\377]+\ | |
710 \\(: [\t -#%-\176\240-\377]*\\)?\\$" nil t))) | |
711 | |
35569 | 712 |
33560 | 713 ;;; |
714 ;;; Internal functions | |
715 ;;; | |
716 | |
717 (defun vc-cvs-stay-local-p (file) | |
718 "Return non-nil if VC should stay local when handling FILE." | |
719 (if vc-cvs-stay-local | |
720 (let* ((dirname (if (file-directory-p file) | |
721 (directory-file-name file) | |
722 (file-name-directory file))) | |
723 (prop | |
724 (or (vc-file-getprop dirname 'vc-cvs-stay-local-p) | |
725 (let ((rootname (expand-file-name "CVS/Root" dirname))) | |
726 (vc-file-setprop | |
727 dirname 'vc-cvs-stay-local-p | |
728 (when (file-readable-p rootname) | |
729 (with-temp-buffer | |
730 (vc-insert-file rootname) | |
731 (goto-char (point-min)) | |
732 (if (looking-at "\\([^:]*\\):") | |
733 (if (not (stringp vc-cvs-stay-local)) | |
734 'yes | |
735 (let ((hostname (match-string 1))) | |
736 (if (string-match vc-cvs-stay-local hostname) | |
737 'yes | |
738 'no))) | |
739 'no)))))))) | |
740 (if (eq prop 'yes) t nil)))) | |
741 | |
742 (defun vc-cvs-parse-status (&optional full) | |
743 "Parse output of \"cvs status\" command in the current buffer. | |
744 Set file properties accordingly. Unless FULL is t, parse only | |
745 essential information." | |
746 (let (file status) | |
747 (goto-char (point-min)) | |
748 (if (re-search-forward "^File: " nil t) | |
749 (cond | |
750 ((looking-at "no file") nil) | |
751 ((re-search-forward "\\=\\([^ \t]+\\)" nil t) | |
752 (setq file (expand-file-name (match-string 1))) | |
753 (vc-file-setprop file 'vc-backend 'CVS) | |
754 (if (not (re-search-forward "\\=[ \t]+Status: \\(.*\\)" nil t)) | |
755 (setq status "Unknown") | |
756 (setq status (match-string 1))) | |
757 (if (and full | |
758 (re-search-forward | |
41707
94df6eb103b3
(vc-cvs-parse-status): Store file state in property, don't just return
André Spiegel <spiegel@gnu.org>
parents:
41520
diff
changeset
|
759 "\\(RCS Version\\|RCS Revision\\|Repository revision\\):\ |
33560 | 760 \[\t ]+\\([0-9.]+\\)" |
761 nil t)) | |
762 (vc-file-setprop file 'vc-latest-version (match-string 2))) | |
41707
94df6eb103b3
(vc-cvs-parse-status): Store file state in property, don't just return
André Spiegel <spiegel@gnu.org>
parents:
41520
diff
changeset
|
763 (vc-file-setprop |
94df6eb103b3
(vc-cvs-parse-status): Store file state in property, don't just return
André Spiegel <spiegel@gnu.org>
parents:
41520
diff
changeset
|
764 file 'vc-state |
94df6eb103b3
(vc-cvs-parse-status): Store file state in property, don't just return
André Spiegel <spiegel@gnu.org>
parents:
41520
diff
changeset
|
765 (cond |
94df6eb103b3
(vc-cvs-parse-status): Store file state in property, don't just return
André Spiegel <spiegel@gnu.org>
parents:
41520
diff
changeset
|
766 ((string-match "Up-to-date" status) |
94df6eb103b3
(vc-cvs-parse-status): Store file state in property, don't just return
André Spiegel <spiegel@gnu.org>
parents:
41520
diff
changeset
|
767 (vc-file-setprop file 'vc-checkout-time |
94df6eb103b3
(vc-cvs-parse-status): Store file state in property, don't just return
André Spiegel <spiegel@gnu.org>
parents:
41520
diff
changeset
|
768 (nth 5 (file-attributes file))) |
94df6eb103b3
(vc-cvs-parse-status): Store file state in property, don't just return
André Spiegel <spiegel@gnu.org>
parents:
41520
diff
changeset
|
769 'up-to-date) |
94df6eb103b3
(vc-cvs-parse-status): Store file state in property, don't just return
André Spiegel <spiegel@gnu.org>
parents:
41520
diff
changeset
|
770 ((string-match "Locally Modified" status) 'edited) |
94df6eb103b3
(vc-cvs-parse-status): Store file state in property, don't just return
André Spiegel <spiegel@gnu.org>
parents:
41520
diff
changeset
|
771 ((string-match "Needs Merge" status) 'needs-merge) |
94df6eb103b3
(vc-cvs-parse-status): Store file state in property, don't just return
André Spiegel <spiegel@gnu.org>
parents:
41520
diff
changeset
|
772 ((string-match "Needs \\(Checkout\\|Patch\\)" status) 'needs-patch) |
94df6eb103b3
(vc-cvs-parse-status): Store file state in property, don't just return
André Spiegel <spiegel@gnu.org>
parents:
41520
diff
changeset
|
773 (t 'edited)))))))) |
33560 | 774 |
775 (defun vc-cvs-dir-state-heuristic (dir) | |
776 "Find the CVS state of all files in DIR, using only local information." | |
777 (with-temp-buffer | |
778 (vc-insert-file (expand-file-name "CVS/Entries" dir)) | |
779 (goto-char (point-min)) | |
780 (while (not (eobp)) | |
781 (when (looking-at "/\\([^/]*\\)/") | |
782 (let ((file (expand-file-name (match-string 1) dir))) | |
783 (unless (vc-file-getprop file 'vc-state) | |
784 (vc-cvs-parse-entry file t)))) | |
785 (forward-line 1)))) | |
786 | |
43447
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
787 |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
788 (defun vc-cvs-valid-symbolic-tag-name-p (tag) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
789 "Return non-nil if TAG is a valid symbolic tag name." |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
790 ;; According to the CVS manual, a valid symbolic tag must start with |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
791 ;; an uppercase or lowercase letter and can contain uppercase and |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
792 ;; lowercase letters, digits, `-', and `_'. |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
793 (and (string-match "^[a-zA-Z]" tag) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
794 (not (string-match "[^a-z0-9A-Z-_]" tag)))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
795 |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
796 |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
797 (defun vc-cvs-parse-sticky-tag (match-type match-tag) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
798 "Parse and return the sticky tag as a string. |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
799 `match-data' is protected." |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
800 (let ((data (match-data)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
801 (tag) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
802 (type (cond ((string= match-type "D") 'date) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
803 ((string= match-type "T") |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
804 (if (vc-cvs-valid-symbolic-tag-name-p match-tag) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
805 'symbolic-name |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
806 'revision-number)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
807 (t nil)))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
808 (unwind-protect |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
809 (progn |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
810 (cond |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
811 ;; Sticky Date tag. Convert to to a proper date value (`encode-time') |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
812 ((eq type 'date) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
813 (string-match |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
814 "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)" |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
815 match-tag) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
816 (let* ((year-tmp (string-to-number (match-string 1 match-tag))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
817 (month (string-to-number (match-string 2 match-tag))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
818 (day (string-to-number (match-string 3 match-tag))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
819 (hour (string-to-number (match-string 4 match-tag))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
820 (min (string-to-number (match-string 5 match-tag))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
821 (sec (string-to-number (match-string 6 match-tag))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
822 ;; Years 0..68 are 2000..2068. |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
823 ;; Years 69..99 are 1969..1999. |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
824 (year (+ (cond ((> 69 year-tmp) 2000) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
825 ((> 100 year-tmp) 1900) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
826 (t 0)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
827 year-tmp))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
828 (setq tag (encode-time sec min hour day month year)))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
829 ;; Sticky Tag name or revision number |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
830 ((eq type 'symbolic-name) (setq tag match-tag)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
831 ((eq type 'revision-number) (setq tag match-tag)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
832 ;; Default is no sticky tag at all |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
833 (t nil)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
834 (cond ((eq vc-cvs-sticky-tag-display nil) nil) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
835 ((eq vc-cvs-sticky-tag-display t) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
836 (cond ((eq type 'date) (format-time-string |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
837 vc-cvs-sticky-date-format-string |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
838 tag)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
839 ((eq type 'symbolic-name) tag) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
840 ((eq type 'revision-number) tag) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
841 (t nil))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
842 ((functionp vc-cvs-sticky-tag-display) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
843 (funcall vc-cvs-sticky-tag-display tag type)) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
844 (t nil))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
845 |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
846 (set-match-data data)))) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
847 |
33560 | 848 (defun vc-cvs-parse-entry (file &optional set-state) |
849 "Parse a line from CVS/Entries. | |
850 Compare modification time to that of the FILE, set file properties | |
851 accordingly. However, `vc-state' is set only if optional arg SET-STATE | |
852 is non-nil." | |
853 (cond | |
854 ;; entry for a "locally added" file (not yet committed) | |
855 ((looking-at "/[^/]+/0/") | |
856 (vc-file-setprop file 'vc-checkout-time 0) | |
857 (vc-file-setprop file 'vc-workfile-version "0") | |
858 (if set-state (vc-file-setprop file 'vc-state 'edited))) | |
859 ;; normal entry | |
860 ((looking-at | |
861 (concat "/[^/]+" | |
862 ;; revision | |
863 "/\\([^/]*\\)" | |
864 ;; timestamp | |
43447
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
865 "/\\([^/]*\\)" |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
866 ;; optional conflict field |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
867 "\\(+[^/]*\\)?/" |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
868 ;; options |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
869 "\\([^/]*\\)/" |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
870 ;; sticky tag |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
871 "\\(.\\|\\)" ;Sticky tag type (date or tag name, could be empty) |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
872 "\\(.*\\)")) ;Sticky tag |
33560 | 873 (vc-file-setprop file 'vc-workfile-version (match-string 1)) |
43447
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
874 (vc-file-setprop file 'vc-cvs-sticky-tag |
79cf46e34420
Patch by Martin.Lorentzson@telia.com.
André Spiegel <spiegel@gnu.org>
parents:
42657
diff
changeset
|
875 (vc-cvs-parse-sticky-tag (match-string 5) (match-string 6))) |
33560 | 876 ;; compare checkout time and modification time |
41520
143b4b27b6c9
(vc-cvs-parse-entry): Rewrite, comparing the string-
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
40171
diff
changeset
|
877 (let ((mtime (nth 5 (file-attributes file))) |
143b4b27b6c9
(vc-cvs-parse-entry): Rewrite, comparing the string-
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
40171
diff
changeset
|
878 (system-time-locale "C")) |
143b4b27b6c9
(vc-cvs-parse-entry): Rewrite, comparing the string-
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
40171
diff
changeset
|
879 (cond ((equal (format-time-string "%c" mtime 'utc) (match-string 2)) |
33560 | 880 (vc-file-setprop file 'vc-checkout-time mtime) |
881 (if set-state (vc-file-setprop file 'vc-state 'up-to-date))) | |
882 (t | |
883 (vc-file-setprop file 'vc-checkout-time 0) | |
41520
143b4b27b6c9
(vc-cvs-parse-entry): Rewrite, comparing the string-
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
40171
diff
changeset
|
884 (if set-state (vc-file-setprop file 'vc-state 'edited)))))))) |
143b4b27b6c9
(vc-cvs-parse-entry): Rewrite, comparing the string-
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
40171
diff
changeset
|
885 |
31384
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
886 (provide 'vc-cvs) |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
887 |
f6cb7dfe5e7c
(vc-cvs-show-log-entry): New function.
Gerd Moellmann <gerd@gnu.org>
parents:
diff
changeset
|
888 ;;; vc-cvs.el ends here |