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