SVN is like trees

SVN trunk, branches and tags

Working with SVN is somewhat like growing a tree:

a tree has a trunk and some branches
branches grow from the trunk, and thinner branches grow from thicker branches
a tree can grow with a trunk and no branch (but not for long)
a tree with branches but no trunk looks more like a bundle of twigs fallen on the floor
if the trunk is sick, so are the branches and eventually, the whole tree can die
if a branch is sick, you can cut it, and another one may grow
if a branch grows too much, it may become too heavy for the trunk, and the tree will fall down
when you feel your tree, your trunk, or a branch is nice looking, you can take a picture of it to remember how nice it was that day

read the whole article here

Share

SVN reseting, the hard way

So, my subversion screwed up my remote repository, not allowing me to commit any local changes.
Unfortunately, it screwed up my local repository too with those .svn folders and directories so I had to do a hard way reset to make it work again.

This is how I did it:

First of all BACKUP BACKUP BACKUP!
I checked out my files at a new temporary directory:
cd tempmplampla
svn checkout http://myremoterepository/code

then delete everything in it:
svn remove *

then commit the changes:
svn commit

The remote repository is empty again. Nice!

I run the following command at my local repository to clean all the svn files:
cd /cleanedworkingcopy/
find . -name “.svn” -type d -exec rm -rf {} \;

Now you just have to copy the “cleaned” directory to the temporary directory you checkedout before:
cp -r /cleanedworkingcopy/* /tempmplampla/

and commit the new files once again:
svn add *
svn commit

That’s it!

Share