This site is no longer updated, please visit peterjmanis.com

Learning more than I thought I would

253 views
Posted April 10, 2007 at 08:04pm in Programming

When I began working on the FTA project I went in thinking I would learn a lot about Joomla and I would improve my PHP and MySQL skills, but I never thought I would be learning quite as much as I have. I work with subversion daily, but in a single user environment and in Windows, so I really don’t get to deal with conflicts very often or use the command line much when working with svn. With this project I have to do more from the command line. I do not have FTP access to the website I could probably ask for it, but as soon as I started I just downloaded a copy of the repository to the server and I export the code to the Joomla directory. Maybe not as quick as uploading a file via FTP, but nobody ever got hurt from using the cli to do things. Well maybe some poor developer that got tied into a online gambling site for the mob and made the site go down for 10 minutes, but I don’t work for the mob during the work week (jk).

Sunday I just had my first conflict within subversion and boy was it fun. I mean it, I learned how TortoiseSVN handles conflicts and resolving them. I have tried to create my own conflicts in the past to learn more, but it never seemed to work out exactly as it does when you aren’t expecting it.

I should have taken a screen shot, but for those of your who are in the middle of working out a conflict you can follow along. If you are using TortoiseSVN and you have a conflict you will hear a nice little sound that is so cheerful it might just send you into a state of depression. Find the file it is telling you that is conflicted and in that directory you will see 4 files with that name. Those are filename.ext, filename.mine, filename.firstrevision, filename.latestrevision. The firstrevision and latestrevision will be integers that represent the revision that file represents. So if the first revision is 97 it would be filename.97 and the last revision 115 would be filename.115. Right click on the filename.ext and in the TortoiseSVN menu you will see Edit Conflict, which will bring up a diff viewer for you to compare the two revisions and your code. Analyze each copy and add the corrected text blocks to the mine file at the bottom and click the save button. Now go to the filename.ext and right click, go to the TortoiseSVN menu again and choose Resolved. This will change the code in that file to the code in the .mine file and then you can commit to the repo.

The more I work with subversion and TortoiseSVN the more I fall in love. Seriously, there are not that many programs that I am so impressed with and while there are a lot with an incredible amount of functionality there always seems to be something lacking for me. SVN and TSVN seem to cover everything I could want. That may change the more I learn, but being able to add hooks to SVN I would be suprised if I couldn’t add it myself.

  • Google
  • del.icio.us
  • Digg
  • Spurl
  • Facebook


Leave a Reply