BoA under Subversion

/!\ /!\ /!\

Please note the following:

Access to the BoA repository is restricted to BoA developers! BoA users may download BoA from the ESO's LABOCA webpage.

/!\ /!\ /!\

On this page you find instructions on how to use Subversion for the development of BoA.

(!) There is an online-version of O'Reilly's book Version Control with Subversion by Ben Collins-Sussman, Brian W. Fitzpatrick, and C. Michael Pilato. Especially Chapter 3 Guided tour gives a good overview of Subversion's commands that are needed for a normal day's work and new acne scar treatment.custom essays

In order to access BoA's subversion repository, you need

Subversion's client software svn is part of all(?) modern Linux installations and most probably allready installed on your machine. Try

svn help

to check. If svn is not installed, look at your distribution's DVD or download from Subversion's website.

To create a username and a password for the BoA repository run

htpasswd -c -m [passwordfile] [username]

and e-mail the [passwordfile] to Reinhold Schaaf (rschaaf@astro.uni-bonn.de). If htpasswd is not installed on your local machine, login on aibn77 and run the command there.

Retrieving BoA

To do the initial checkout of BoA from the repository, use

svn checkout http://www.astro.uni-bonn.de/svn/boa/[module]/trunk [dirname]

This will copy the content of the module [module] into the directory [dirname]. [dirname] will be created if not allready present.

Several modules have been created for BoA:

boa

the Boa code itself

test

Sources and data for unittests

install

all the external package you need to run Boa

doc

the documentation

Laboca

selected MBFits files from Laboca's first commissioning run

fits

a few MBFits files for tests

IDL

old RSInc IDL scripts used for MAMBO data [DEPRECATED]

Checking the status of BoA

Before you update files from the repository, you can check the status of a dirctory and its sub-directories. To do so, go to the directory and type

svn status

This will compare the content of the directory (and its sub-directories) with the state directly after your last checkout or update operation. The output can be:

M file1 -- File was modified
? file2 -- File not under version control
! file3 -- File is missing
A file4 -- File is scheduled to addition
D file5 -- File is scheduled for deletion
R file6 -- File is scheduled for replacement
C file7 -- File has conflicts

svn status produces no report for unchanged files.

The command svn status has several command switches. Probably the most usefull is

svn status -u

which compares the content of the directory (and its sub-directories) with the current content of the repository. Files that where changed in the repository since your last checkout or update operation are reported with an asterisk:

M * file1 -- File was modified in the repository and your dirctory
M   file2 -- File was modified in your dirctory only
  * file3 -- File was modified in the repository only

In effect, all files marked with an asterisk will be affected by a following svn update.

Updating BoA

To update a complete directory and its sub-directories, go to the dirctory and type :

svn update 

this will check for commited updates on the Subversion server and merge them to your local files. On the command output you have a quick look on what has been done to your files:

U file1 -- existing file was updated from repository
A file2 -- non-existing file was added from repository
D file3 -- existing file was deleted, because not longer in repository
R file4 -- existing file replaced by different file with the same name
G file5 -- changes from repository where successfilly merged into existing modified file
C file6 -- changes from repository could not be merged into existing modified file

You can also update a single file or group of file using

svn update [filename]

Editing a file

Before editing a file, you should be sure to work on an updated version. Edit the file with your favorite tool.

At this stage, you can use

svn status

to check the status of all files in a directory. svn status reports for all modified files a status code, the most important are:

A file1 -- file was added
C file2 -- file is in conflict with repository
D file3 -- file was deleted
M file4 -- file was modified
R file5 -- file was replaced
? file6 -- file is not under version control

Once you have finish editing, you can send your changes to the repository using

svn commit --message "[YourMessage]"

If you want to revert to the version in the repository, thereby loosing your changes, use

svn revert [filename]

Conflicts

(!) Please notice that I have no experience with this topic so far. So it is possibly wise to consult other, more reliable documentation on this topic and to do some experiments before you rely on Subversion's abilities to resolve conflicts.

In the context of Subversion, conflict means that a file's version in your working directory and the version in the repository have both been changed since the last update and that these changes overlap. Such a conflict has to be resolved manually before the file can be comitted to the repository.

When a conflict occurs, the following things will happen during an update:

These copies are meant to assist you in resolving the conflict.

After you have resolved the conflict, let Subversion know it by typing

svn resolve [filename]

This will delete the three temporary files. After that, you can commit your changes as usual:

svn commit [filename]

Adding, deleting, copying, and moving files

Use the commands

svn add [filename]
svn delete [filename]
svn copy [filename] [newFilename]
svn move [filename] [newFilename]

and commit the new file(s).

Mark a file as executable

To mark a file (e.g. a script) in the repository as executable, use

svn propset svn:executable '' [filename]

and commit the file. After a checkout or update, the file will have execute permissions. Custom Research Papers

boawiki: Documentation/HowToSubversion (last edited 2013-12-11 11:48:46 by ReinholdSchaaf)