Posted By

tylerhall on 04/08/08


Tagged

svn Bash recursive add


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

noah
moonbather
mybluevan
Wilco
caphun
Xantas


SVN Add Recursively


 / Published in: Bash
 

This adds all new files to SVN recursively. It doesn't work for files that have spaces in their name, but why would you create a file with a space in its name in the first place?

  1. svn status | grep "^\?" | awk '{print $2}' | xargs svn add

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Tenzer on April 9, 2008

I think this should work with files which contains whitespaces as well, at least from my testing: svn status | sed -n '/^\?/ s/\? //; s/ /\ /p' | xargs svn add

Posted By: Tenzer on April 9, 2008

I just noticed that the extra whitespaces was removed from my post. This corrects it, and is probably also better: svn status | sed -n '/^\?/ s/\?\s+//; s/ /\ /p' | xargs svn add

Posted By: fenice on April 10, 2008

This latest command doesn't work for me, it doesn't remove lines with ! at the beginning. Here is my solution to add new files to svn (also files with whitespaces) :

svn status | grep '^\?' | sed -e 's/^? (.)/\1/;s/ /\ /g' | xargs svn add

Posted By: fenice on April 10, 2008

This latest command doesn't work for me, it doesn't remove lines with ! at the beginning. Here is my solution to add new files to svn (also files with whitespaces) :

svn status | grep '^\?' | sed -e 's/^? (.)/\1/;s/ /\ /g' | xargs svn add

Posted By: Pulsar on December 12, 2008

all it much simplier :) http://svnbook.red-bean.com/en/1.1/re01.html

$ svn add * --force A foo.c A somedir/bar.c A otherdir/docs/baz.doc [...]

Posted By: Pulsar on December 12, 2008

sorry for misposting

$ svn add * --force

A foo.c

A somedir/bar.c

A otherdir/docs/baz.doc

[...]

Posted By: fashiongilr on July 5, 2010

It’s so many designs of coach sandals on the web. But is it everything match your style? Maybe our consultants can offer you some tips on your coach factory outlet. Hey!Just be yourself. You will be surprised at our price and service because we are the coach factory store. Enjoy your shopping time and have a good day.

Posted By: rayallen on July 5, 2010

Our coach outlet online and coach outlet store is a professional offer coach brand like coach purse, coach outlets and the price is reasonable because we have our coach factory and here you also find the coach outlet store online. I am sure it will save you a lot of time and money if you buying from us.

Posted By: rayallen on July 5, 2010

MBT shoe is anti-shoe, Factory Direct, Top Quality. 60% OFF,$85 ONLY.MBT would like to help people around the world live more active, healthier and happier lives. [URL=http://www.prombtshoes.com/mbt-men-shoes-c-1.html]shoes mbt[/URL] attempt to awaken and strengthen the awareness of physiologically correct walking by publicizing the idea and concept of [URL=http://www.prombtshoes.com/mbt-men-shoes-c-1.html]Mbts[/URL] physiological footwear. They will not only change the way you use your muscles, but also will improve the use of your joints and spine. [URL=http://www.prombtshoes.com/mbt-women-shoes-c-3.html]mbt women[/URL] shoes sale promotion has been launched.

Posted By: rayallen on July 5, 2010

MBT Fora

Posted By: Swei on August 23, 2010

Market is flooded UGG Boots on Sale with different types UGG Classic Short Boots of leather UGG Classic Tall Boots bags and wallets UGG Argyle Knit Boots. When it comes to UGG Bailey Button Boots choosing a leather bags UGG Classic Cardy Boots or wallet, UGG Baby Coach Leather bags Kids UGG Boots and wallets are Timberland Shoes something that Shoes Timberland you can rely Vibram Five Fingers on. Coach leather bags Vibram FiveFingers and wallets a have Discount Vibram Five Fingers been in the Discount Vibram FiveFingers market since Discount Vibram 1940s. These leather bags Prada Shoes have made a distinguished Gucci Shoes in the market. Not only Coach Bags in terms of quality these leather Coach New Style Bags are popular for both Coach New Style Bags and elegance. Before you go to purchase a leather prada Bags, make up your Gucci Bags which kind of Chanel Bags you want to go for Louis Vuitton Bags. Since these wallets are Jimmy Choo Bags in different colors, Tous Bags and design MBT Shoes you are a MBT Shoes on sale confused as to which MBT Sandals to buy MBT Shoes Outlet. Here are a MBT Sandals on Sale tips to MBT Outlet choose which for MBT Men’s Shoes who are fond of carrying MBT Women’s Shoes all the time, going for a Outlet MBT leather bag also. Ray Ban Sunglasses or bag suits Oakley Sunglasses. Here are lots of Chanel Jewelry first of all Chanel Jewelry Outlet if you are Jewelry Outlet kind of Tiffany Jewelry outlet who carry more Tiffany Jewelry cards than Chanel Jewelry Online, go for the Jewelry Online Outlet which have more credit Cartier Jewelry compartments.

Posted By: clarklouis on September 7, 2010

coach outlet coach handbags chanel handbags cheap coach handbags cheap chanel handbags shox shoes

Posted By: xingzi0928 on October 6, 2010

Lady Christian Louboutin 2010 new collections, cheap and discount Christian Louboutin Pumps shoes for sale.Own Christian Louboutin is the best choice for most occasions like party, wedding and bridal, wear pinkChristian Louboutin Boots or purple louboutin heels.Buy cheap Christian Louboutin Pumps online, Christian Louboutin outlet store,knockoffChristian Louboutin Sandals,louboutin mall all for sale at cheap Christian louboutin price, just enjoy your shopping!Hermes birkin Handbags are the most famous designer Hermes handbags in the world.?you still anxious for when you can get your much-awaited Hermes Birkin bags? Be easy now, buybirkin here offers you the top qualityHermes Kelly Bags, including Birkin bags, Hermes Birkin Bags , Lindy bags, HERMES PURSE and also the?HERMES BELT. We offered 2010 new style?Moncler,?Moncler Jackets,?Moncler Mens Coats. Moncler presents a special limited edition jacket for this year.Moncler’s products including? Moncler Jackets Vest,Moncler Vests, Moncler Kid's,Moncler Boots etc, Moncler Polo Shirt . are available for varied aged groups of people.Herve Leger Dresses?is bright among the discount dress. In our store, you can chase after every kind of Herve Leger Dresses,Herve Leger bandage dress you want. We offer the cheapest and high-quality?Herve Leger Skirts Bandage?and? Herve Leger Strapless ,Herve Leger Skirts, 2010 new style Herve Leger no sale tax, free shipping, don't miss opportunity to save.

Posted By: ahmet0851 on March 16, 2011

I use : svn status | grep '?' | sed 's/[?]//' | sed 's/^[ ]//'

Posted By: ahmet0851 on March 16, 2011

svn status | grep '?' | sed 's/[?]//' | sed 's/^[ ]//'

Posted By: ahmet0851 on March 16, 2011

Textile bug (whitespace and star)

svn status | grep '?' | sed 's/[?SPACE]STAR//'

You need to login to post a comment.