Thursday, May 15, 2008

SVN Branches

Imagine working on a deployed project, and you want to add some new features and changes on the running copy.

Since making new features may cause problems in the deployed project, you need to have another copy from the application and work on it freely then merge it with the running copy to apply your changes.

Subversion makes this very easy, all you need to do is to create a new branch.

So, what is a branch?

in order to understand that, lets look at the repository location hierarichy, you will find that it is as follows
--
-- trunk
-- branches
  • trunk is the folder containing the version of the website currently deployed

  • branches is another folder containing some other versions, as a new edition of the application
Now, in order to do that, just run this command

svn copy ((repository-path))/((project-name))/trunk ((repository-path))/((project-name))/branches/((branch-name)) -m "Creating a private branch in order to ... bla bla bla"


now you are done with your branch, checkout the project from that new path, and do any changes you want freely then at the end merge with your trunk to apply your changes

Monday, May 5, 2008

acts_as_changed plugin farewell

i used acts_as_changed plugin since a while and i have been enjoying the idea of being capable to know which attributes has been changed in my model and to take action upon certain attributes changes

and today i only tried to look at it again to know if there are any changes made in it or not but, i was shocked when i read a comment from the owner stating that it isn't plugin anymore

it is now an alternative base.rb file that you can update your activerecord with if you want to enjoy the plugin functionality once again

and he stated that he did so because he was facing problem in callbacks that he couldn't solve till now except through this way

anyway, i hope he finds a solution for it so that we all benefit from this plugin functionality