Actions

Difference between revisions of "Tortoise SVN"

From Joomla! Documentation

m (Create a patch (after you fixed a bug))
(Update for the latest commits)
(12 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
'''Tortoise SVN''' is a simple solution for Windows users working with Joomla!'s SVN environment. You can use it to download a current copy of the development repository and to create, apply, and revert patches for testing with the Joomla Bug Squad.  
 
'''Tortoise SVN''' is a simple solution for Windows users working with Joomla!'s SVN environment. You can use it to download a current copy of the development repository and to create, apply, and revert patches for testing with the Joomla Bug Squad.  
  
'''Prerequisites:''' A local web host environment, such as [http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development#Install_XAMPP XAMPP] and You administrator privileges on a Windows environment.  
+
'''Prerequisites:''' A local web host environment, such as [http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development#Install_XAMPP XAMPP] and administrator privileges on a Windows environment.  
  
If you are using an IDE, you can generally perform these functions in that environment. [http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development_--_Part_2#Check_Out_Joomla.21_Source_Code Instructions for Eclipse are available.] If you use Eclipse, '''Tortoise SVN''' is not required (although it can still be used along side Eclipse.)
+
If you are using an IDE, you can usually perform these functions in that environment. [http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development_--_Part_2#Check_Out_Joomla.21_Source_Code Instructions for Eclipse are available.] If you use Eclipse, '''Tortoise SVN''' is not required (although it can still be used along side Eclipse.)
  
 
== Install Tortoise SVN ==
 
== Install Tortoise SVN ==
Line 10: Line 10:
  
 
Navigate to the [http://tortoisesvn.net/downloads Tortoise SVN Site].  
 
Navigate to the [http://tortoisesvn.net/downloads Tortoise SVN Site].  
 +
  
 
[[Image:tortoise_download_1.jpg]]
 
[[Image:tortoise_download_1.jpg]]
Line 19: Line 20:
  
 
In order to create and test patches, you need a current copy of the development code repository. Tortoise SVN can be used to connect to the development environment, download the current code base, and place it in your local development environment.
 
In order to create and test patches, you need a current copy of the development code repository. Tortoise SVN can be used to connect to the development environment, download the current code base, and place it in your local development environment.
 +
  
 
[[Image:tortoise_newsite_1.jpg]]
 
[[Image:tortoise_newsite_1.jpg]]
  
 
Create an empty folder for a new Web site within the Web sites folder (usually named htdocs) of your localhost environment.
 
Create an empty folder for a new Web site within the Web sites folder (usually named htdocs) of your localhost environment.
 +
  
 
[[Image:Tortoise svn checkout.jpg]]
 
[[Image:Tortoise svn checkout.jpg]]
  
 
Right-click the name of the empty folder and select '''SVN Checkout''' from the popup list.
 
Right-click the name of the empty folder and select '''SVN Checkout''' from the popup list.
 +
  
 
[[Image:tortoise_checkout_1.jpg]]
 
[[Image:tortoise_checkout_1.jpg]]
  
 
Enter '''http://joomlacode.org/svn/joomla/development/trunk''' for URL of repository and press OK.
 
Enter '''http://joomlacode.org/svn/joomla/development/trunk''' for URL of repository and press OK.
 +
 +
When it asks for the username and password, use "anonymous" as the username and leave the password blank.
  
 
Wait while all files are downloaded from Joomlacode.
 
Wait while all files are downloaded from Joomlacode.
  
== Update for the latest patches  ==
+
== Update for the latest commits ==
  
 
[[Image:Tortoise_svn_update1.jpg]]
 
[[Image:Tortoise_svn_update1.jpg]]
  
 
Right-click the repository created above. Click SVN-Update.
 
Right-click the repository created above. Click SVN-Update.
 +
  
 
[[Image:tortoise_svn_update.jpg]]
 
[[Image:tortoise_svn_update.jpg]]
Line 52: Line 59:
 
[[Image:tortoise_apply_patch.jpg]]
 
[[Image:tortoise_apply_patch.jpg]]
  
Right click-the repository folder and select '''Apply Patch''' from the Pop-up menu.
+
Right click-the repository folder and select '''TortoiseSVN-Apply Patch''' from the Pop-up menu.
  
 
[[Image:tortoise_locate_patch.jpg]]
 
[[Image:tortoise_locate_patch.jpg]]
Line 68: Line 75:
 
[[Image:Tortoise_revert_patch1.jpg]]
 
[[Image:Tortoise_revert_patch1.jpg]]
  
Right-click the repository where you applied the patch. Click Tortoise-SVN-Revert.
+
Right-click the repository where you applied the patch. Click '''TortoiseSVN-Revert'''.
  
 
[[Image:Tortoise_revert_patch2.jpg]]
 
[[Image:Tortoise_revert_patch2.jpg]]
Line 76: Line 83:
 
[[Image:Tortoise_revert_patch3.jpg]]
 
[[Image:Tortoise_revert_patch3.jpg]]
  
Wait until the Revert action is complete, then press ok.
+
Wait until the Revert action is complete, then press OK.
  
 
== Create a patch (after you fixed a bug) ==
 
== Create a patch (after you fixed a bug) ==
Line 90: Line 97:
 
[[Image:tortoise_create_patch3.jpg]]
 
[[Image:tortoise_create_patch3.jpg]]
  
Save the patch file (usually named NNNN.patch where NNNN is the issue number) to your local environment.
+
Save the patch file to your local environment. There is no standard naming convention; many times developesr will named the patch NNNN.patch where NNNN is the issue number and 'patch' is the file extension.
  
 
[[Image:tortoise_create_patch4.jpg]]
 
[[Image:tortoise_create_patch4.jpg]]
Line 96: Line 103:
 
Upload the file as an attachment to the Issue.  
 
Upload the file as an attachment to the Issue.  
  
'''Note:''' always delete old patch files so that it's clear to testers which file to use.
+
'''Note:''' always delete old patch files so that it's clear to testers which file to use.<!-- For most users, there is no option to delete old patches in the user interface -->
  
 
Document your issue to include clear testing instructions.
 
Document your issue to include clear testing instructions.
  
  
[[Category:Bug Squad]]
+
<noinclude>[[Category:Development Working Group]][[Category:Bug Squad]]</noinclude>
[[Category:Development]]
+

Revision as of 16:25, 9 December 2011

Contents

Tortoise SVN

Tortoise SVN is a simple solution for Windows users working with Joomla!'s SVN environment. You can use it to download a current copy of the development repository and to create, apply, and revert patches for testing with the Joomla Bug Squad.

Prerequisites: A local web host environment, such as XAMPP and administrator privileges on a Windows environment.

If you are using an IDE, you can usually perform these functions in that environment. Instructions for Eclipse are available. If you use Eclipse, Tortoise SVN is not required (although it can still be used along side Eclipse.)

Install Tortoise SVN

Tortoisesvn download.png

Navigate to the Tortoise SVN Site.


Tortoise download 1.jpg

Download and install either the 32 or 64-bit option, depending upon your operating system requirements.

Create a local testing environment

Prerequisite:XAMPP or another local host environment.

In order to create and test patches, you need a current copy of the development code repository. Tortoise SVN can be used to connect to the development environment, download the current code base, and place it in your local development environment.


Tortoise newsite 1.jpg

Create an empty folder for a new Web site within the Web sites folder (usually named htdocs) of your localhost environment.


Tortoise svn checkout.jpg

Right-click the name of the empty folder and select SVN Checkout from the popup list.


Tortoise checkout 1.jpg

Enter http://joomlacode.org/svn/joomla/development/trunk for URL of repository and press OK.

When it asks for the username and password, use "anonymous" as the username and leave the password blank.

Wait while all files are downloaded from Joomlacode.

Update for the latest commits

Tortoise svn update1.jpg

Right-click the repository created above. Click SVN-Update.


Tortoise svn update.jpg

Wait until all necessary changes have been made. Click OK to close the dialog box.

Apply a patch

Tortoise download patch.jpg

Download the patch file from an Issue report on Joomlacode. (File tab on bottom of an issue report page.) Save it to your local environment.

Tortoise apply patch.jpg

Right click-the repository folder and select TortoiseSVN-Apply Patch from the Pop-up menu.

Tortoise locate patch.jpg

Locate the patch saved above, click open.

Tortoise patch all.jpg

When "File patches" dialog box to appear, right click and select "Patch all."

Close the Dialog boxes and test the patch.

Revert a patch (remove it after testing)

Tortoise revert patch1.jpg

Right-click the repository where you applied the patch. Click TortoiseSVN-Revert.

Tortoise revert patch2.jpg

Select specific files or all files (bottom) to revert the patch changes. Press OK.

Tortoise revert patch3.jpg

Wait until the Revert action is complete, then press OK.

Create a patch (after you fixed a bug)

Tortoise create patch1.jpg

Right-click the repository where you made changes to the code. Click TortoiseSVN-Create patch....

Tortoise create patch2.jpg

On the Create Patch Dialog box, select the specific file(s), or all files (bottom) that apply to the patch changes. Press OK.

Tortoise create patch3.jpg

Save the patch file to your local environment. There is no standard naming convention; many times developesr will named the patch NNNN.patch where NNNN is the issue number and 'patch' is the file extension.

Tortoise create patch4.jpg

Upload the file as an attachment to the Issue.

Note: always delete old patch files so that it's clear to testers which file to use.

Document your issue to include clear testing instructions.