Added support for Mercurial (hg) source control. Mercurial is an
open-source distributed source control system, conceptually similar to
Git, Bazaar (bzr), Darcs, and the commercial system BitKeeper
(which tkdiff already supports).
While Mercurial already comes with a tkdiff wrapper called "hgdiff",
this script does not support arbitrary revisions in the way that the
actual hg diff command does (e.g. "hg diff -r2 -r5 filename). This
patch gives tkdiff support for all the revision numbers that "hg diff"
The code changes are small and mostly boilerplate, but I did add one
new procedure called "is-mercurial-repository". This was added
because mercurial uses a single ".hg" directory at the top-level
directory of a repository rather than having a directory at each
different directory inside the repository. The new procedure simply
traverses up the parent directories until it either finds a .hg
directory (indicating that we're in a Mercurial repository) or hits
the root directory (indicating that we're not).
Since the list of supported source control systems is getting large, I
alphabetized the list in the command-line help text and also modified
other parts of this help text to say things like "RCS, CVS, etc."
rather than exhaustively listing all the supported systems yet again.
Log in to post a comment.