Administrating Your Trac Environment
All instructions below are given for a hypothetical trac environment named MyEnv with a username Rob.
Changing your password
The password for your trac environment is synchronized with the Matforge.org server so in order to have your new password also synchronized in appropriate places, you must change it via the web interface. Once you log in to www.Matforge.org/MyEnv, you'll find the Preferences link in red on the navigation bar. Click it then click the Account tab and follow prompts.
This will change your password for your system account on Matforge as well as for Subversion access to your repository.
Adding users to your group
All users in your group have synchronized permissions across Trac, Subversion and system accounts. In order for you to add users to your group, it must be done via the Trac web interface. Once you log in to www.Matforge.org/MyEnv, you'll find the Admin link on the navigation bar. Click it then the Users link in red on the left sidebar and follow the add account prompts on the right. You can add a user this way. After adding the user, click Permissions in red on left sidebar. Follow the prompts on the right to grant permissions to the new user. Once you have added a user, please remind that person to change their password to something secure.
Backing up your Trac Environment
If you want to create a backup of your trac environment, which you might want to do to take offsite (though Matforge's servers are backed up daily), or before making a configuration change, you can do so like this:
SHELL> trac-admin /usr/local/MyEnv hotcopy PATH_TO_BACKUP_DIR
This will create a hot backup of the trac environment while it is running. It is not sufficient to simply recursively copy the directory, you must use the trac-admin tool to ensure the integrity of the data.
Using the Subversion repository
The best resource for learning about how to use subversion is http://svnbook.red-bean.com/. Its definitive, complete and free. However, here are some highlights to get you started.
Creating a project
SHELL> svn import -m "initial import" PATH_TO_YOUR_LOCAL_DIR svn+ssh://rob@www.matforge.orgorg/usr/local/svn-myenv-repos
The PATH_TO_YOUR_LOCAL_DIR is the directory where the your code lives. It will be the name of the top directory in the repository, so keep that in mind.
The -m part is the message to go along with the import. That last bit is your repository URL, you'll need that again when you check out a working copy.
Once you have imported your project. You need to go and "check out a working copy" All new development is done in a working copy. Lots of people can have working copies checked out at once.
Checking out code
To check one out (go to a directory were you want to put it, which is somewhere else then where the original code is). Next recall what that toplevel dir name is, lets say 'mycode'.
SHELL> mkdir ~/workingcopies # for example
SHELL> cd ~/workingcopies
SHELL> svn checkout
SHELL>svn checkout svn+ssh://rob@www.matforge.org/usr/local/svn-myenv-repos/mycode # please note that you may be prompted for your password up to 3 times.
Your Development Cycle
So, now your development cycle will look like this:
SHELL> cd ~/workingcopies/mycode
SHELL> svn update # to see if anyone else commited new stuff lately
SHELL> ....edit code...
SHELL> svn commit -m "commit log message, be descriptive" # you don't need your repos path for commits and updates. The working copy knows where it is from.
Using NavAdd plugin for Trac
The NavAdd Plugin for trac is what I used to create that "MatForge Home" Link on the navigation bar of all of the trac environments. It is a very intuitive and easy to use plugin. All you have to do is:
* copy the plugin to your environment's plugin directory
* edit the trac.ini file: under the [components] header add the line
<code> [components] <br>
...<br> navadd.* = enabled<br> ...<br>
</code>
* When actually adding the tab you want to, simply create a section titled [navadd] to the bottom of the trac.ini file
* In this section, you define the items you want to add. An example of what these sections look like, as well as better instructions can be found here: http://trac-hacks.org/wiki/NavAddPlugin