You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Casper Hornstrup <ch...@csh-consult.dk> on 2005/03/04 19:13:25 UTC

Feature request: svn clean

Hi.
 
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.
 
Can I file an issue on this?
 
Casper
 

Re: Feature request: svn clean

Posted by Barry Scott <ba...@barrys-emacs.org>.
I use svn export of the working copy to do these types of clean/release 
builds.

With all the reverting and deleting of files I'd be very worried about 
losing
variable work. (as others commented).

BArry

On Mar 4, 2005, at 19:13, Casper Hornstrup wrote:

> Hi.
>  
> 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.
>  
> Can I file an issue on this?
>  
> Casper
>  

Re: Feature request: svn clean

Posted by Simon Perreault <no...@nomis80.org>.
On March 4, 2005 14:13, 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.

Check out the svn-clean script that I wrote and that comes with subversion in 
the contrib directory. 
http://svn.collab.net/viewcvs/svn/trunk/contrib/client-side/svn-clean?&view=auto

With that script, simply do:

svn-clean
svn revert -R .

-- 
Simon Perreault <no...@nomis80.org> -- http://nomis80.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Feature request: svn clean

Posted by Simon Perreault <no...@nomis80.org>.
On March 4, 2005 15:23, Eric Wilhelm wrote:
> Filenames with spaces and funny characters could cost you if you have
> your command constructed as a scalar.

...and that's why you shouldn't try to reinvent the wheel:

http://svn.collab.net/viewcvs/svn/trunk/contrib/client-side/svn-clean?&view=auto

-- 
Simon Perreault <no...@nomis80.org> -- http://nomis80.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Feature request: svn clean

Posted by Eric Wilhelm <ew...@sbcglobal.net>.
# The following was supposedly scribed by
# Tom Mornini
# on Friday 04 March 2005 02:11 pm:

>Just roll your own:

Okay, but maybe consider reading 'perldoc system' before doing that.

>     my $command = "rm -rf $1";

>       system $command;

Filenames with spaces and funny characters could cost you if you have 
your command constructed as a scalar.

--Eric
-- 
I arise in the morning torn between a desire to improve the world and a 
desire to enjoy the world. This makes it hard to plan the day. 
                                               -- E.B. White
---------------------------------------------
    http://scratchcomputing.com
---------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Feature request: svn clean

Posted by Tom Mornini <tm...@infomania.com>.
-----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

Re: Feature request: svn clean

Posted by Max Bowsher <ma...@ukf.net>.
Casper Hornstrup wrote:
>> -----Original Message-----
>> From: mob22@hermes.cam.ac.uk [mailto:mob22@hermes.cam.ac.uk]
>> On Behalf Of Max Bowsher
>> Sent: 5. marts 2005 20:36
>> To: Casper Hornstrup; users@subversion.tigris.org
>> Subject: Re: Feature request: svn clean
>>
>> So, to summarize this thread:
>>
>> The current thinking is that this is so easy to script that
>> it is not worth bothering with yet another svn subcommand.
>>
>> That remains open for discussion, but any such discussion
>> must begin by explaining why the script solution isn't satisifactory.
>>
>> Max.
>>
>
> Well, my only argument against a script is that of user friendlyness.
> Firstly, the user must find the script on the net and download and
> install it. Secondly, the user must download and install perl (if not
> already installed). Using the script is done differently than when
> normally interacting with subversion. For instance, I assume no help
> is shown when doing a svn help clean.

I've got my own version of a clean/purge script which just uses shell and 
sed, if that is any help.

Alternatively, if that was a subtle hint that you are using Windows, then I 
can see how scripts would be more painful.

If you feel strongly about this changing, I think you should summarize the 
problem to the dev@ list, making sure to point out clearly why scripts don't 
work well for you. _If_ suitable consensus is generated, there is no problem 
adding another svn subcommand.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Feature request: svn clean

Posted by Casper Hornstrup <ch...@csh-consult.dk>.
 

> -----Original Message-----
> From: mob22@hermes.cam.ac.uk [mailto:mob22@hermes.cam.ac.uk] 
> On Behalf Of Max Bowsher
> Sent: 5. marts 2005 20:36
> To: Casper Hornstrup; users@subversion.tigris.org
> Subject: Re: Feature request: svn clean
> 
> So, to summarize this thread:
> 
> The current thinking is that this is so easy to script that 
> it is not worth bothering with yet another svn subcommand.
> 
> That remains open for discussion, but any such discussion 
> must begin by explaining why the script solution isn't satisifactory.
> 
> Max.
> 

Well, my only argument against a script is that of user friendlyness.
Firstly, the user must find the script on the net and download and
install it. Secondly, the user must download and install perl (if not
already installed). Using the script is done differently than when
normally interacting with subversion. For instance, I assume no help
is shown when doing a svn help clean.

Casper


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Feature request: svn clean

Posted by Max Bowsher <ma...@ukf.net>.
Casper Hornstrup wrote:
> Hi.
>
> 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.
>
> Can I file an issue on this?

So, to summarize this thread:

The current thinking is that this is so easy to script that it is not worth 
bothering with yet another svn subcommand.

That remains open for discussion, but any such discussion must begin by 
explaining why the script solution isn't satisifactory.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org