Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / gnu / usr.bin / rcs / rcsclean / rcsclean.1
1 .de Id
2 .ds Rv \\$3
3 .ds Dt \\$4
4 ..
5 .Id $FreeBSD: src/gnu/usr.bin/rcs/rcsclean/rcsclean.1,v 1.5 1999/08/27 23:36:54 peter Exp $
6 .Id $DragonFly: src/gnu/usr.bin/rcs/rcsclean/rcsclean.1,v 1.2 2003/06/17 04:25:48 dillon Exp $
7 .ds r \&\s-1RCS\s0
8 .if n .ds - \%--
9 .if t .ds - \(em
10 .TH RCSCLEAN 1 \*(Dt GNU
11 .SH NAME
12 rcsclean \- clean up working files
13 .SH SYNOPSIS
14 .B rcsclean
15 .RI [ options "] [ " file " .\|.\|. ]"
16 .SH DESCRIPTION
17 .B rcsclean
18 removes files that are not being worked on.
19 .B "rcsclean \-u"
20 also unlocks and removes files that are being worked on
21 but have not changed.
22 .PP
23 For each
24 .I file
25 given,
26 .B rcsclean
27 compares the working file and a revision in the corresponding
28 \*r file.  If it finds a difference, it does nothing.
29 Otherwise, it first unlocks the revision if the
30 .B \-u
31 option is given,
32 and then removes the working file
33 unless the working file is writable and the revision is locked.
34 It logs its actions by outputting the corresponding
35 .B "rcs \-u"
36 and
37 .B "rm \-f"
38 commands on the standard output.
39 .PP
40 Files are paired as explained in
41 .BR ci (1).
42 If no
43 .I file
44 is given, all working files in the current directory are cleaned.
45 Pathnames matching an \*r suffix denote \*r files;
46 all others denote working files.
47 .PP
48 The number of the revision to which the working file is compared
49 may be attached to any of the options
50 .BR \-n ,
51 .BR \-q ,
52 .BR \-r ,
53 or
54 .BR \-u .
55 If no revision number is specified, then if the
56 .B \-u
57 option is given and the caller has one revision locked,
58 .B rcsclean
59 uses that revision; otherwise
60 .B rcsclean
61 uses the latest revision on the default branch, normally the root.
62 .PP
63 .B rcsclean
64 is useful for
65 .B clean
66 targets in makefiles.
67 See also
68 .BR rcsdiff (1),
69 which prints out the differences,
70 and
71 .BR ci (1),
72 which
73 normally reverts to the previous revision
74 if a file was not changed.
75 .SH OPTIONS
76 .TP
77 .BI \-k subst
78 Use
79 .I subst
80 style keyword substitution when retrieving the revision for comparison.
81 See
82 .BR co (1)
83 for details.
84 .TP
85 .BR \-n [\f2rev\fP]
86 Do not actually remove any files or unlock any revisions.
87 Using this option will tell you what
88 .B rcsclean
89 would do without actually doing it.
90 .TP
91 .BR \-q [\f2rev\fP]
92 Do not log the actions taken on standard output.
93 .TP
94 .BR \-r [\f2rev\fP]
95 This option has no effect other than specifying the revision for comparison.
96 .TP
97 .B \-T
98 Preserve the modification time on the \*r file
99 even if the \*r file changes because a lock is removed.
100 This option can suppress extensive recompilation caused by a
101 .BR make (1)
102 dependency of some other copy of the working file on the \*r file.
103 Use this option with care; it can suppress recompilation even when it is needed,
104 i.e. when the lock removal
105 would mean a change to keyword strings in the other working file.
106 .TP
107 .BR \-u [\f2rev\fP]
108 Unlock the revision if it is locked and no difference is found.
109 .TP
110 .BI \-V
111 Print \*r's version number.
112 .TP
113 .BI \-V n
114 Emulate \*r version
115 .IR n .
116 See
117 .BR co (1)
118 for details.
119 .TP
120 .BI \-x "suffixes"
121 Use
122 .I suffixes
123 to characterize \*r files.
124 See
125 .BR ci (1)
126 for details.
127 .TP
128 .BI \-z zone
129 Use
130 .I zone
131 as the time zone for keyword substitution;
132 see
133 .BR co (1)
134 for details.
135 .SH EXAMPLES
136 .LP
137 .RS
138 .ft 3
139 rcsclean  *.c  *.h
140 .ft
141 .RE
142 .LP
143 removes all working files ending in
144 .B .c
145 or
146 .B .h
147 that were not changed
148 since their checkout.
149 .LP
150 .RS
151 .ft 3
152 rcsclean
153 .ft
154 .RE
155 .LP
156 removes all working files in the current directory
157 that were not changed since their checkout.
158 .SH FILES
159 .B rcsclean
160 accesses files much as
161 .BR ci (1)
162 does.
163 .SH ENVIRONMENT
164 .TP
165 .B \s-1RCSINIT\s0
166 options prepended to the argument list, separated by spaces.
167 A backslash escapes spaces within an option.
168 The
169 .B \s-1RCSINIT\s0
170 options are prepended to the argument lists of most \*r commands.
171 Useful
172 .B \s-1RCSINIT\s0
173 options include
174 .BR \-q ,
175 .BR \-V ,
176 .BR \-x ,
177 and
178 .BR \-z .
179 .SH DIAGNOSTICS
180 The exit status is zero if and only if all operations were successful.
181 Missing working files and \*r files are silently ignored.
182 .SH IDENTIFICATION
183 Author: Walter F. Tichy.
184 .br
185 Manual Page Revision: \*(Rv; Release Date: \*(Dt.
186 .br
187 Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
188 .br
189 Copyright \(co 1990, 1991, 1992, 1993 Paul Eggert.
190 .SH "SEE ALSO"
191 ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1),
192 rcsfile(5)
193 .br
194 Walter F. Tichy,
195 \*r\*-A System for Version Control,
196 .I "Software\*-Practice & Experience"
197 .BR 15 ,
198 7 (July 1985), 637-654.
199 .SH BUGS
200 At least one
201 .I file
202 must be given in older Unix versions that
203 do not provide the needed directory scanning operations.
204 .br