About gtools
gtools has been merged into
TortoiseHg. Visit the TortoiseHg project
for further developments.
gtools is an extension for the
mercurial version control system created by .
The extension provides a graphical user interface for status, log, and commit
operations. The
dialogs provide a convenient way to see what is happening in a repository, and
can launch external diff and edit tools that
open files in-place
whenever possible. This lets you save changes made to source files
directly back to your working copy. Other features:
- In-dialog color coded unidiff/gitdiff display
- View "left" or "right" side of modified files
- Revert, add, ignore, delete, or remove from the status and commit
dialogs
- Color coded sortable lists
- Log dialog identifies branches and merges
- Open logs from status window and status from the log window
- Export patches (contributed by Tyberius Prime)
- Customizable fonts
- Options similar to command-line hg
- Tested on Windows and Linux
Quick Start
Well... maybe not that quick, but at least condensed installation steps. If you want more
detailed instructions, see the full
Installing section below.
- Make sure you have PyGTK 2.10
installed and working
- Apply this small patch to
gtk-2.0/gtk/__init__.py
- Build mercurial from the
crew repo or
apply patches to stable
- Save gtools.py into hgext
and rebuild
- Edit .hgrc or
mercurial.ini as described in gtools.py
- Run hg glog, hg gstat, hg gci
Installing
The installation process for gtools is still rather involved. This will hopefully
get easier in the future.
- You need PyGTK installed on you system. On *nix you probably already
have it, particularly if running Gnome. If not, install it with "sudo
apt-get install pygtk" or whatever your package manager wants. On Windows you
can install the pieces manually by following the
instructions on the pygtk site or you can try
this
all-in-one installer.
Unfortunately, there is a bug in PyGTK 2.10 that is triggered by
mercurial's demandload system. To fix this you can apply
this small patch or wait for PyGTK version 2.12, which is due out
in Aug. '07. The patch needs to be applied to
gtk-2.0/gtk/__init__.py under Python's library directory. On Windows
the full path will be something like:
C:\Python25\Lib\site-packages\gtk-2.0\gtk\__init__.py
On Linux
it will be something like:
/usr/share/python-support/python-gtk2/gtk-2.0/gtk/__init__.py
- gtools depends on a few changes that are not yet in the released version
of mercurial, so you'll need to build and install it from source. You can either build
mercurial from the
crew repository or the
stable repository, but these four patches
must be applied if you use the stable repository. Follow
these
instructions to build mercurial. It's actually fairly easy, even on
window.
- Once you have mercurial building, save the gtools.py
file into the hgext subdirectory in
mercurial's source tree. Then rebuild and install.
- The final step is to enable gtools by editing your
.hgrc file on *nix or
mercurial.ini on windows. Just add and customize the lines
shown below. If you already have the
[extensions] section don't add another one, just
put hgext.gtools=
below it.
[extensions]
hgext.gtools =
[gtools]
# external diff tool and options
diffcmd = C:\Program Files\Cirrus\Cirrus.exe
diffopts = /solo
# editor, if not specified [ui] editor is used
editor = "C:\Program Files\Notepad++\notepad++.exe" -multiInst
# set the fonts for the comments, diffs, and lists
fontcomment = courier new 10
fontdiff = courier new 10
fontlist = verdana 8
# make the integrated diff window appear at the bottom or side
diffbottom = False
Running
Once built and installed, type the following from the command-line to get help:
hg glog -h
hg gstatus -h
hg gcommit -h
Contributing
I am no longer accepting patches for gtools since it has been merged into the TortoiseHg project. Please visit the TortoiseHg site to make contributions and suggestions.