Difference between revisions of "Code repositories"

From MCEWiki
(Repository and check-out)
(Repository and check-out)
Line 19: Line 19:
 
|}
 
|}
  
The main branch is called "trunk".  This means that to check out the main-line scripts folder, use the svn command
+
The main branch is called "trunk".  If you are user=mce, check out the main-branch scripts folder using the svn command:
 
+
  svn checkout --username=<user> --password=<pass> svn://cmbr.phas.ubc.ca/mce_script/trunk mce_script
  svn checkout --username=<user> --password=<pass> svn://cmbr.phas.ubc.ca/mce_script/trunk/script <destination folder>
+
If you are user!=mce, check out a development tree using the following command:
 
+
  svn checkout --username=<user> --password=<pass> svn://cmbr.phas.ubc.ca/mce_script mce_script
To checkout the entire mas source tree (trunk + branches)
 
  svn checkout svn://localhost/mas
 
  
 +
If you are user=mce, check out the trunk of mas
 +
svn checkout svn://localhost/mas/trunk mas
 +
If you are user!=mce, checkout the entire mas source tree (trunk + branches)
 +
svn checkout svn://localhost/mas mas
  
 
Sometimes, you may want to tunnel the SVN port.  This isn't necessary now that the server is on e-mode, but in any case it's done like this:
 
Sometimes, you may want to tunnel the SVN port.  This isn't necessary now that the server is on e-mode, but in any case it's done like this:

Revision as of 18:19, 7 March 2008

Repository and check-out

Currently, the MAS repository is on e-mode, and should be accessible from anywhere on the internet. The svn server is cmbr.phas.ubc.ca .

There are separate repositories for core MAS (driver + libraries + command line applications) and user applications (squid tuning, file management scripts, idl scripts).

Core MAS repository is called "mas".

User MAS repository is called "mce_script". This has 3 parts:

Folder Purpose
script shell scripts, wrappers for mce_cmd and dsp_cmd
idl_pro idl scripts
src compilable code projects

The main branch is called "trunk". If you are user=mce, check out the main-branch scripts folder using the svn command:

svn checkout --username=<user> --password=<pass> svn://cmbr.phas.ubc.ca/mce_script/trunk mce_script

If you are user!=mce, check out a development tree using the following command:

svn checkout --username=<user> --password=<pass> svn://cmbr.phas.ubc.ca/mce_script mce_script

If you are user=mce, check out the trunk of mas

svn checkout svn://localhost/mas/trunk mas

If you are user!=mce, checkout the entire mas source tree (trunk + branches)

svn checkout svn://localhost/mas mas

Sometimes, you may want to tunnel the SVN port. This isn't necessary now that the server is on e-mode, but in any case it's done like this:

ssh mhasse@phas.ubc.ca -N -L 3690:cmbr.phas.ubc.ca:3690

You can replace "mhasse@phas.ubc.ca" with your username@any machine behind the physics firewall that you have access to. This command will ask for your password, and then remain open. As long as this command is running, you can do svn operations using the address "svn://localhost/..." and they will be redirected to cmbr.

Branching and merging

Merging is accomplished by telling svn to apply a change history from one branch into the current location. For example, if we want branched from trunk/target at r100 and want to merge all changes in trunk/target up to the current head version into branches/expt/target, the merge command would be:

cd branches/expt/target
svn merge -r100:HEAD ../../../trunk/target

Release versions