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

Re: Using svn in a unix pipe

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-05-03 02:07:13 CEST

On 5/2/06, Baz <brian.ewins@gmail.com> wrote:
> On 5/2/06, Garrett Rooney <rooneg@electricjellyfish.net> wrote:
> > svn st | grep ^\? | awk '{ print $2 }' | xargs svn add
> >
> > And it works just fine (assuming there aren't any spaces in your
> > filenames anyway).
> >
> > -garrett
>
> try this:
> svn st | grep ^\? | awk '{ print $2 }' | tr "\n" "\000" | xargs -0 -n1 svn add
>
> that should work if there's spaces in the filename, but one add at a
> time (I'm not sure if you absolutely *need* -n1 if you're using -0,
> but I've always stuck to the tricks I know)

The problem is that 'print $2' in awk will only print out the second
field, and by default it splits on whitespace, so if you've got
filenames with spaces $2 is only the first chunk of it, so I suspect
that tr won't help...

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed May 3 02:08:17 2006

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.