You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jørn Wildt <jw...@fjeldgruppen.dk> on 2008/07/02 19:46:14 UTC

Removing working copy, leaving other files untouched

Is it possible to remove all local files that belongs to SVN - without removing non-SVN files?

I have a setup where I mix a checkout from SVN with other files. Now the SVN depot has moved completely, so I cannot switch nor relocate. So I want to remove all SVN files (both administrative and working copy files) and afterwards I expect to do a complete fresh checkout from the new SVN location and superimpose/merge this checkout with all the remaining non-SVN files.

Ideas? Thanks.

/Jørn Wildt
Denmark

Re: Removing working copy, leaving other files untouched

Posted by Florian Seydoux <fl...@gmail.com>.
Jørn Wildt wrote:
> Is it possible to remove all local files that belongs to SVN - without 
> removing non-SVN files?
> <snip>  

On windows, TortoiseSvn (*) provide an 'extended' 'export' facility: you can
ask to export all file in a separate directory, including the 
non-versionned ones:
TortoiseSvn->Export, then tip the 'Export unversioned files too' checkbox.

with the command line tool, it seems (?) that the 'export' don't provide 
this
facility. So I suggest that if you aren't on windows, you can maybe do first
an svn export (to have only the 'versionned' file out of a wc), then 
something like:
    svn status --no-ignore | grep "^[I?]"
(to have the list of non-versionned (?) and ignored (I) files),
and manual cp/mv these files...

.... BTW, there is maybe better procedure...

regards,

florian

(*) at least, the pre 1.5 versions

-- 
--------------------------------------------------------------------
Seydoux Florian, PhD
http://www.spinx-technologies.com
--------------------------------------------------------------------


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

Re: Removing working copy, leaving other files untouched

Posted by Florian Seydoux <fl...@gmail.com>.
Stephane Bortzmeyer wrote:
> Untested (backup first!):
> 
> svn status -v | awk '!/^\?/ {print $4}' | xargs rm -f
> 

oups.
yes, better like this.

goal was not to filter the .svn stuff...


flo


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

Re: Removing working copy, leaving other files untouched

Posted by Stephane Bortzmeyer <bo...@nic.fr>.
On Wed, Jul 02, 2008 at 09:46:14PM +0200,
 Jørn Wildt <jw...@fjeldgruppen.dk> wrote 
 a message of 54 lines which said:

> Is it possible to remove all local files that belongs to SVN -
> without removing non-SVN files?

Untested (backup first!):

svn status -v | awk '!/^\?/ {print $4}' | xargs rm -f

The first command displays all the files, awk filters out the non-SVN
files (they are displayed with a ? by svn status) and the last deletes
the SVN files.

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

Re: Removing working copy, leaving other files untouched

Posted by Florian Seydoux <fl...@gmail.com>.
Jørn Wildt wrote:
> Is it possible to remove all local files that belongs to SVN - without 
> removing non-SVN files?
> <snip>  

On windows, TortoiseSvn (*) had an 'extended' 'export' facility: you can
ask to export all file in a separate directory, including the 
non-versionned ones:
TortoiseSvn->Export, then tip the 'Export unversioned files too' checkbox.

with the command line tool, it seems (?) that the 'export' don't provide 
this
facility. So I suggest that if you aren't on windows, you can maybe do first
an svn export (to have only the 'versionned' file out of a wc), then 
something like:
    svn status --no-ignore | grep "^[I?]"
(to have the list of non-versionned (?) and ignored (I) files),
and manual cp/mv these files...

.... BTW, there is maybe better procedure...

regards,

florian

(*) at least, the pre 1.5 versions

-- 
--------------------------------------------------------------------
Seydoux Florian, PhD
http://www.spinx-technologies.com
--------------------------------------------------------------------


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