13 Oct
Posted by: Brandon Harper in: ColdFusion, Subversion, Tips, Hacks, & Tricks, Tools
Today I wanted to grab the latest revision of Model Glue in hopes of checking out something which is fairly intriguing to me, Coldspring integration. I'm unable to do this from my workstation, so I SSH'ed to my FreeBSD box at home (the server which you're reading this page from) to grab it via the Subversion command line client.
One annoying thing about doing a checkout of a Subversion branch is that it also grabs all of the .svn directories which contain the history of changes. This is fine if you plan on committing changes to the code base, but not if you just want a working copy of it. These directories can get quite large and take up an incredible percentage more space than the code. To get rid of these directories before SCP'ing the code to my workstation, I used this command to clean out all of those directories (from the root directory where I pulled down the code):
This cleaned out all of the cruft that I didn't need, and I was able to grab it without needing to gzip it first. Hopefully this helps someone else faced with a similar problem.
Update: Even though the same thing can be done with an svn checkout command, this command is still very useful when you've created new code and added it to svn, but then refactor/move it before you check it in. You can delete all of the .svn files and directories, and then add the directories/files back into subversion again without it getting angry at you.
9 Responses
infused
13|Oct|2005 1Do you have CF running on FreeBSD???
Brandon Harper
13|Oct|2005 2At the moment, no, as I refuse to pay so much for software licensing for a personal site when PHP, Java, Python, Ruby, et al are free.
However, it's not really that hard to do as long as you know FreeBSD fairly well.
Steve Rittler
13|Oct|2005 3Couldn't you have done a "svn export" instead of a checkout? Sounds like you wanted to look, not so much actually work on the code...that would have been sufficient (i think!) to drop the .svn folders and such.
Pete Freitag
13|Oct|2005 4Brandon, you can use
svn exportto checkout the code when you don't intend to check it back in. It just grabs the files for you.Brandon Harper
13|Oct|2005 5Right.. I already use that in the Ant task I usually use to pull stuff from svn, doh.
I got all geeked-out about figuring out a way to do delete the .svn directories via a command and forgot about export.
Tim Scollick
28|Jan|2008 6Brandon,
Don't listen to them. This is a great trick!
I didn't know about export either (but will never make that mistake again). This saved me a lot of trouble.
Thanks!
Tim
Brandon Harper
29|Jan|2008 7Tim,
Yes, I agree, I still use this one all the time. Usually to clean-up code when I need to check it in but it's been copied from another svn repo (like when merging new code in a branch into trunk, etc).
House of Code
01|Mar|2008 8Subversion Obliterate, the forgotten feature...
Subversion Obliterate has been a much wanted feature for many years now, yet it is not even planned or mentioned on the Subversion roadmap. Discussions have been going on and money has been waving, yet still no movement towards a concrete implementatio...
Cómo borrar recursivamente todos los subdirectorios .svn | Lobo tuerto
28|Apr|2008 9[...] Recursively delete .svn directories Unix Command To Remove Subversion .svn Directories Recursively remove all .svn [...]
Leave a reply
Search
Categories
Archives
Links
Calendar
A design creation of Design Disease
devnulled is a personal blog and reflects the ideas and opinions of brandon harper and not his employer, dog, shoes, or stapler.
All content copyright © 2002-9002 brandon harper. All rights reserved.
devnulled is powered by FreeBSD, WordPress and the combustion of dead dinosaurs. It has also been made magically delicious by the pfm module.