Changes between Version 2 and Version 3 of SVN_Basics
- Timestamp:
- Mar 22, 2011, 10:18:17 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SVN_Basics
v2 v3 1 [[TOC]] 2 1 3 = SVN Basics = 2 4 3 [http://subversion. tigris.org/ Subversion] (SVN) is a version control system. It is designed to be distributed, concurrentand expandable.5 [http://subversion.apache.org/ Subversion] (SVN) is a version control system. It is designed to be distributed, concurrent, and expandable. 4 6 5 [http://svnbook. red-bean.com/ Version Control with Subversion] is a wonderful book to help on making the first steps insideSubversion. You may also ready it online.7 [http://svnbook.org/ Version Control with Subversion] is a wonderful book to help you take the first steps into the world of Subversion. You may also ready it online. 6 8 7 9 == SVN Client == 8 10 9 To work on the CKEditor SVN, you need a '''SVN client''' software. There are two options that we recommend:11 To work on the CKEditor SVN, you need an '''SVN client''' software. There are two options that we recommend: 10 12 11 * [http://tortoisesvn. sourceforge.net/ TortoiseSVN] (strongly recommended),for Microsoft Windows.13 * [http://tortoisesvn.net/ TortoiseSVN] (strongly recommended) for Microsoft Windows. 12 14 13 * [http://subversion. tigris.org/ The official SVN client], included in most Linux and BSD distributions; available for Linux, BSD, Mac OS X, and Windows.15 * [http://subversion.apache.org/ The official SVN client], included in most Linux and BSD distributions; available for Linux, BSD, Mac OS X, and Windows. 14 16 15 == Checkout the CKEditor trunk ==17 == Checkout the CKEditor Trunk == 16 18 17 '''Checkout''' is the act of downloading the CKEditor code from our SVN server in side a local folder in your computer. This folder is called"local copy".19 '''Checkout''' is the act of downloading the CKEditor code from our SVN server into a local folder on your computer. This folder is called a "local copy". 18 20 19 21 === With TortoiseSVN === 20 22 21 1. Create an empty folder, which will be your local copy root. You may give any name for it, like "ckeditor".23 1. Create an empty folder, which will be your local copy root. You may give it any name you wish, like {{{ckeditor}}}. 22 24 23 2. Right-click on the new folder and select '''SVN Checkout...'''.25 2. Right-click the new folder and select '''SVN Checkout'''. 24 26 25 3. In the URL of repository,paste the following URL:27 3. In the URL field for the repository paste the following URL: 26 28 27 29 {{{ 28 http://svn. fckeditor.net/CKEditor/trunk/30 http://svn.ckeditor.com/CKEditor/trunk/ 29 31 }}} 30 32 31 33 === With SVN === 32 34 33 1. In the command line , go to the folder where you want your local copy folderreside in.35 1. In the command line go to the folder where you want your local copy to reside in. 34 36 35 37 2. Type the following to checkout the trunk: 36 38 37 39 {{{ 38 svn checkout http://svn. fckeditor.net/CKEditor/trunk/ ckeditor40 svn checkout http://svn.ckeditor.com/CKEditor/trunk/ ckeditor 39 41 }}} 40 42 41 Your local copy will be found in the "ckeditor"folder.43 Your local copy will be found in the {{{ckeditor}}} folder. 42 44 43 45 == Updating your Local Copy == 44 46 45 At any moment ,you may '''update''' your local copy to grab the code changes introduced in the repository since the checkout or the last update call.47 At any moment you may '''update''' your local copy to grab the code changes introduced in the repository since the checkout or the last update call. 46 48 47 49 === With TortoiseSVN === 48 50 49 1. Right-click onyour local copy folder.51 1. Right-click your local copy folder. 50 52 51 53 2. Select '''SVN Update'''. … … 53 55 === With SVN === 54 56 55 1. In the command line , moveto your local copy folder.57 1. In the command line go to your local copy folder. 56 58 57 59 2. Type: … … 63 65 == Creating Patches == 64 66 65 Suppose you are working to provide a fix for a ticket, for example ticket number 240. The first thing to be sure is that your local copy is fresh, so updateit (see above).67 Suppose you are working to provide a fix for a ticket, for example ticket number {{{240}}}. The first thing to check is that your local copy is fresh, so start with updating it (see above). 66 68 67 Then , start coding inside your local copy. You can do any kind of change. Everything will be done in your computer locally. Nothing will automatically end up in the SNV server. So,you can safely play with the code.69 Then start coding inside your local copy. You can do any kind of change. All the changes will be done locally on your computer and nothing will automatically end up in the SVN server. This means that you can safely play with the code. 68 70 69 Once you have completed coding and well tested it, you may return your changes back to the SVN, so it will be available to everybody (other than being a license requirement :). At that point,you create a '''patch file''' to attach to the ticket.71 Once you have completed your code and properly tested your changes you may return your changes back to the SVN, so they will be available to everybody. At that point you create a '''patch file''' to attach to the ticket. 70 72 71 73 === With TortoiseSVN === 72 74 73 1. Right-click onyour local copy folder.75 1. Right-click your local copy folder. 74 76 75 2. Select '''Create patch ...'''.77 2. Select '''Create patch'''. 76 78 77 79 3. TortoiseSVN will list all files that have been changed. You may select the files that are relevant to the patch. Remember that each patch must be relative to a single ticket or feature. Do not mix ticket fixes or several different features. 78 80 79 4. Click ing "Ok", save the patch file with the appropriate name. If the patch is supposed to fix a ticket, just use the ticket number for it, like "240.patch".81 4. Click "OK" to save the patch file with the appropriate name. If the patch is supposed to fix a ticket, just use the ticket number for it, like {{{240.patch}}}. 80 82 81 The patch file is ready to be attached to the ticket.83 The patch file is now ready to be attached to the ticket. 82 84 83 85 === With SVN === 84 86 85 1. In the command line , moveto your local copy folder.87 1. In the command line go to your local copy folder. 86 88 87 2. Type the following , supposing you are creating a patch file for ticket 240:89 2. Type the following (suppose you are creating a patch file for ticket {{{240}}}): 88 90 89 91 {{{ … … 91 93 }}} 92 94 93 The patch file is ready to be attached to the ticket.95 The patch file is now ready to be attached to the ticket. 94 96 95 97 == Applying Patches == … … 99 101 === With TortoiseSVN === 100 102 101 1. Right-click onyour local copy folder.103 1. Right-click your local copy folder. 102 104 103 2. Select '''Apply patch ...'''.105 2. Select '''Apply patch'''. 104 106 105 107 3. Select the patch file. You will be presented with the "Diff" tool, so you can review all changes. … … 109 111 === With SVN === 110 112 111 The official SVN program does n't include a built in command to apply patches. To do that, you can use the regular "patch"Unix utility:113 The official SVN program does not include a built-in command to apply patches. To do that, you can use the regular {{{patch}}} Unix utility: 112 114 113 115 {{{