Subversion Techniques


Intro

Subversion drives me nuts! Here are a few notes to solve issues I have come across from time to time.

How to add a folder to subversion

Recently, I needed to upgrade the system folder of codeigniter from ver. 1.7.1 to 1.7.2. Only the system folder needed to be updated. Somehow my copying removed all the .svn folders (argh!) and I had to recreate the new folder in subversion. Here’s how I did it:

  1. Remove the folder with svn delete {folder_path}.
  2. Commit first! svn commit -m “deleting old outdated folder…”
  3. Copy the new folder into place. cp -r {new_folder_path} {old_folder_path)
  4. Add new folder to repo. svn add {folder_path}
  5. Commit to add back that folder.


Change Hostname on a Checked-out Copy

From the root of your subversion checked-out copy:

1
find . -iname 'entries' -exec sed -i -e 's/{old hostname or ip}/{new hostname or ip}/g' {} \;
This page is wiki editable click here to edit this page.