You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Julien ALLANOS <ju...@aql.fr> on 2005/07/13 13:36:35 UTC

removing missing files/directories?

Hello,

Is there a simple way to remove missing files/directories (those marked ! in svn
st) all in once? At the moment I have to copy/paste files names to svn remove,
and I didn't see any option in svn remove to do this.

Thanks,
-- 
Julien ALLANOS

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

Re: removing missing files/directories?

Posted by Jing Xue <jx...@digizenstudio.com>.
I realize the OP's point probably being this should be a svn feature, 
but since we are talking about workarounds - if you have any language or 
text editor already installed that supports regular expression out of 
box (off top of my head: perl, java 1.4+, python, vim, TextPad). In 
fact, every Windows NT or later box comes with Windows Script 
Hosting(VBScript/JavaScript). It'd probably take just a few lines to 
parse the svn output and spit out a batch file.

--Jing Xue


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

Re: removing missing files/directories?

Posted by Brass Tilde <br...@insightbb.com>.
> Julien ALLANOS wrote:

> > Quoting Bob Proulx <bo...@proulx.com>:

> > Yes, I'm aware of Cygwin, but here we don't have permissions to install
> > additional software.
>
> Since cygwin will install in any directory not having permissions is
> basically saying you have no write permission anywhere on the disk
> drive.  You could always install it in your project working copy area
> if nothing else.

Or that there's a company policy against installing software on their machines, i.e. they don't have permission from the company to
do it, regardless of the permissions set on the machine.

> I guess this would be a good use for a USB filesystem.  Install your
> software on the USB device and it is not actually installed on the
> system.

Many companies also have policies against this practice, especially those who maintain sensitive data.


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

Re: removing missing files/directories?

Posted by Bob Proulx <bo...@proulx.com>.
Julien ALLANOS wrote:
> Quoting Bob Proulx <bo...@proulx.com>:
> >Actually, what I would really do is to install the Cygwin toolkit and
> >run the originally suggested commands.  It is free and very useful.
> 
> Yes, I'm aware of Cygwin, but here we don't have permissions to install
> additional software.

Since cygwin will install in any directory not having permissions is
basically saying you have no write permission anywhere on the disk
drive.  You could always install it in your project working copy area
if nothing else.

I guess this would be a good use for a USB filesystem.  Install your
software on the USB device and it is not actually installed on the
system.

Bob

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

Re: removing missing files/directories?

Posted by Julien ALLANOS <ju...@aql.fr>.
Quoting Bob Proulx <bo...@proulx.com>:

> Julien ALLANOS wrote:
>> Quoting Gary Thomas <ga...@mlbassoc.com>:
>> >% svn status | fgrep '\!' | awk '{print $2;}' | xargs svn rm
>> >
>>
>> Heh, unfortunatly it's not as simple as that, as I'm using a Windows shell
>> :)
>
> Ugh.  I would redirect the output to a doit.bat file.  Then edit the
> file with an editor and create the commands to do what you want
> there.  You should be able to create the commands easily in a
> reasonable editor.  Then run the resulting bat file.
>
> Actually, what I would really do is to install the Cygwin toolkit and
> run the originally suggested commands.  It is free and very useful.

Yes, I'm aware of Cygwin, but here we don't have permissions to install
additional software.

>
>> Is there any change that a new option to svn remove would appear to
>> ease this process?
>
> This is such a low use case that I don't think an option is really
> needed.  How often does this happen?
>
> Bob

I agree this is not a daily need, but it might happen from times to times...
-- 
Julien ALLANOS

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

Re: removing missing files/directories?

Posted by Bob Proulx <bo...@proulx.com>.
Julien ALLANOS wrote:
> Quoting Gary Thomas <ga...@mlbassoc.com>:
> >% svn status | fgrep '\!' | awk '{print $2;}' | xargs svn rm
> >
> 
> Heh, unfortunatly it's not as simple as that, as I'm using a Windows shell 
> :)

Ugh.  I would redirect the output to a doit.bat file.  Then edit the
file with an editor and create the commands to do what you want
there.  You should be able to create the commands easily in a
reasonable editor.  Then run the resulting bat file.

Actually, what I would really do is to install the Cygwin toolkit and
run the originally suggested commands.  It is free and very useful.

> Is there any change that a new option to svn remove would appear to
> ease this process?

This is such a low use case that I don't think an option is really
needed.  How often does this happen?

Bob

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

Re: removing missing files/directories?

Posted by Julien ALLANOS <ju...@aql.fr>.
Quoting Gary Thomas <ga...@mlbassoc.com>:

> On Wed, 2005-07-13 at 15:36 +0200, Julien ALLANOS wrote:
>> Hello,
>>
>> Is there a simple way to remove missing files/directories (those 
>> marked ! in svn
>> st) all in once? At the moment I have to copy/paste files names to 
>> svn remove,
>> and I didn't see any option in svn remove to do this.
>
> Assuming Linux and 'bash' shell:
>
> % svn status | fgrep '\!' | awk '{print $2;}' | xargs svn rm
>

Heh, unfortunatly it's not as simple as that, as I'm using a Windows shell :)

Is there any change that a new option to svn remove would appear to ease this
process?

Thanks,
-- 
Julien ALLANOS

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

Re: removing missing files/directories?

Posted by Gary Thomas <ga...@mlbassoc.com>.
On Wed, 2005-07-13 at 15:36 +0200, Julien ALLANOS wrote:
> Hello,
> 
> Is there a simple way to remove missing files/directories (those marked ! in svn
> st) all in once? At the moment I have to copy/paste files names to svn remove,
> and I didn't see any option in svn remove to do this.

Assuming Linux and 'bash' shell:

% svn status | fgrep '\!' | awk '{print $2;}' | xargs svn rm

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

Re: removing missing files/directories?

Posted by Raman Gupta <ro...@fastmail.fm>.
John C. Fowler wrote:
> Keep in mind... if there is a space in the file name some of these
> scripts will fail.
>
> Dale Worley wrote:
>
>>>From: Julien ALLANOS [mailto:julien.allanos@aql.fr]
>>>Is there a simple way to remove missing files/directories
>>>(those marked ! in svn
>>>st) all in once? At the moment I have to copy/paste files
>>>names to svn remove,
>>>and I didn't see any option in svn remove to do this.
>>
>>It seems like a simple shell scripting problem:
>>
>>    svn rm $( svn status ... | sed -e '/^!/!d' -e 's/^!//' )

Put this "svnapply" script in your /usr/local/bin, and then execute:

svnapply \! svn rm

Works with spaces too. Improvements are welcome:

#!/bin/bash
#
# Applies arbitrary commands to any svn status. e.g.
#
# Delete all non-svn files (escape the ? from the shell):
# svnapply \? rm
#
# List all conflicted files:
# svnapply C ls -l

APPLY=$1
shift

svn st | egrep "^\\${APPLY}[ ]+" | \
  sed -e "s|^\\${APPLY}[ ]*||" | \
  xargs -i "$@" '{}'

Cheers,
Raman

Re: removing missing files/directories?

Posted by "John C. Fowler" <jc...@pacbell.net>.
Keep in mind... if there is a space in the file name some of these 
scripts will fail.



Dale Worley wrote:

>>From: Julien ALLANOS [mailto:julien.allanos@aql.fr]
>>    
>>
>
>  
>
>>Is there a simple way to remove missing files/directories 
>>(those marked ! in svn
>>st) all in once? At the moment I have to copy/paste files 
>>names to svn remove,
>>and I didn't see any option in svn remove to do this.
>>    
>>
>
>It seems like a simple shell scripting problem:
>
>    svn rm $( svn status ... | sed -e '/^!/!d' -e 's/^!//' )
>
>Dale
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: users-help@subversion.tigris.org
>
>
>  
>


RE: removing missing files/directories?

Posted by Dale Worley <dw...@pingtel.com>.
> From: Julien ALLANOS [mailto:julien.allanos@aql.fr]

> Is there a simple way to remove missing files/directories 
> (those marked ! in svn
> st) all in once? At the moment I have to copy/paste files 
> names to svn remove,
> and I didn't see any option in svn remove to do this.

It seems like a simple shell scripting problem:

    svn rm $( svn status ... | sed -e '/^!/!d' -e 's/^!//' )

Dale


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