-
Notifications
You must be signed in to change notification settings - Fork 0
Home
After reading README.md on what QGears Review Tool is, and having the installation successfully accomplished with the help of INSTALL.md, additional handcrafted configuration is necessary to use the tool. The following tutorial will help through creating the configuration files, resulting in a setup that allows reviewing a subset of the source code of the QGears Review tool itself.
Note that this document assumes a basic knowledge of Eclipse, SVN and Subversive from the reader. As the QGears Review Tool supports reviewing files only in SVN repositories, the SVN interface of GitHub will be used. During the tutorial, keep a command line terminal ready at hand, and use the same session all the way up the line!
The content of the qgears-review-tool github repo repository will be replicated into local SVN repo in the example. Your commits will land in there, without requiring to set up an SVN server just for the example.
First, check out the revision 10 of the QGears Review Tool repo into a temporary location:
svn co https://github.com/qgears/qgears-review-tool/trunk@10 /tmp/qgears-review-tool-trunk-r10
Create a local SVN repository and import the source tree:
cd ~
mkdir -p temp/qgears-svn-replica
cd temp/qgears-svn-replica
svnadmin create qgears-review-tool
svn import /tmp/qgears-review-tool-trunk-r10 file:///home/user1/temp/qgears-svn-replica/qgears-review-tool/trunk -m "Initial import of QGears Review Tool for reviewing its source code"
Check out the whole trunk of the qgears-review-tool SVN repo into an arbitrary directory! This directory will further be referred to as $SRCDIR. Commands to execute:
cd
export SRCDIR=$HOME/qreviewtool-svn
mkdir $SRCDIR
svn co file://$HOME/temp/qgears-svn-replica/qgears-review-tool/trunk $SRCDIR
For the rest of the tutorial, use an Eclipse installation, into which the QGears Review Tool is preinstalled according to the INSTALL.md file found in the qgears-review-tool github repo.
In this Eclipse, create a workspace, into which the projects from $SRCDIR are all imported. This will help to avoid syntax errors and dependency problems which would bother the tutorial.
Now you have a workspace with 5 projects imported, all at revision 1:
- hu.qgears.review
- hu.qgears.review.build
- hu.qgears.review.eclipse.ui
- hu.qgears.review.feature
- hu.qgears.sonar.client
Create a folder for the reviews and review configurations in $SRCDIR, let's call it 'review':
export REVIEWDIR=$SRCDIR/review
mkdir -p $REVIEWDIR
Assumption: this directory is created as a 'general' Eclipse project via the 'File' menu -> 'New' -> 'Project' -> 'General' -> 'Project' -> 'Next', NOT using the default location, but explicitly setting $REVIEWDIR as a location and the 'review' string as a name. Press 'Finish'.
Create a subfolder in the 'review' project (or $REVIEWDIR), called settings-$USER - this folder will store your main configuration file for the QGears Review Tool:
export $USER_SETTINGS_DIR=$REVIEWDIR/settings-$USER
mkdir -p $USER_SETTINGS_DIR
Create a file called sourcefoldermappings.properties
in the $USER_SETTINGS_DIR directory. This will be the above mentioned main configuration file. Copy-paste the template below:
echo "# QGears Review tool user-specific config file
config=$REVIEWDIR/config-qreviewtool
map.qreviewsvn_workingcopy=$SRCDIR
annotationsfolder.1=review-$USER
annotationsfolder.2=review-ben
annotationsfolder.3=review-charlie
" > $USER_SETTINGS_DIR/sourcefoldermappings.properties
Explanation of the entries:
- config: absolute path of a subdirectory with settings and saved code reviews specific to reviewing a software project
- map.qreviewsvn_workingcopy: the root directory of an SVN working copy of the reviewed software project - note that more than one map* entry may be present in a sourcefoldermappings.properties file, as the reviewed files may be contained in more than one SCM repositories
- annotationsfolder.# where # is a number; at least 1: the names of the subfolders within the $REVIEWDIR, containing one person's code reviews
TO BE CONTINUED