[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Feature request: svn clean

From: Tom Mornini <tmornini_at_infomania.com>
Date: 2005-03-04 21:11:08 CET

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mar 4, 2005, at 11:13 AM, Casper Hornstrup wrote:

> When working on a change that requires a full rebuild to be properly
> tested
> or when making releases would be very helpful to be able to convert an
> existing
> working copy into what would have resulted from a clean checkout from
> the
> repository. Svn clean would basicly be a superset of svn revert -R. In
> addition
> to revert, it would delete all unversioned (usually generated) files
> in the
> working copy.

Just roll your own:

#!/usr/bin/perl -w

use strict;

my $debug = 1;

for ( `svn status` ) {
   if ( /^\?\s+(.+)/ ) {
     my $command = "rm -rf $1";
     if ( $debug ) {
       print "$command\n";
     }
     else {
       system $command;
     }
   }
}

P.S. To make it work, set debug to 0 and away you go.

- --
- -- Tom Mornini

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCKMDczaKkuvKwKvcRAlm3AJ9wNMsxMXxEdh/q/7gT8wiD+1z2lgCgqGAM
sNTPTDuNe+bFKMishXI4KhU=
=VrEM
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Mar 4 21:13:34 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.