SpicyCode

The ramblings of Chad Humphries

globzilla – destroyer of subversion

At the office today Nick and I tried an experiment. It was a failed one, but who said all news has to be good news? Here’s how it breaks down.

Step 1: Optimal Optimism

Be lazy enough that you don’t want to use one of the plentiful svn add scripts on the net.

Step 2: Arbitrary Assumptions

Decide, hey, I can make that happen with fewer characters!

Step 3: Shiny Shells

Try to run the following in your sleek zsh shell:

svn add **/* So, this step is awesome! It adds all the new files, while not re-adding existing files. It also has the added benefit of scrolling so much text in your console you have time to get a refreshing drink.

Step 4: Reversion Regret

However, the last step has the added benefit of adding svn ignored files by calling them as explicit targets. This gives us a wonderful experience of learning how to selectly svn revert everything our nuclear svn add option just did.

Step 5: Bowing Back

So what have we learned? Sometimes globs do not solve all problems. Most perhaps, but definitely not all. Also, I’d like to give a shout out to my friend subversion, who enabled me to rollback this mess of a command.

Advertisements

Written by spicycode

May 3, 2007 at 5:49 pm

Posted in programming

Tagged with ,

%d bloggers like this: