Using SVK with other tools
Emacs
There are:
- Two pcl-cvs-like interface: EmacsPSVK.
TextMate
The Mac OS X text editor TextMate has the ability to make "Bundles" of
commands, syntaxes, etc for various languages and packages that can be
called from it. There was already a Subversion bundle available. I
hacked a copy of this into an SVK bundle, featuring commands for:
- Status *
- Log *
- Blame *
- Info *
- Diff with Working Copy (BASE)
- Add to Repository
- Commit
- Update to Newest
The starred commands output to a pretty HTML window, too (all
prettiness due to the author of the Subversion bundle).
TextMate is available from http://macromates.com/. These Bundles only
work with the 1.1 betas (and I think only with the 1.1b8 beta, linked
to from http://macromates.com/wiki/pmwiki?n=Main.Version1Dot1Beta6),
and right now the betas don't ship with any bundles and you need to
check out http://macromates.com/svn/Bundles/trunk (username and
password 'anon', which you'll have to set with an svn command first
since svk doesn't seem to support http://foo:bar@baz/) into your
~/Library/Application Support/TextMate directory...
... but presumably once 1.1 is released it'll just be packaged with
the editor, or capable of being downloaded in an easier way.
Kompare
The following workaround is unnecessary in SVK 1.04 and later.
Kompare is a KDE tool for viewing the differences between files and for viewing
patches. Unfortunately, SVK 1.02 and Kompare 3.3 (the versions I have) interact poorly.
One should be able to execute the command
svk diff | kompare -
and see a visual display of the uncommitted changes. However, doing that either produces
an empty Kompare screen or the error message "could not parse diff output." The problem is that
SVK 1.02 generates diff output with a space before the file label rather than a tab. One solution
is as follows:
- save the following Perl script somewhere handy (let's say ~/bin/svkdiff) and make it executable
- export SVKDIFF="~/bin/svkdiff"
- svk diff | kompare -
That should do it. The svkdiff script that I use is
#!/usr/bin/perl
# put a Tab character before the label
$ARGV[1] =~ s/ \s+ ( \( .* ) \s* \z /\t$1/gxms;
$ARGV[4] =~ s/ \s+ ( \( .* ) \s* \z /\t$1/gxms;
# escape shell meta characters
@ARGV = map { quotemeta } @ARGV;
# print a separator line and do the diff
print '='x66, "\n";
system "diff -u @ARGV";
Using Subversion clients on a SVK depot
If your tool of choice (e.g. IDE) does not have a SVK client you can use a Subversion (SVN) client.
However some care needs to be taken.
- Do not update a branch that is a mirror of a remote repository. Only commit to a local SVK branch, either a local branch or a branch of a remote mirrored branch
- Do not perform a merge from your SVN client, use SVK outside of your tool.
- Do not use SVK commit or check out on your working copy (?? Is this correct ??)