Changes between Initial Version and Version 1 of SVN_Basics


Ignore:
Timestamp:
Dec 30, 2007, 3:39:08 PM (12 years ago)
Author:
Frederico Caldeira Knabben
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SVN_Basics

    v1 v1  
     1= SVN Basics =
     2
     3[http://subversion.tigris.org/ Subversion] (SVN) is a version control system. It is designed to be distributed, concurrent and expandable.
     4
     5[http://svnbook.red-bean.com/ Version Control with Subversion] is a wonderful book to help on making the first steps inside Subversion. You may also ready it online.
     6
     7== SVN Client ==
     8
     9To work on the FCKeditor SVN, you need a '''SVN client''' software. There are two options that we recommend:
     10
     11 * [http://tortoisesvn.sourceforge.net/ TortoiseSVN] (strongly recommended), for Microsoft Windows.
     12
     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.
     14
     15== Checkout the FCKeditor trunk ==
     16
     17'''Checkout''' is the act of downloading the FCKeditor code from our SVN server inside a local folder in your computer. This folder is called "local copy".
     18
     19=== With TortoiseSVN ===
     20
     21 1. Create an empty folder, which will be your local copy root. You may give any name for it, like "fckeditor".
     22
     23 2. Right-click on the new folder and select '''SVN Checkout...'''.
     24
     25 3. In the URL of repository, paste the following URL:
     26
     27{{{
     28http://svn.fckeditor.net/FCKeditor/trunk/
     29}}}
     30
     31=== With SVN ===
     32
     33 1. In the command line, go to the folder where you want your local copy folder reside in.
     34
     35 2. Type the following to checkout the trunk:
     36
     37{{{
     38svn checkout http://svn.fckeditor.net/FCKeditor/trunk/ fckeditor
     39}}}
     40
     41Your local copy will be found in the "fckeditor" folder.
     42
     43== Updating your Local Copy ==
     44
     45At 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
     47=== With TortoiseSVN ===
     48
     49 1. Right-click on your local copy folder.
     50
     51 2. Select '''SVN Update'''.
     52
     53=== With SVN ===
     54
     55 1. In the command line, move to your local copy folder.
     56
     57 2. Type:
     58
     59{{{
     60svn update
     61}}}
     62
     63== Creating Patches ==
     64
     65Suppose 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 update it (see above).
     66
     67Then, 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.
     68
     69Once 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.
     70
     71=== With TortoiseSVN ===
     72
     73 1. Right-click on your local copy folder.
     74
     75 2. Select '''Create patch...'''.
     76
     77 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
     79 4. Clicking "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".
     80
     81The patch file is ready to be attached to the ticket.
     82
     83=== With SVN ===
     84
     85 1. In the command line, move to your local copy folder.
     86
     87 2. Type the following, supposing you are creating a patch file for ticket 240:
     88
     89{{{
     90svn diff > 240.patch
     91}}}
     92
     93The patch file is ready to be attached to the ticket.
     94
     95== Applying Patches ==
     96
     97Suppose you have a fresh local copy of the FCKeditor trunk repository and you want to apply a patch found in one of our tickets.
     98
     99=== With TortoiseSVN ===
     100
     101 1. Right-click on your local copy folder.
     102
     103 2. Select '''Apply patch...'''.
     104
     105 3. Select the patch file. You will be presented with the "Diff" tool, so you can review all changes.
     106
     107 4. In the "File patches" window list, right-click and select "Patch all".
     108
     109=== With SVN ===
     110
     111The official SVN program doesn't include a built in command to apply patches. To do that, you can use the regular "patch" Unix utility:
     112
     113{{{
     114patch -p0 < patch_file
     115}}}
     116
     117You may also find a [http://gnuwin32.sourceforge.net/ Windows port for the patch program].
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy