[svk-devel] "svk info" latency vs. vc-svk.el: pain vs. gain
John Peacock
jpeacock at rowman.com
Fri Aug 4 09:28:24 EDT 2006
David Glasser wrote:
> Try this, maybe?
>
> #!/usr/bin/env perl
> use strict;
> use warnings;
> use YAML::Syck;
> use Data::Hierarchy 0.30;
> use Cwd;
>
> # Doesn't deal with Windows, symlinks, or floating checkouts.
>
> @ARGV <= 1 or die "usage: $0 [filename]\n";
>
> my $file = @ARGV ? $ARGV[0] : '';
>
> my $xd = YAML::Syck::LoadFile("$ENV{HOME}/.svk/config");
> my $hierarchy = $xd->{checkout};
>
> my $abs_path = Cwd::abs_path($file);
> my $rev = $hierarchy->get($abs_path)->{revision};
>
> if (defined $rev) {
> print "$rev\n";
> exit 0;
> } else {
> exit 1;
> }
>
>
How does this check for the individual file being under control?
AFAICT, this only checks to see if the directory is a checkout directory.
John
--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5748
More information about the svk-devel
mailing list