The ACC Repository provides the MAIN, officially managed area for codes critical to the
CLASSE Accelerator Physics Group.
Please see
SubVersion for generic information on subversion support at CLASSE.
SVN Client
You will need to use a Subversion client for pulling and pushing files from/to the Repository. On CLASSE Linux systems several client choices are available:
- svn is the command line client available on Linux systems (also in Mac OS X 10.8 and later). A short command summary can be found below.
- Tortoise SVN is a Windows client that integrates itself well with the Explorer shell.
- Eclipse is an integrated development environment that accepts plugins that function as subversion clients such as the Subversive plugin.
- Documentation
- To use Eclipse , version 4.3.1, on any CLASSE SL6 Linux system, type:
-
source /opt/rh/devtoolset-2/enable
-
eclipse
- To use Eclipse , version 4.6, on any CLASSE SL7 Linux system, use the installed Eclipse in the Applications menu.
- In principle, any fully-compliant Subversion client will operate with the CLASSE repositories, but the ones above are the only ones that have been tested.
Write Access to the Repository
For write access you must use a
CLASSE Linux/Unix username
and you must have been given write permission by the
ACC Code Librarian. Please direct any questions or comments you may have to them.
Read/Write Access from the CLASSE Linux computer system
- Read/Write access is handled by an access control mechanism based on Kerberos credentials supported by a CLASSE user account.
- Note: The password for this authentication method is the same one used for your CLASSE account. To obtain fresh Kerberos credentials in the event the repository denies you access (as these credentials are set to expire after a modest period of time) run the command
kinit -f [username]
. This will prompt for your Linux login password. See our wikis for more information on the CLASSE account password or generating a CLASSE kerberos ticket.
Viewing the Repository (requires a CLASSE user account)
Note: If you don't have a CLASSE account, the Bmad code can be looked at by downloading a Distribution.
Viewer information
here .
Directory Tree Checkout Using the Command Line
To create a local working copy of a directory tree from the ACC Repository, first make a directory for your local copy. Henceforth this directory will be referred to as
DIR. A possible name might be:
root_dir
. Substitute the appropriate directory name for
DIR in the below steps.
- To make a local copy of a repository source directory, the commands are:
-
cd
DIR
-
svn co https://accserv.lepp.cornell.edu/svn/
REPOS_PATH
- To find the correct REPOS_PATH, use the ACC Repository web viewer. For example, to make a local copy of the Bmad library and create the directory DIR/bmad, use the commands:
-
cd
DIR
-
svn co https://accserv.lepp.cornell.edu/svn/trunk/src/bmad
Updating a Local Copy
Using the Command Line
- To update your local copy of a library and/or executable so that it has all the revisions that have been introduced into the repository, go to the directory containing the library and/or executable and use the command:
Using Tortoise SVN
- right-click on your local checked-out copy, and select "SVN Update" to make sure you have the latest version of the repository.
A Revision Control Primer
Below is a brief primer on the commands needed to perform basic repository operations Each command must be provided with the location of the specific repository with which you would like to interact.
The general workflow from Windows is the same, but you use Explorer (right-click on folders or files) instead of using the command line.
For SVN, the repository to use is simply part of the file or directory path for the target you wish to operate upon and will always take the form of a URL.
-
http://hostname_of_repository_server/site-specific_suffix/trunk,_branch,_or_tag/path_to_file(s)
- If you are working in a checked-out directory, all SVN commands will automatically use the repository information that was obtained during checkout.
Some of the most commonly used commands: [ A
denotes an optional argument. ]
Operation |
Command |
Description |
|
Check out |
svn co |
A necessary preliminary for most cvs work: creates your private copy of the source for modules (named collections of source; you can also use a path relative to the source repository here). You can work with this copy without interfering with others' work. At least one sub-directory level is always created. |
svn checkout |
|
|
Commit / check-in |
svn ci |
Use this command when you wish to "publish'' your changes to other developers, by incorporating them into the source repository. If no filenames are provided, it will check-in all files in the current directory and its subdirectories that have changed since they were last checked out or updated. |
svn commit |
|
|
Update your working copy |
svn update |
Execute this command from within your private source directory when you wish to update your copies of source files from changes that other developers have made to the source in the repository. |
|
Add files |
svn add |
Use this command to prepare files for addition to the repository. The files will be enrolled in your working copy immediately, and only added to the repository the next time you run "commit". |
|
Remove files |
svn del |
Use this command to declare that you wish to eliminate files from the repository. The removal does not affect the repository until you run a "commit" command. |
svn remove |
|
|
Create directory |
svn mkdir |
Create a new directory under version control |
svn mkdir |
|
Structure of the ACC Repository
This structure will change to some extent as repository restructuring is carried out.
$ACC_REPO/
|
+-- CESR # Cesr ring control system associated code
|
+-- Comm # Cesr ring associated communication code
|
+-- Defunct # Old code no longer used.
|
+-- External # Non-cornell programs
|
+-- packages # Area for 3rd party packages needed for CESR code builds
|
+-- Papers # Conference papers, etc.
|
+-- Physics # Analysis code related to Cesr
|
+-- trunk # Currently home to Bmad and other stuff.
# Eventually, subdirectories of trunk will be moved and this directory will disappear.
$ACC_REPO/trunk/ # Eventually subdirectories will be moved and this directory will disappear.
|
+-- ERL_devel # ERL development area [not supported by CESR build tools]
|
+-- SRF_devel # SRF DSP and associated development
|
+-- build_system # Contains Master.cmake file.
|
+-- src # Bmad and related code.
|
+-- util # Utility script area including support scripts for CESR code building
What May Be Stored in the ACC Repository
CLASSE accelerator code developers are urged to make use of this standard area for accelerator code and support packages.
Because the majority of the areas in the repository are intended to be portable across multiple platforms, it is
strongly recommended that
binary files
not be stored in the repository.
Code modules that are intended for inclusion in the
ACC Build Libraries must be
specially structured and be combined with one or more support/build tools before being added to the ACC build system (see the
Recommended Coding Practices section below).
Imports to the ACC Repository
To create a new directory for importing code, contact the
ACC Code Librarian.