annotate lisp/vc-sccs.el @ 35830:037d66685778

Copyright up-date.
author Dave Love <fx@gnu.org>
date Thu, 01 Feb 2001 17:42:44 +0000
parents 9396894025fa
children e7e3ef788639
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1 ;;; vc-sccs.el --- support for SCCS version-control
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2
35830
037d66685778 Copyright up-date.
Dave Love <fx@gnu.org>
parents: 35823
diff changeset
3 ;; Copyright (C) 1992,93,94,95,96,97,98,99,2000,2001 Free Software Foundation, Inc.
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5 ;; Author: FSF (see vc.el for full credits)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
7
35830
037d66685778 Copyright up-date.
Dave Love <fx@gnu.org>
parents: 35823
diff changeset
8 ;; $Id: vc-sccs.el,v 1.8 2001/02/01 15:12:35 spiegel Exp $
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
9
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
11
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
15 ;; any later version.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
16
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
20 ;; GNU General Public License for more details.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
21
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
25 ;; Boston, MA 02111-1307, USA.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
26
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
27 ;;; Commentary:
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
28
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
29 ;;; Code:
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
30
35823
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
31 (eval-when-compile
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
32 (require 'vc))
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
33
33560
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
34 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
35 ;;; Customization options
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
36 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
37
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
38 (defcustom vc-sccs-register-switches nil
31477
1cfec89307a6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 31404
diff changeset
39 "*Extra switches for registering a file in SCCS.
1cfec89307a6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 31404
diff changeset
40 A string or list of strings passed to the checkin program by
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
41 \\[vc-sccs-register]."
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
42 :type '(choice (const :tag "None" nil)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
43 (string :tag "Argument String")
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
44 (repeat :tag "Argument List"
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
45 :value ("")
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
46 string))
31477
1cfec89307a6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 31404
diff changeset
47 :version "21.1"
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
48 :group 'vc)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
49
35823
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
50 (defcustom vc-sccs-diff-switches nil
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
51 "*A string or list of strings specifying extra switches for `vcdiff',
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
52 the diff utility used for SCCS under VC."
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
53 :type '(choice (const :tag "None" nil)
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
54 (string :tag "Argument String")
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
55 (repeat :tag "Argument List"
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
56 :value ("")
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
57 string))
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
58 :version "21.1"
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
59 :group 'vc)
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
60
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
61 (defcustom vc-sccs-header (or (cdr (assoc 'SCCS vc-header-alist)) '("%W%"))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
62 "*Header keywords to be inserted by `vc-insert-headers'."
35179
1b423e7eb1eb (vc-sccs-header): Fix :type.
Dave Love <fx@gnu.org>
parents: 35134
diff changeset
63 :type '(repeat string)
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
64 :group 'vc)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
65
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
66 ;;;###autoload
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
67 (defcustom vc-sccs-master-templates
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
68 '("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
69 "*Where to look for SCCS master files.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
70 For a description of possible values, see `vc-check-master-templates'."
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
71 :type '(choice (const :tag "Use standard SCCS file names"
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
72 ("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
73 (repeat :tag "User-specified"
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
74 (choice string
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
75 function)))
31477
1cfec89307a6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 31404
diff changeset
76 :version "21.1"
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
77 :group 'vc)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
78
33560
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
79
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
80 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
81 ;;; Internal variables
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
82 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
83
31404
f2ab9420390f 2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 31385
diff changeset
84 (defconst vc-sccs-name-assoc-file "VC-names")
f2ab9420390f 2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 31385
diff changeset
85
33560
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
86
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
87 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
88 ;;; State-querying functions
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
89 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
90
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
91 ;;;###autoload
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
92 (progn (defun vc-sccs-registered (f) (vc-default-registered 'SCCS f)))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
93
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
94 (defun vc-sccs-state (file)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
95 "SCCS-specific function to compute the version control state."
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
96 (with-temp-buffer
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
97 (if (vc-insert-file (vc-sccs-lock-file file))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
98 (let* ((locks (vc-sccs-parse-locks))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
99 (workfile-version (vc-workfile-version file))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
100 (locking-user (cdr (assoc workfile-version locks))))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
101 (if (not locking-user)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
102 (if (vc-workfile-unchanged-p file)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
103 'up-to-date
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
104 'unlocked-changes)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
105 (if (string= locking-user (vc-user-login-name))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
106 'edited
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
107 locking-user)))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
108 'up-to-date)))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
109
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
110 (defun vc-sccs-state-heuristic (file)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
111 "SCCS-specific state heuristic."
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
112 (if (not (vc-mistrust-permissions file))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
113 ;; This implementation assumes that any file which is under version
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
114 ;; control and has -rw-r--r-- is locked by its owner. This is true
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
115 ;; for both RCS and SCCS, which keep unlocked files at -r--r--r--.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
116 ;; We have to be careful not to exclude files with execute bits on;
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
117 ;; scripts can be under version control too. Also, we must ignore the
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
118 ;; group-read and other-read bits, since paranoid users turn them off.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
119 (let* ((attributes (file-attributes file))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
120 (owner-uid (nth 2 attributes))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
121 (permissions (nth 8 attributes)))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
122 (if (string-match ".r-..-..-." permissions)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
123 'up-to-date
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
124 (if (string-match ".rw..-..-." permissions)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
125 (if (file-ownership-preserved-p file)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
126 'edited
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
127 (vc-user-login-name owner-uid))
31477
1cfec89307a6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 31404
diff changeset
128 ;; Strange permissions.
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
129 ;; Fall through to real state computation.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
130 (vc-sccs-state file)))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
131 (vc-sccs-state file))))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
132
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
133 (defun vc-sccs-workfile-version (file)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
134 "SCCS-specific version of `vc-workfile-version'."
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
135 (with-temp-buffer
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
136 (vc-insert-file (vc-name file) "^\001e")
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
137 (vc-parse-buffer "^\001d D \\([^ ]+\\)" 1)))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
138
31477
1cfec89307a6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 31404
diff changeset
139 (defun vc-sccs-checkout-model (file)
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
140 "SCCS-specific version of `vc-checkout-model'."
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
141 'locking)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
142
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
143 (defun vc-sccs-workfile-unchanged-p (file)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
144 "SCCS-specific implementation of vc-workfile-unchanged-p."
35823
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
145 (zerop (apply 'vc-do-command nil 1 "vcdiff" (vc-name file)
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
146 (list "--brief" "-q"
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
147 (concat "-r" (vc-workfile-version file))))))
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
148
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
149
33560
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
150 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
151 ;;; State-changing functions
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
152 ;;;
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
153
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
154 (defun vc-sccs-register (file &optional rev comment)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
155 "Register FILE into the SCCS version-control system.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
156 REV is the optional revision number for the file. COMMENT can be used
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
157 to provide an initial description of FILE.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
158
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
159 `vc-register-switches' and `vc-sccs-register-switches' are passed to
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
160 the SCCS command (in that order).
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
161
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
162 Automatically retrieve a read-only version of the file with keywords
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
163 expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
164 (let* ((switches (list
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
165 (if (stringp vc-register-switches)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
166 (list vc-register-switches)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
167 vc-register-switches)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
168 (if (stringp vc-sccs-register-switches)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
169 (list vc-sccs-register-switches)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
170 vc-sccs-register-switches)))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
171 (dirname (or (file-name-directory file) ""))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
172 (basename (file-name-nondirectory file))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
173 (project-file (vc-sccs-search-project-dir dirname basename)))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
174 (let ((vc-name
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
175 (or project-file
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
176 (format (car vc-sccs-master-templates) dirname basename)))|)
31477
1cfec89307a6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 31404
diff changeset
177 (apply 'vc-do-command nil 0 "admin" nil
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
178 (and rev (concat "-r" rev))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
179 "-fb"
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
180 (concat "-i" file)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
181 (and comment (concat "-y" comment))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
182 vc-name
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
183 switches))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
184 (delete-file file)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
185 (if vc-keep-workfiles
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
186 (vc-do-command nil 0 "get" (vc-name file)))))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
187
33560
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
188 (defun vc-sccs-responsible-p (file)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
189 "Return non-nil if SCCS thinks it would be responsible for registering FILE."
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
190 ;; TODO: check for all the patterns in vc-sccs-master-templates
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
191 (or (file-directory-p (expand-file-name "SCCS" (file-name-directory file)))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
192 (stringp (vc-sccs-search-project-dir (or (file-name-directory file) "")
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
193 (file-name-nondirectory file)))))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
194
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
195 (defun vc-sccs-checkin (file rev comment)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
196 "SCCS-specific version of `vc-backend-checkin'."
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
197 (let ((switches (if (stringp vc-checkin-switches)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
198 (list vc-checkin-switches)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
199 vc-checkin-switches)))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
200 (apply 'vc-do-command nil 0 "delta" (vc-name file)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
201 (if rev (concat "-r" rev))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
202 (concat "-y" comment)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
203 switches)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
204 (if vc-keep-workfiles
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
205 (vc-do-command nil 0 "get" (vc-name file)))))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
206
35134
f7a5d39c26f0 (vc-sccs-latest-on-branch-p): Removed.
André Spiegel <spiegel@gnu.org>
parents: 33560
diff changeset
207 (defun vc-sccs-checkout (file &optional editable rev workfile)
31477
1cfec89307a6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 31404
diff changeset
208 "Retrieve a copy of a saved version of SCCS controlled FILE into a WORKFILE.
35134
f7a5d39c26f0 (vc-sccs-latest-on-branch-p): Removed.
André Spiegel <spiegel@gnu.org>
parents: 33560
diff changeset
209 EDITABLE non-nil means that the file should be writable and
f7a5d39c26f0 (vc-sccs-latest-on-branch-p): Removed.
André Spiegel <spiegel@gnu.org>
parents: 33560
diff changeset
210 locked. REV is the revision to check out into WORKFILE."
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
211 (let ((filename (or workfile file))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
212 (file-buffer (get-file-buffer file))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
213 switches)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
214 (message "Checking out %s..." filename)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
215 (save-excursion
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
216 ;; Change buffers to get local value of vc-checkout-switches.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
217 (if file-buffer (set-buffer file-buffer))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
218 (setq switches (if (stringp vc-checkout-switches)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
219 (list vc-checkout-switches)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
220 vc-checkout-switches))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
221 ;; Save this buffer's default-directory
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
222 ;; and use save-excursion to make sure it is restored
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
223 ;; in the same buffer it was saved in.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
224 (let ((default-directory default-directory))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
225 (save-excursion
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
226 ;; Adjust the default-directory so that the check-out creates
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
227 ;; the file in the right place.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
228 (setq default-directory (file-name-directory filename))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
229
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
230 (and rev (string= rev "") (setq rev nil))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
231 (if workfile
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
232 ;; Some SCCS implementations allow checking out directly to a
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
233 ;; file using the -G option, but then some don't so use the
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
234 ;; least common denominator approach and use the -p option
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
235 ;; ala RCS.
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
236 (let ((vc-modes (logior (file-modes (vc-name file))
35134
f7a5d39c26f0 (vc-sccs-latest-on-branch-p): Removed.
André Spiegel <spiegel@gnu.org>
parents: 33560
diff changeset
237 (if editable 128 0)))
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
238 (failed t))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
239 (unwind-protect
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
240 (progn
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
241 (let ((coding-system-for-read 'no-conversion)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
242 (coding-system-for-write 'no-conversion))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
243 (with-temp-file filename
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
244 (apply 'vc-do-command
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
245 (current-buffer) 0 "get" (vc-name file)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
246 "-s" ;; suppress diagnostic output
35134
f7a5d39c26f0 (vc-sccs-latest-on-branch-p): Removed.
André Spiegel <spiegel@gnu.org>
parents: 33560
diff changeset
247 (if editable "-e")
31477
1cfec89307a6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 31404
diff changeset
248 "-p"
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
249 (and rev
31477
1cfec89307a6 Doc fixes.
Dave Love <fx@gnu.org>
parents: 31404
diff changeset
250 (concat "-r"
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
251 (vc-sccs-lookup-triple file rev)))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
252 switches)))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
253 (set-file-modes filename
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
254 (logior (file-modes (vc-name file))
35134
f7a5d39c26f0 (vc-sccs-latest-on-branch-p): Removed.
André Spiegel <spiegel@gnu.org>
parents: 33560
diff changeset
255 (if editable 128 0)))
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
256 (setq failed nil))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
257 (and failed (file-exists-p filename)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
258 (delete-file filename))))
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
259 (apply 'vc-do-command nil 0 "get" (vc-name file)
35134
f7a5d39c26f0 (vc-sccs-latest-on-branch-p): Removed.
André Spiegel <spiegel@gnu.org>
parents: 33560
diff changeset
260 (if editable "-e")
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
261 (and rev (concat "-r" (vc-sccs-lookup-triple file rev)))
31404
f2ab9420390f 2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 31385
diff changeset
262 switches)))))
f2ab9420390f 2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 31385
diff changeset
263 (message "Checking out %s...done" filename)))
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
264
33560
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
265 (defun vc-sccs-revert (file)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
266 "Revert FILE to the version it was based on."
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
267 (vc-do-command nil 0 "unget" (vc-name file))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
268 (vc-do-command nil 0 "get" (vc-name file))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
269 ;; Checking out explicit versions is not supported under SCCS, yet.
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
270 ;; We always "revert" to the latest version; therefore
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
271 ;; vc-workfile-version is cleared here so that it gets recomputed.
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
272 (vc-file-setprop file 'vc-workfile-version nil))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
273
35134
f7a5d39c26f0 (vc-sccs-latest-on-branch-p): Removed.
André Spiegel <spiegel@gnu.org>
parents: 33560
diff changeset
274 (defun vc-sccs-cancel-version (file editable)
33560
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
275 "Undo the most recent checkin of FILE.
35134
f7a5d39c26f0 (vc-sccs-latest-on-branch-p): Removed.
André Spiegel <spiegel@gnu.org>
parents: 33560
diff changeset
276 EDITABLE non-nil means previous version should be locked."
33560
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
277 (vc-do-command nil 0 "rmdel"
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
278 (vc-name file)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
279 (concat "-r" (vc-workfile-version file)))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
280 (vc-do-command nil 0 "get"
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
281 (vc-name file)
35134
f7a5d39c26f0 (vc-sccs-latest-on-branch-p): Removed.
André Spiegel <spiegel@gnu.org>
parents: 33560
diff changeset
282 (if editable "-e")))
33560
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
283
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
284 (defun vc-sccs-steal-lock (file &optional rev)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
285 "Steal the lock on the current workfile for FILE and revision REV."
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
286 (vc-do-command nil 0 "unget" (vc-name file) "-n" (if rev (concat "-r" rev)))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
287 (vc-do-command nil 0 "get" (vc-name file) "-g" (if rev (concat "-r" rev))))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
288
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
289
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
290 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
291 ;;; History functions
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
292 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
293
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
294 (defun vc-sccs-print-log (file)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
295 "Get change log associated with FILE."
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
296 (vc-do-command t 0 "prs" (vc-name file)))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
297
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
298 (defun vc-sccs-logentry-check ()
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
299 "Check that the log entry in the current buffer is acceptable for SCCS."
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
300 (when (>= (buffer-size) 512)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
301 (goto-char 512)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
302 (error "Log must be less than 512 characters; point is now at pos 512")))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
303
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
304 (defun vc-sccs-diff (file &optional oldvers newvers)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
305 "Get a difference report using SCCS between two versions of FILE."
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
306 (setq oldvers (vc-sccs-lookup-triple file oldvers))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
307 (setq newvers (vc-sccs-lookup-triple file newvers))
35823
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
308 (apply 'vc-do-command t 1 "vcdiff" (vc-name file)
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
309 (append (list "-q"
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
310 (and oldvers (concat "-r" oldvers))
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
311 (and newvers (concat "-r" newvers)))
9396894025fa (vc-sccs-diff-switches): New customization option.
André Spiegel <spiegel@gnu.org>
parents: 35179
diff changeset
312 (vc-diff-switches-list sccs))))
33560
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
313
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
314
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
315 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
316 ;;; Snapshot system
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
317 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
318
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
319 (defun vc-sccs-assign-name (file name)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
320 "Assign to FILE's latest version a given NAME."
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
321 (vc-sccs-add-triple name file (vc-workfile-version file)))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
322
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
323
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
324 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
325 ;;; Miscellaneous
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
326 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
327
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
328 (defun vc-sccs-check-headers ()
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
329 "Check if the current file has any headers in it."
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
330 (save-excursion
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
331 (goto-char (point-min))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
332 (re-search-forward "%[A-Z]%" nil t)))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
333
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
334 (defun vc-sccs-rename-file (old new)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
335 ;; Move the master file (using vc-rcs-master-templates).
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
336 (vc-rename-master (vc-name old) new vc-sccs-master-templates)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
337 ;; Update the snapshot file.
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
338 (with-current-buffer
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
339 (find-file-noselect
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
340 (expand-file-name vc-sccs-name-assoc-file
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
341 (file-name-directory (vc-name old))))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
342 (goto-char (point-min))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
343 ;; (replace-regexp (concat ":" (regexp-quote old) "$") (concat ":" new))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
344 (while (re-search-forward (concat ":" (regexp-quote old) "$") nil t)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
345 (replace-match (concat ":" new) nil nil))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
346 (basic-save-buffer)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
347 (kill-buffer (current-buffer))))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
348
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
349
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
350 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
351 ;;; Internal functions
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
352 ;;;
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
353
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
354 ;; This function is wrapped with `progn' so that the autoload cookie
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
355 ;; copies the whole function itself into loaddefs.el rather than just placing
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
356 ;; a (autoload 'vc-sccs-search-project-dir "vc-sccs") which would not
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
357 ;; help us avoid loading vc-sccs.
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
358 ;;;###autoload
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
359 (progn (defun vc-sccs-search-project-dir (dirname basename)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
360 "Return the name of a master file in the SCCS project directory.
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
361 Does not check whether the file exists but returns nil if it does not
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
362 find any project directory."
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
363 (let ((project-dir (getenv "PROJECTDIR")) dirs dir)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
364 (when project-dir
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
365 (if (file-name-absolute-p project-dir)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
366 (setq dirs '("SCCS" ""))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
367 (setq dirs '("src/SCCS" "src" "source/SCCS" "source"))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
368 (setq project-dir (expand-file-name (concat "~" project-dir))))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
369 (while (and (not dir) dirs)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
370 (setq dir (expand-file-name (car dirs) project-dir))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
371 (unless (file-directory-p dir)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
372 (setq dir nil)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
373 (setq dirs (cdr dirs))))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
374 (and dir (expand-file-name (concat "s." basename) dir))))))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
375
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
376 (defun vc-sccs-lock-file (file)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
377 "Generate lock file name corresponding to FILE."
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
378 (let ((master (vc-name file)))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
379 (and
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
380 master
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
381 (string-match "\\(.*/\\)\\(s\\.\\)\\(.*\\)" master)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
382 (replace-match "p." t t master 2))))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
383
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
384 (defun vc-sccs-parse-locks ()
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
385 "Parse SCCS locks in current buffer.
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
386 The result is a list of the form ((VERSION . USER) (VERSION . USER) ...)."
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
387 (let (master-locks)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
388 (goto-char (point-min))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
389 (while (re-search-forward "^\\([0-9.]+\\) [0-9.]+ \\([^ ]+\\) .*\n?"
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
390 nil t)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
391 (setq master-locks
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
392 (cons (cons (match-string 1) (match-string 2)) master-locks)))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
393 ;; FIXME: is it really necessary to reverse ?
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
394 (nreverse master-locks)))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
395
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
396 (defun vc-sccs-add-triple (name file rev)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
397 (with-current-buffer
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
398 (find-file-noselect
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
399 (expand-file-name vc-sccs-name-assoc-file
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
400 (file-name-directory (vc-name file))))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
401 (goto-char (point-max))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
402 (insert name "\t:\t" file "\t" rev "\n")
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
403 (basic-save-buffer)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
404 (kill-buffer (current-buffer))))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
405
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
406 (defun vc-sccs-lookup-triple (file name)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
407 "Return the numeric version corresponding to a named snapshot of FILE.
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
408 If NAME is nil or a version number string it's just passed through."
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
409 (if (or (null name)
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
410 (let ((firstchar (aref name 0)))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
411 (and (>= firstchar ?0) (<= firstchar ?9))))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
412 name
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
413 (with-temp-buffer
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
414 (vc-insert-file
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
415 (expand-file-name vc-sccs-name-assoc-file
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
416 (file-name-directory (vc-name file))))
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
417 (vc-parse-buffer (concat name "\t:\t" file "\t\\(.+\\)") 1))))
31385
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
418
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
419 (provide 'vc-sccs)
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
420
b1e1a94dfc0a (vc-sccs-latest-on-branch-p): Always return t; we
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
421 ;;; vc-sccs.el ends here
33560
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
422
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
423
da206bbad86b Functions reordered.
André Spiegel <spiegel@gnu.org>
parents: 31520
diff changeset
424