Tuesday, June 15, 2010
Thursday, August 27, 2009
Today I would like to share an advanced topic in subversion using Tortoise SVN (a windows application, for more info click here).
Before I begin,I would like to tell a real-time use case for which I used svn:externals. I am working on a JAVA which has more than 100 modules and these modules are dependencies for the main project.I have some targets which are very common to all 100 modules (e.g: ant clean, ant reports, some ivy tasks), for this as a general practice I have included common and uncommon targets in every module of build.xml (It means if I want to do any common change for 100 builds, i have to modify 100 builds individually, which is lot of pain, time consuming factor) Then my team lead (John Stotler ) has given an excellent idea of implementing “Externals” into subversion.
After doing some little research and an article written by Jesper in his blog, I got an idea of setting up subversion externals using Tortoise subversion.
This article is written totally in considering the above scenario, svn:externals can be used in many ways for information on multiple scenarios please refer the official document.
Here is the procedure for configuring svn externals for common targets.
- Identify the common targets which are common for all dependencies/modules.Like in my scenario i have more 5 common targets which are required in every module.Common targets in the sense the content which is defined inside the target should be same in all other dependencies:
<target name="clean" description="cleans build directory within your project">
- Create new xml file say (commontargets.xml) and add all the identified common targets in to that file and create folder “commontarget” with tags and trunk as subfolder, further add commontargets.xml to trunk folder.
- Do svn commit so that the folder stores in respective svn repository,Lets say the svn repository url for commontarget is http://subversion.company/repositories/projects/project1/externals/commons/commontargets/trunk/
- Now open the project for which you want to add externals and right click on trunk and select “TortoiseSVN”>”Properties”
- A properties dialogue box opens and click on “New” and “add properties” dialogue box opens and from the top right drop down box select “svn:externals” and in the property value text box paste the commontargets svn repo url and click OK.
- Now open the project and do svn update, then your commontargets folder will in your project trunk folder.
- So do the same process of all projects which has a common targets and if you want to do any changes to common targets, just need to change commontargets.xml and commit the changes, that's it. every thing gonna be easy.
Let me know if you have any issues, I will try to answer.
Wednesday, August 26, 2009
Its been a quite while, I didn't updated any posts in the blog since I was busy with new project with ESPN, I couldn't get enough time to write a new articles.
Today I would like to share new topic which is very important if you are working on windows operating system.The topic is alternative way to checkout subversion repository using a tool called “Tortoise Subversion” also called as TortoiseSVN or TSVN.
TSVN is a windows application software functions all features as ordinary subversion does. TSVN is mostly operated by mouse few clicks, no need to go through start>>run>>cmd.
This is a best and alternative tool used for our regular svn tasks like svn co, scn update, svn commit, svn tag/branch, adding svn externals , svn delete and many more functionalities which we often forget the commands to perform the action.
Lets take a look how can we Install and use TortoiseSVN:
- Win2k SP4, WinXP, Vista or later
- Firefox (Optional)
- This is a free open source software, no need to take loan or pay your year salary to purchase this product :-).
- Get the software from this link , download the respective software based on your operating system (32 bit or 64 bit).
- Download ,Install and restart the computer.
- After restart when you right click the mouse you should see the following screen:
Now its time to test subversion task like checkout, commit and updates.
svn checkout: This is used to download the repository to your work area (your pc), for this you need to create a new folder with your desired project name. To demonstrate we do checkout the code from http://svn.collab.net/repos/svn/trunk/
Create a folder called calc(just for demo, you can create as u wish) and open the calc folder and right click mouse and click on “SVN Checkout”,
a new window opens and enter this url in first box “url of repository” http://svn.collab.net/repos/svn/trunk/ and click ok,
after a while complete code is downloaded from remote url to your local area, when you are done with checkout you will see the green tick on the folder which you created(in our case its calc).
This is a brief description for the process of svn co and you can do similar process for rest of the svn tasks like update, commit etc.
Tip: If you are a Firefox browser lover you can get svn plug-in which helps you to do svn tasks even when you are in web browser, for more information click this link or search tortoise svn Firefox plug-in, screenshot looks like this:
Please feel free to post your comments and queries I will try to answer.
Wednesday, June 10, 2009
Today we will discuss on a new topic called “Installing Apaches servers on same windows operating system where IIS is running.”
Well, If you are reading this article , it means I guess you would have tried to install Apache and you get the following error while installing:
Just ignore this error and go ahead and install apache. Once you have installed you need to change the port number of the Apache server.
To do this:
- Now that apache is installed, go to the folder that it was installed to. On my machine it was c:\program files\apache software foundation\apache2.2
- Go to the /conf folder and open the httpd.conf file (may be named differently in the future or older versions)
- Find the line “Listen 80″ and change to “Listen 8080″. Save the file.
- Open a browser and try “127.0.0.1:8080″ or “ http://localhost:8080 " and you should get a page that says “It works” (that page is the apache default page).
Please let me know if you have any issues in installing or getting some other error, I will try to troubleshoot.
Please forgive me if the procedure doesn't work for you, I am just trying to help you out. If you have alternatives please post and scrap your feedback and valuable comments to encourage me :-).