ESTEST Sourcery

Developing ESTEST requires that you check out the project source code and follow certain coding standards for files or modifications checked-in to our code base. Note, that although we distribute source code archives through Subversion at; these are not revisioned sources and we do not use svn to track our code.

Mercurial (hg) is the SCM we use with the ESTEST project. The "official" (the repo(s) I check code into) development main branch is hosted with Bitbucket at

and the source code for plugins can be found at

You will need to be added to the development team for ESTEST to check out these repositories; you should know who to ask. Once you clone these repositories to your local workstation, those files will be considered to be part of your code sandbox until you push the changes to the main development branch.

Syncing between hg and svn

If you need to publish source releases for ESTEST then you will need to export revisions made in Mercurial to our public Subversion repositories. To do this, you need to checkout the subtree directory from svn on top of the working copy of your hg repository. Both can coexist; don't worry! For example, say you wanted to sync translators code then under the ESTEST root directory (there should be the translators subdirectory) execute

$ svn co translators

Revert any changes applied by the svn checkout and commit the changes from hg to svn. The same applies for the ESTEST plugins repositories

$ svn co estest-plugins

or whatever you named your working copy of the ESTEST Plugins hg repository, this should be done in the parent directory. This setup only needs to be done once to enable sync from hg to svn.

Coding Standards

We'll probably fill in this section more formally later. But for now, just try and mimic the style of current source files. Most importantly, use spaces instead of tabs and make sure that the file header includes in the appropriate comment syntax the copyright statement, your name, the intended file name, and the date you created the file

# Author: 
# File: 
# Date:
# Copyright (C) 2010-2011  The Regents of the University of California
# This file is part of ESTEST
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see<>.

Some other coding style rules that I demand are,

  1. In python use the most clear import syntax, i.e. avoid from pylib import *; Use dot to access sub-namespaces of Python libraries.
  2. To the extent that the code is still read-able keep the maximum line width to 80 characters

Useful Alias Commands

Here are some alias commands that I find useful for working with Mercurial and Subversion

alias hglog="hg log | less"
alias svnlog="svn log | less"
alias hgstat="hg status | grep -v \"^?\""
alias svnstat="svn status | grep -v \"^?\""
Last modified 5 years ago Last modified on 12/30/12 15:25:26