The project source code repository is a centralized repository based on [http://subversion.tigris.org/ Subversion]. It is intended to facilitate collaborative development of software, data analysis code, and models. In this page, the team members can find brief instructions to facilitate their use of the repository within the context of project requirements. Members of the project have full permissions to access the repository and change it. Appropriate links are provided for more detailed help on [http://subversion.tigris.org/ Subversion].

It is IMPORTANT for team members to use the source code repository, because

TableOfContents

Repository Location

Browsing

Project repository can be "viewed" online using any web browser at

https://simtk.org/websvn/wsvn/j2c/

The same area can be browsed by accessing the 'Source Code Repository' section under the 'Advanced' link at project site. General public has read access only to the 'public' folder, whereas being a team member is necessary to have full access privileges to the 'private' folder. While online browsing is useful to understand repository structure and to quickly view some files and revision history, team members who want to work on the files/folders should utilize a Subversion client for full access.

Full Access with Subversion Client

Repository can be accessed through a [http://subversion.tigris.org/ Subversion] client, which will allow team members

For these purposes, the team members should direct their [http://subversion.tigris.org/ Subversion] client to

https://simtk.org/svn/j2cReplace

A variety of clients can be used to interact with the repository. A detailed list can be found in http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients. Some useful clients with graphical interfaces include but not limited to

Repository Organization

The repository contains a dynamic and collaborative software/code/model development environment. While there are not any rigid rules on the organization of content, a few guidelines may help team members to create their project folders and develop code and models related to their role and activities in the project. The main outline of the repository structure is illustrated below.

.
|-- private: repository area with full access by team members
|   |-- doc: general documentation under development
|   |-- prj: projects folder
|   |   |-- expCS: main folder for cell scale experimentation subprojects
|   |   |-- expJS: main folder for joint scale experimentation subprojects
|   |   |-- expTS: main folder for tissue scale experimentation subprojects
|   |   |-- mdlCS: main folder for cell scale modeling subprojects
|   |   |-- mdlJS: main folder for joint scale modeling subprojects
|   |   |-- mdlTS: main folder for tissue scale modeling subprojects
|   |   |-- simAUT: main folder for autonomous simulation procedures
|   |   `-- simCON: main folder for concurrent simulation procedures
|   '--sandbox: 
`-- public: repository area with read access by general public

Subproject folders can be created under suitable main folders related to experimentation or modeling. Please use specific, descriptive, and short names for subfolders. A potential folder structure that can be implemented while creating the is in following.

.
|-- dat: data folder
|-- doc: documentation folder
|-- sol: solution folder following data analysis or model simulations
`-- src: source code related to data analysis or modeling

Details of creating new folders in the repository and working with repository content are described below. Appropriate links to the individual project directories should be provided in relevant wiki pages. There is no right or wrong way to organize project folder contents. As long as the folder is under version control, the overall structure and files can be changed without loss of information and continuity.

It is advised to subscribe to the mailing list j2c-commits Archives that can be found in the project site under 'Advanced->Mailing Lists', https://simtk.org/mail/?group_id=419. This will ensure that team members get e-mail notifications when others change the repository contents.

Subversion Terminology

checkout
making a local copy of the online repository by downloading the repository contents
update
updating the local copy of the repository; changes conducted on the local copies of files/folders are not overwritten
add
adding a file or folder under the local copy structure to the online repository definition;
add recursively
adding a folder under the local repository copy structure to the online repository definition; including all folder contents
commit
uploading files/folders (added or changed, if already existing) in the local copy to the online repository
revert
undoing changes conducted on the local copies of files/folders by downloading desired versions from the repository; overwrites the local files/folders
diff
compare two different versions of a text file; requires utility software for file comparison

Interacting with the Repository

Examples to interact with the repository are provided using [http://rapidsvn.tigris.org/ RapidSVN], a [http://subversion.tigris.org/ Subversion] client. You may want to download this client or any other, e.g. [http://tortoisesvn.tigris.org/ TortoiseSVN], to test [http://subversion.tigris.org/ Subversion] functionality. Other clients work similarly using the same terminology.

Team members can practice interacting with the repository, by checking-out and changing the sandbox folder at https://simtk.org/svn/j2c/private/sandbox using a Subversion client.

Checking-Out a Local Copy

Using [http://rapidsvn.tigris.org/ RapidSVN], a copy of an online repository (or parts of it) can be downloaded to the local computer from the menu:

Checkout process requires:

By default, the local destination is added to the bookmarks for quick access and the repository contents are downloaded recursively. The example below illustrates checking out the 'private' folder and all its subcontents to a local directory on the computer in '/data0/j2c-private/':

attachment:repository_checkout.png

Once checked-out, one can highlight the added bookmark to the local copy to see its contents:

attachment:repository_bookmark.png

To access (read & write) private sections of the repository, team members need to login using their SimTk account. If authentication is required, enter your SimTk username (IMPORTANT NOTE: use only lowercase letters!!! i.e. any upper case letters in your SimTk username should be made lower case!!!) and password. Login is also possible by selecting the bookmark of the local copy and the 'Login' command in the right-click menu.

Updating a Local Copy

Updating a local file or folder with a desired version in the repository can be done by selecting the file/folder and by following either of these steps:

By default, the latest version will be used to update local files and folders recursively (including subfolders and files)

Always update the local copy with the most recent version of the repository before changing files. Another team member may have worked on the same files.

Committing Local Changes to Repository

After changing the files locally, the online repository can be upgraded by selecting these files (the local copies) and by following either of these steps:

In the example below the local copy of the 'readme.txt' file was changed. The red shading of the icon indicates that the file is different than the last version updated from the repository. When this file is committed, the shading of the icon will turn white.

attachment:repository_commit.png

Creating Files and Directories

Files and directories can be created under the local copy of the repository as in daily computing. However, to ensure these files/folders are part of the repository, the remote (online) repository need to be informed about their existence. This can be accomplished by the 'Add' or 'Add recursive' operation. Note that this procedure only notifies the online repository that new files and/or folders will be part of it. To upload these, a 'Commit' operation should be followed, as described above.

In this example, a file was created under the sandbox folder using a text editor on the local computer. When the folder is browsed using [http://rapidsvn.tigris.org/ RapidSVN], a question mark can be seen in its icon. This indicates that this file does not belong to the repository yet.

attachment:repository_create.png

Selecting this file and employing

notifies the online repository that this file will be part of it. Consequently, the shading of the icon will turn red, with a '+' sign. A 'Commit' operation uploads the file to the repository.

attachment:repository_add.png

Advanced Actions

Comparing Versions

Text files in the repository can be compared to previous versions using a 'Diff' tool. In the main menu at View->Preferences->Programs tab, a Diff tool needs to be defined (e.g. [http://meld.sourceforge.net/ Meld]).

Undoing Changes

If the changes in the local copy of the repository are undesired, and an undo operation is necessary, the 'Revert' functionality can be used

By default, the latest version will be used to overwrite the local changes.

Moving Files or Folders

Helpful Links