
                             Gource

              software version control visualization

                Copyright (C) 2009 Andrew Caudwell

                  http://gource.googlecode.com/

Contents
========

1. Description
2. Requirements
3. Installation
4. Using Gource
5. Building Gource
6. Changes
7. Copyright

1. Description
===============

OpenGL-based 3D visualisation tool for source control repositories.

The repository is displayed as a tree where the root of the repository is the centre, directories are branches
and files are leaves. Contributors to the source code appear and disappear as they contribute to specific files
and directories.

2. Requirements
===============

Gource's display is rendered using OpenGL and requires a 3D accelerated video card to run.

3. Installation
===============

You can either build Gource from scratch or install a pre-compiled binary version from the homepage (recommended).

4. Using Gource
===============

gource <options> <path>

options:

    -f      Fullscreen

    -WIDTHxHEIGHT
            Set the window size. If -f is also supplied, will attempt to set the video mode to this also.

    -p, --start-position POSITION
            Begin at some position in the log (between 0.0 and 1.0).

        --stop-position  POSITION
            Stop at some position.

        --stop-on-idle
            Stop on break in activity. May be combined with --stop-position.
 
    -a, --auto-skip-seconds SECONDS
            Automatically skip to next entry if nothing happens for a specified number of seconds.

    -s, --seconds-per-day SECONDS
            Speed of simulation in seconds per day.

        --realtime
            Realtime playback speed.

    -i, --file-idle-time SECONDS
            Time in seconds files remain idle before they are removed.

    -e, --elasticity FLOAT
            Elasticity of nodes.

    -b, --background FFFFFF
            Background colour in hex.

    --loop
            Loop back to the start of the log when the end is reached.

    --date-format FORMAT
            Specify display date string (strftime format).

    --log-format FORMAT
            Specify format of the log being read (git,cvs,custom). Required when reading STDIN.

    --git-branch
            Get the git log of a branch other than the current one.

    --git-log-command
            Print the git-log command used by gource.

    --cvs-exp-command
            Print the cvs-exp.pl log command used by gource.

    --follow-user USER
            Have the camera automatically follow a particular user.

    --highlight-user USER
            Highlight the names of a particular user.

    --highlight-all-users
            Highlight the names of all users.

    --file-filter REGEX
            Filter out any files matching a specified regular expression.

    --user-image-dir DIRECTORY
            Directory containing .jpg or .png images of users (eg 'Full Name.png') to use as avatars.

    --default-user-image IMAGE
            Path of .jpg or .png to use as the default user image.

    --colour-images
            Colourize user images.

    --crop AXIS
            Crop view on an axis (vertical,horizontal).

    --multi-sampling
            Enable multi-sampling.

    --disable-progress
            Disable progress bar.

    --max-files
            Set the maximum number of files. Excess files will be discarded.

    --max-file-lag SECONDS
            Max time files of a commit can take to appear.

    --max-user-speed UNITS
            Max speed users can travel per second.

    --user-friction SECONDS
            Time users come to a complete hault.

    --user-scale SCALE
            Change scale of users.

    --hide-users
            Hide users.

    --hide-usernames
            Hide usernames.

    --hide-filenames
            Hide filenames.

    --hide-dirnames
            Hide directory names.

    --hide-date
            Hide the date.

    --output-ppm-stream FILE
            Write frames as PPM to a file ('-' for STDOUT).

    --output-framerate FPS
            Framerate of output (used with --output-ppm-stream).

    path    Either a git directory, a pre-generated log file (see --git-log-command, --cvs-exp-command or the custom
            log format) or '-' to read STDIN. If path is ommited gource will attempt to read a git log from the current directory.

Git Examples:

View the log of the Git respository in the current path:

    gource

View the log of a Git project in the specified directory:

    gource my-project-dir

Save a copy of the log using in a special git-log format and play it back. Use --git-log-command to get the git-log
options you should use:

    cd my-git-project
    `gource --git-log-command` > my-git-project.log
    gource my-git-project.log

NOTE: --git-log-command assumes you have a recent version git of that supports all the options. You may need to modify
the command line to work with an older version (changing %aN to %an for instance).

Other Version Control Systems:

Visit the Gource homepage for guides and examples of using Gource with other version control systems:

    CVS       - http://code.google.com/p/gource/wiki/CVS
    SVN       - http://code.google.com/p/gource/wiki/SVN
    Mercurial - http://code.google.com/p/gource/wiki/Mercurial

Custom Log Format:

If you want to use Gource with something other than the supported systems, there is a pipe delimited custom log format:

    timestamp - A unix timestamp of when the update occured.
    username  - The name of the user who made the update.
    type      - Single character for the update type - (A)dded, (M)odified or (D)eleted.
    file      - Path of the file updated.
    colour    - A colour for the file in hex (FFFFFF) format. Optional.

Recording Videos:

You can create a video of Gource using the --output-ppm-stream option. This creates an uncompressed sequence of
screenshots in PPM format which can then be processed by another program (such as ffmpeg) to produce a video file.

The below command line will create a video at 60fps in h264 format (assumes you have ffmpeg with h264 support):

    gource --output-ppm-stream - | ffmpeg -y -b 3000K -r 60 -f image2pipe -vcodec ppm -i - gource.h264

Interface:

The time shown in the top left of the screen is set initially from the first log entry read and is incremented
according to the simulation speed (--seconds-per-day).

Pressing SPACE at any time will pause/unpause the simulation. While paused you may use the mouse to inspect the
detail of individual files and users.

TAB cycles through selecting the current visible users.

The camera mode, either tracking activity, or showing the entire code tree, can be toggled using the V key.

Interactive keyboard commands:

    (V)   Toggle camera mode
    (C)   Displays Gource logo
    (N)   Jump forward in time to next log entry.
    (+-)  Adjust simulation speed.
    (<>)  Adjust time scale.
    (TAB) Cycle through visible users
    (ESC) Quit

5. Building Gource
==================

The source code to Gource is available from the homepage.

Gource requires the following libraries to compile:

    SDL 1.2 (libsdl1.2-dev)
    SDL Image 1.2 (libsdl-image1.2-dev)
    PCRE3 (libpcre3-dev)
    FTGL 2.1.3~rc5-2 (libftgl-dev)
    PNG library (libpng12-dev)
    JPEG library (libjpeg62-dev)

Building on Linux:

    ./configure
    make
    make install

If you are unfamilar with configure see the INSTALL file.

Building on Windows:

On Windows I recommend compiling the project gource.win32.cbp
with the Code Blocks IDE (www.codeblocks.org).

6. Changes
==========

0.18:
 * Fixed camera movement while the simulation is paused.

0.17:
 * Show correct month for CVS logs.
 * Added time scaling (Bitshifter).

0.16:
 * Added --hide-dirnames option.
 * Added --user-scale option.
 * Added --date-format option (Pat Notz).
 * Fix bug when encountering long log lines.
 * Fixed incorrect parsing of trivial merges.
 * Fixed building issues on OSX.

0.15:
 * Added PPM output support for creating videos (Johannes Schindelin).
 * Added experimental Apache combined access log support (--log-format apache).
 * Added --stop-position and --stop-on-idle options (useful for making videos).
 * Added --max-file-lag option to limit how long after a commit file changes can take to appear.
 * Added --no-renames to the git log command as they don't display correctly.
 * Added --max-user-speed and --user-friction as options.
 * Now builds on OSX Leopard (with the required libaries installed).
 * Caught raw exception from replace_invalid().
 * Added CXXFLAGS. You may want to override the default (eg CXXFLAGS=-O3 ./configure).

0.14:
 * Updated SVN instructions.

0.13:
 * Removed single quotes from log command (fixes running gource --git-log-command in back ticks)
 * Added SVN instructions.
 * Fixed manpage hyphens.

0.12:
 * Added --enable-ttf-font-dir=DIR option to configure (to specify the ttf-freefont directory).
 * UTF-8 support using UTF8-CPP (http://utfcpp.sourceforge.net/).
 * Changed the git log command (see --git-log-command) to require less work to parse.
   Log files generated with the previous git-log command used by gource should continue to work.
 * Allow --seconds-per-day value less than 1.0.
 * Added --git-branch command.
 * Added --loop command.
 * Added --crop command.

0.11:
 * Made N key skip to next entry.
 * Documented --user-image-dir flag.
 * temp file name now uses uid instead of time

0.1:
 * First release.

7. Copyright
============

Gource - software version control visualization
Copyright (C) 2009 Andrew Caudwell <acaudwell@gmail.com>

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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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 <http://www.gnu.org/licenses/>.
