3
# svn-clean - Wipes out unversioned files from SVN working copy.
4
# Copyright (C) 2004, 2005 Simon Perreault
6
# This program is free software; you can redistribute it and/or
7
# modify it under the terms of the GNU General Public License
8
# as published by the Free Software Foundation; either version 2
9
# of the License, or (at your option) any later version.
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33
"non-recursive|N" => \$nonrecursive,
40
pod2usage(1) if $help;
41
pod2usage( -exitstatus => 0, -verbose => 2 ) if $man;
43
# Build svn client command
44
my @command = qw(svn status --no-ignore -v);
49
# Main file-wiping loop.
50
open SVN, "-|", @command, @ARGV
51
or die "Can't call program \"svn\": $!\n";
54
my $file = (split)[-1];
59
rmtree( $file, !$quiet, !$force );
61
warn "Could not remove $file: $!\n";
71
svn-clean - Wipes out unversioned files from Subversion working copy
75
svn-clean [options] [directory or file ...]
79
B<svn-clean> will scan the given files and directories recursively and find
80
unversioned files and directories (files and directories that are not present in
81
the Subversion repository). After the scan is done, these files and directories
84
If no file or directory is given, B<svn-clean> defaults to the current directory
91
=item B<-f>, B<--force>
93
Files to which you do not have delete access (if running under VMS) or write
94
access (if running under another OS) will not be deleted unless you use this
97
=item B<-N>, B<--non-recursive>
99
Do not search recursively for unversioned files and directories. Unversioned
100
directories will still be deleted along with all their contents.
102
=item B<-q>, B<--quiet>
104
Do not print progress info. In particular, do not print a message each time a
105
file is examined, giving the name of the file, and indicating whether "rmdir" or
106
"unlink" is used to remove it, or that it’s skipped.
108
=item B<-p>, B<--print>
110
Do not delete anything. Instead, print the name of every file and directory that
111
would have been deleted.
113
=item B<-?>, B<-h>, B<--help>
115
Prints a brief help message and exits.
119
Prints the manual page and exits.
125
Simon Perreault <nomis80@nomis80.org>