WS-Escape::svn howto

From Xtreemos

Cstratan (Talk | contribs)(New page: == SVN crash course for WS-escape developers == This crash course was initially written for Obaid Maroof who asked for more information about svn. Of course, all other WS-escape develop...)Next diff →

Current revision

Contents

SVN crash course for WS-escape developers

This crash course was initially written for Obaid Maroof who asked for more information about svn. Of course, all other WS-escape developers can use the same instructions (but will need to change the user names and branch names to match their own situation).

Create your local copy of the WS-escape project

This will create your local copy of the repository. Once you have done it you will never need to call svn checkout again, except if you work on multiple computers and each one of them needs to have a copy of the repository.

2. You will see a number of directories:

ws-escape/trunk contains the trunk

ws-escape/branch/provisioning contains the branch about provisioning

ws-escape/branch/packaging contains the branch about packaging etc.

For the moment, all the branches contain exactly the same files, since each one of them is a copy from the trunk. Later on, these branches will diverge (you will work within ws-escape/branch/provisioning, modify files there, and from time to time, merge your updates from the trunk into your own branch or vice-versa)

Add your own files into your own branch

The simplest way is to copy the files that you created into your own branch one by one. Each time you add a new file, you need to declare it to svn:

svn add ws-escape/branches/provisioning/src/provisioning.java

If you don't call this the file will be there on your local computer but not in the shared repository. This is great for all kinds of temporary files that you may be creating but you don't want to share.

Do not copy your own version of Leo's files into the directory, they should be there already. If your contribution modified some of Leo's files, then you can update these files in your own branch (NOT in the trunk!)

Once you have added everything, you can call svn commit to save your changes into the repository. You will be asked to give a short description of your updates. Type something like "Added the initial version of the resource provisioning system".

You can continue editing your files in your branch, and commit them when you want to save them in the repository. You can be assured of two things at that point:

Other developers will see your changes, but these changes will not affect their own branch.

If you insert broken code in your own branch then this will not affect other branches, nor the trunk.

You will see updates that others apply to their own branches, but they will not interfere with your own branch. For example, if Leo prepares an update of the whole platform but the update is not working yet, then you will be able to keep on working with the previous version until you decide to merge his changes into your branch.

If you want to change the name of a file, do not call:

mv stupidconfigfile etc/provisioning.config

but:

svn mv stupidconfigfile etc/provisioning.config

If you create a new directory, then you need to create it first, then call svn add mydirectory.

Merging branches

So far, we have created several branches which have identical initial content, and each one can evolve independently so they will quickly start to diverge from each other. Do NOT copy files from one branch into another. You need svn merge for that, we will study it in the next lesson.