|
Submit new documentation |
View Documentation TortoiseSVN
This tutorial is focusing on using SVN for your project(s) with the SVN client
TortoiseSVN. That is a good choice if you are using Windows. If you are using
Linux/Unix or MacOS, then the command line SVN client can be installed for your
distribution of choice. See http://subversion.tigris.org
The tutorial is partly taken from Using
Subversion at PLU with Tortoise SVN
Using TortoiseSVN
Download TortoiseSVN here.
When you have installed TortoiseSVN you will have a TortoiseSVN menu in the
context menus in Windows Explorer (that is, when you right-click a folder or
file).
So with Windows Explorer open, follow the following steps to check-out from
and commit to your SVN project.
Importing Files Into Your SVN Project
- Create a folder on your local computer for all your project files (for example
c:\svn\modules\modulename or c:\svn\nameoflanguage)
- Put all your language files in the folder you created using the following
structure:
Modules:
/trunk/
Translations:
/admin/lang/xx_XX/ for admin translations
/modules/ModuleName/lang/xx_XX/ for each module
Note: xx_XX is the locale
for your language. It's important that also the module translations are put
in a sub-folder called xx_XX, just like the admin.
- Import files to your SVN project (that is from your local computer to the
SVN repository on the CMSMS server):
- Right-click on your project's folder name and select TortoiseSVN/Import
- In the field "URL of repository" type http://svn.cmsmadesimple.org/svn/unixnameofproject
(the SVN URL of your project, see the SCM tab in your project).
- In the Import Message textarea type a message about the files that you
are importing, for example "Initial import".
- Click OK and enter your CMSMS Forge username and password in the dialog
window (check the box to save the password for later, so that you don't
have to type it every time)
Now you have created a folder structure with your files in the project repository
for the Bulgarian language project. You can view the files at http://viewsvn.cmsmadesimple.org/viewsvn/?root=bul
Checking Out a Working Copy From SVN
- Check Out a Working Copy (i.e. downloading from the SVN repository to your
local computer):
- Right-click in the bul folder and choose "SVN Checkout".
- In the dialog window, type the same url as above. You don't need to
change anything else.
- Click OK. Perhaps you may have to type your password again. After that
you will see a window that tells you what files are added or updated from
the repository (i.e. if there are later versions in svn than on your local
computer).
You will now see a green check mark on your svn folders, indicating that the
file/folder is under subversion "control" and that the file has
not been changed on your local computer since you last checked it out.
Working With Your Local Working Copy
If you make any changes on your local computer (changing file name, moving
files and folders, adding/deleting files etc.) you must let SVN know about it.
Then, use the TortoiseSVN menu instead of deleting/moving like you normally
delete/move a file.
If you have made changes to a file there will be an exclamation mark in a red
circle for that file and its folder (instead of the green check mark).
If a file doesn't have any symbol, SVN doesn't know about it. Then you need
to add it to your project by right-clicking on the file and choosing TortoiseSVN/Add.
Then that file is marked for addition and will be added to your SVN repository
when committing (see below).
Committing Changes to Your Project's SVN Repository
To commit means sending all local changes (file adds, file changes, deletes,
moves, renames etc.) to the server. Do this when you have made all the changes
for the day.
- First see if other changes have been made by others since you last checked-out.
Right-click and choose "SVN Update".
- To commit your changes, right-click on the root folder (c:\svn\bul in this
example) or in the white space when you are in the folder that you want to
commit, and choose "SVN Commit".
- Write a comment about the commits that you will make. This helps you keep
track of changes you make to a project. Below you can select to uncheck files
if you don't want to commit all the changes you have made.
- Then click OK and type your password if you haven't selected to save it.
WORKFLOW SUMMARY
- Checkout a working copy from the SVN repository or Update if you already
have a local working copy.
- Make your changes, additions etc. and let SVN know about them.
- Right-click on your root folder and click "SVN Update" to see
if others have changed files while your were working. You will be alerted
if there are conflicts and asked to fix those conflicts before you commit.
- Commit your changes to the SVN repository.
- Optionally delete your working copy (as you will checkout from the SVN repository
next time you work, or if you keep the working copy you just Update, see 1).
Please let us know if you still have questions and if something in this tutorial
can be described in a way that is easier to understand!
|