How to relocate repository root URL of your Subversion working copy
Ever had this issue a administrator changed the location of the repository?
Well, I had
Relocating the URL of the repository is quite simple with svn switch --relocate, here you have some simple steps to fix your working copy.
1. Go into the current working copy.
cd /path/to/your/working/copy
2. Get the current repository root URL.
svn info
3. Now switch the old repository root to the new repository root.
svn switch --relocate http://old_repository_root http://new_repository_root
4. Optionally you can verify if the relocate went successful.
svn info
How to show hidden .htaccess files in Eclipse and Aptana
Most webdevelopers require .htaccess files to be visible in their projects, since by default Eclipse and Aptana both hide files starting with a . (=period) this can be quite irritating since you have to open the file from your operating system file explorer.
The fix to make .htaccess files visible is quite simple, you have to modify the file browser view filter to show hidden files but hide certain file types so you won't get a mess in your view.
First goto the filters menu by clicking the little arrow on the top right of the file browser and click 'Filters...'.
When you are at the filter menu you will see the following window:

In this window uncheck '.* resources' and check 'Name filter patterns (matching names will be hidden):'.
Now you have to add a filter because you will be flooded by hidden files in your file explorer.
The filter I used is:
._*, .svn, .cvsignore, _notes, .*.swp, .DS_Store, .AppleDouble, .project, .buildpath, .settings, .git, .nbproject
You might append more filters to your needs.
In case you have a remote filesystem plugin installed you might need to check 'Show hidden files' in your preferences.
This is an example how this window might look:

Another handy thing to know, never edit the .project file!
That was about it for now, happy coding!
How to copy/move code between Subversion repositories
I found this solution to move your code/projects between repositories, maybe not the most ideal way but it works great! Thanks to Dan Forys!
As many coders will tell you, there reaches a point where you realise that you absolutely, positively must keep your code in a a revision control system. In my working life, I’ve used Microsoft’s ageing SourceSafe and more recently the vastly superior SubVersion (SVN).
There’s many powerful GUIs out there which you can use to interact with SVN, and make the checking out and checking in very easy. If you primarily use a desktop GUI (like me), then chances are you use a SVN client GUI to interact with SVN on a day-to-day basis.
But what happens when you need to move code between repositories?
I first realised I needed to reorganise my repositories when my single “clients” repository was growing unwieldy. It was one large repository, with all my client work organised into folders by the project name. This method keeps things very tidy, but increments the version numbers with every commit on every project and means you have a very long root log.
A better way, I realised, is to keep the unrelated projects organised in their own repositories – but how to move the code out of my client repository into a new one?
To do this, you’ll need shell access to your SVN server (surely you do – otherwise, how do you create your repositories?)
SVN provides the svnadmin dump command to export data from your repository. In my case, to dump the contents of my entire clients repository, I did the following:
svnadmin dump clients > clients-dumpfile
Which creates a text file called clients-dumpfile containing all the revision data for my clients repository. Note that this can create a very large file, as it’s not stored in the ultra-efficient space-saving SVN database any longer.
Say I want to move all my code from a folder called client-1, and put it in its own repository. First thing I need to do, is to create the destination repository:
svnadmin create client-1-repository
Now – the dumpfile contains all the code for all the projects, so how do I filter out the other projects? (this is all one line)
svndumpfilter include client-1 --drop-empty-revs --renumber-revs --preserve-revprops < ./clients-dumpfile > ./client-1-filtered-dumpfile
What does this do? It takes the previously created clients-dumpfile and sends it through the svndumpfilter program. I’ve told it to include the client-1 folder (and throw away everything else). I’ve told it to drop the empty revisions left behind by the thrown away data, and renumber the rest of the revisions so my new repository is nicely sequentially numbered. The results from svndumpfilter are output into a new file called client-1-filtered-dumpfile.
Finally, you simply load the data into the new repository:
svnadmin load client-1-repository < client-1-filtered-dumpfile
Hopefully, you now have a populated repository with your clients’ code.
How to upgrade CakePHP or any other package that is under subversion control with Rsync
Actually this is more simple than you might think.
First you checkout your current version. Then download and un-tar the new version and simply run the following command on your shell/terminal:
rsync -av --exclude '.svn' --exclude '._*' my/new/cakephp-cakephp-efb6e08/ my-old-cakephp/
This will exclude your Subversion .svn directories and it will also exclude the META-data files created by Mac OS X.
Good luck with upgrading!





