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

RE: Re: committing local deletions

From: Thompson, Graeme (GE Infra, Aviation) <Graeme.Thompson_at_ge.com>
Date: Thu, 10 Apr 2008 03:32:02 -0400

> -----Original Message-----
> From: kogrover_at_gmail.com [mailto:kogrover_at_gmail.com] On
> Behalf Of Kevin Grover
> Sent: 10 April 2008 02:27
> To: Ruslan Sivak
> Cc: Marc Haisenko; users_at_subversion.tigris.org
> Subject: Re: committing local deletions
>
> On Wed, Apr 9, 2008 at 7:29 AM, Ruslan Sivak
> <rsivak_at_istandfor.com> wrote:
> > Marc Haisenko wrote:
> >
> > > On Wednesday 09 April 2008, Ruslan Sivak wrote:
> > >
> > >
> > > > We have a folder that contains images that are uploaded through
> > > > the web. Sometimes these images are deleted. I have a script
> > > > that runs nightly to commit the changes. It doesn't seem to
> > > > commit deletions properly.
> > > >
> > > > Is there a way to force it to commit deletions? The files were
> > > > deleted through the filesystem and not through svn delete.
> > > >
> > > > Russ
> > > >
> > > >
> > >
> > > You need to "svn rm" them, otherwise SubVersion can't
> tell whether
> > > you
> > really want to delete those files or they are missing by accident.
> > >
> > > You can easily write a script that parses the output of
> "svn status"
> > > and
> > call "svn rm" on all files that were deleted on your
> filesystem (they
> > have the status "!"
> > >
> > > Bye,
> > > Marc
> > >
> > >
> > Perhaps easily on a *nix filesystem, I'm working with windows...
> > Guess I'll have to install perl/python to get this to work?
> >
> > It's so easy in subclipse.. .You just go commit, select all files
> > (including the deletions) and commit. Wish there was a
> --force option
> > or something to svn that would commit local deletions.
> >
> > Russ
>
> You can get UnxUtils from SourceForge
> (http://unxutils.sourceforge.net)
>
> and then use this:
>
> svn status | grep ^^! | gawk "{print $2;}" | xargs svn delete
>

Will gawk "{print $2;}" cope with spaces in the file path?

If not then using the sed command from my earlier post will provide the
whole line (The xargs is a neat replacement for the for loop!):

svn status | grep ^^! | sed "s/\(^!......\)\(.*\)/\2/" | xargs svn
delete

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-04-10 09:33:06 CEST

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.