Eskil can compare versions in revision control systems. Currently RCS, CVS, Git, Mercurial, Bazaar, Subversion and ClearCase are supported. 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. It works like it does in "cvs diff". Examples:
eskil file.txt
Compare file.txt with the latest checked in version.
eskil -r rev file.txt
Compare file.txt with the specified version.
eskil -r rev1 -r rev2 file.txt
Compare the two revisions. This does not involve the local copy of file.txt. The -r options are also available in the GUI in the "Rev 1" and "Rev 2" fields. 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. 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. 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 -
If the command line option -review is used. Eskil will generate a patch for the current tree and display it as in patch mode. In a Mercurial directory, these are equivalent:
eskil -preview
hg diff | eskil -
For RCS and CVS the arguments to -r are standard version numbers just like to their -r options. RCS style -r\u003crev\u003e is allowed. 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 a negative integer, the log is searched backwards for earlier versions. E.g. -1 gives the second to last version. For Git -r is passed to show, as in "git show :".
    Mercurial
For Mercurial -r works as in "hg cat -r".
    Bazaar
For Bazaar -r works as in "bzr cat -r".
    ClearCase
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.