Eskil can compare versions in many revision control systems. Currently RCS, CVS, Git, Fossil, Mercurial, Bazaar, Subversion, Perforce and ClearCase are supported (some features are not implemented for all systems).
If you specify only one file on the command line to Eskil, it will automatically detect if the file is under revision control and enter revision control mode.
By default the local file is compared against the latest checked in version. This is for the common case when you just want to know what you have changed before checking in.
You can use the -r option to select which versions to compare. The valid values for the -r option depends on the tools used. See below for details on each one.
Compare file.txt with the latest checked in version:
Compare file.txt with the specified version:
eskil -r rev file.txt
Compare the two revisions. This does not involve the local copy of file.txt.
eskil -r rev1 -r rev2 file.txt
The -r options are also available in the GUI in the "Rev 1" and "Rev 2" fields.
Eskil can also browse and compare revisions for some systems directly in the directory diff. It works just like for files, but give a directory on the command line. Currently Git, Fossil and Subversion are supported.
When comparing a file with the latest checked in version, some of the systems have support for committing directly from Eskil. If supported, the Commit button will be enabled. It is also possible to revert the local changes using the Revert button.
Priority between systems
If multiple systems are used within a directory Git/Hg/Bzr will be detected before CVS/SVN. Command line options -cvs and -svn can be used to put preference on one of those systems.
Pipe a patch
Eskil can read a patch from standard input, thus allowing display from any patch generating command. Examples:
hg diff | eskil -
git diff -p --diff-filter=M master | eskil -
View all changes
If the command line option -review is used, Eskil will generate a patch for the current tree and display it as in patch mode.
eskil -review [files]
E.g. in a Mercurial directory, these show the same thing:
hg diff | eskil -
If file names are given after -review, only the listed files are included. If supported, the Commit button will be enabled allowing the viewed differences to be committed directly from Eskil.
Eskil can be used as a conflict resolution tool. See examples below for settings. See also Merge.
For RCS and CVS the arguments to -r are standard version numbers just like to their -r options. If a revision is an integer, it is added to the last number in the current version, thus giving relative versions. E.g. -1 gives the second to last version.
For Subversion the arguments to -r are standard version numbers just like its -r option. If a revision is zero or a negative integer, the log is searched backwards for earlier versions. E.g. -1 gives the second to last version.
For Git -r <rev> is passed to show, as in "git show <rev>:<file>". If a revision is zero or a negative integer, the log is searched backwards for earlier versions.
To use Eskil for conflict resolution these settings can be used.
git config --global merge.tool eskil
git config --global mergetool.eskil.cmd 'eskil -fine -a $BASE -o $MERGED $REMOTE $LOCAL'
git config --global diff.tool eskil
git config --global difftool.eskil.cmd 'eskil $LOCAL $REMOTE'
For Mercurial -r mostly works as in "hg cat -r". However, Eskil interprets zero or negative numbers as going back from the tip, i.e. -1 is one step back, corresponding to -2 in Mercurial.
Mercurial is supported in the Directory Diff, but needs the hglist extension to display correct file sizes and dates. If not they are faked using the file's sha1 and thus unique per file and gives a correct result in comparison.
To use Eskil for conflict resolution these config settings can be used.
[merge-tools] eskil.args = -fine -a $base $other $local -o $output eskil.priority = 1
For Bazaar -r works as in "bzr cat -r".
ClearCase has more complex version "numbers". ClearCase stream names are built like file paths and in -r you can access the streams similar to how you find files. Your current stream is the "current directory". A negative version number is offset from latest.
-r 5 : Version 5 in current stream.
-r . : Latest version in current stream.
-r -1 : Second to last version in current stream.
-r /full/path/stream/4 : The identified version.
-r /full/path/stream : Latest version in that stream.
-r ../5 : Version in parent stream.
-r .. : Latest in parent stream.
-r stream/5 : Version in stream, anywhere in tree.
-r stream : Latest in stream, anywhere in tree.