r77693 - in /trunk/libsvn-look-perl: .cvsignore Changes MANIFEST META.yml Makefile.PL README debian/changelog debian/compat debian/control debian/copyright lib/SVN/Look.pm t/01-commands.t t/test-functions.pl
angelabad-guest at users.alioth.debian.org
angelabad-guest at users.alioth.debian.org
Thu Jul 21 13:09:45 UTC 2011
Author: angelabad-guest
Date: Thu Jul 21 13:09:43 2011
New Revision: 77693
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=77693
Log:
* New upstream release
* debian/copyright:
- Update copyright years
- Update license stanza
* Bump Debhelper compat level to 8
* Bump Standards-Version to 3.9.2 (no changes)
* debian/control:
- Add libfile-slurp-perl and liburi-perl to Build-Depends to fix FTBFS
with tests
Removed:
trunk/libsvn-look-perl/.cvsignore
Modified:
trunk/libsvn-look-perl/Changes
trunk/libsvn-look-perl/MANIFEST
trunk/libsvn-look-perl/META.yml
trunk/libsvn-look-perl/Makefile.PL
trunk/libsvn-look-perl/README
trunk/libsvn-look-perl/debian/changelog
trunk/libsvn-look-perl/debian/compat
trunk/libsvn-look-perl/debian/control
trunk/libsvn-look-perl/debian/copyright
trunk/libsvn-look-perl/lib/SVN/Look.pm
trunk/libsvn-look-perl/t/01-commands.t
trunk/libsvn-look-perl/t/test-functions.pl
Modified: trunk/libsvn-look-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-look-perl/Changes?rev=77693&op=diff
==============================================================================
--- trunk/libsvn-look-perl/Changes (original)
+++ trunk/libsvn-look-perl/Changes Thu Jul 21 13:09:43 2011
@@ -1,4 +1,8 @@
Revision history for SVN-Look. -*- text -*-
+
+0.21 2011-07-20
+
+ Ported to Windows with Strawberry Perl and also with Active Perl.
0.20 2010-12-12
Modified: trunk/libsvn-look-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-look-perl/MANIFEST?rev=77693&op=diff
==============================================================================
--- trunk/libsvn-look-perl/MANIFEST (original)
+++ trunk/libsvn-look-perl/MANIFEST Thu Jul 21 13:09:43 2011
@@ -1,4 +1,3 @@
-.cvsignore
Changes
lib/SVN/Look.pm
Makefile.PL
Modified: trunk/libsvn-look-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-look-perl/META.yml?rev=77693&op=diff
==============================================================================
--- trunk/libsvn-look-perl/META.yml (original)
+++ trunk/libsvn-look-perl/META.yml Thu Jul 21 13:09:43 2011
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: SVN-Look
-version: 0.20
+version: 0.21
abstract: A caching wrapper aroung the svnlook command.
author:
- Gustavo Chaves <gustavo+perl at gnustavo.org>
Modified: trunk/libsvn-look-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-look-perl/Makefile.PL?rev=77693&op=diff
==============================================================================
--- trunk/libsvn-look-perl/Makefile.PL (original)
+++ trunk/libsvn-look-perl/Makefile.PL Thu Jul 21 13:09:43 2011
@@ -1,7 +1,7 @@
use 5.008;
use strict;
use warnings;
-use File::Spec::Functions qw/catfile path/;
+use File::Spec::Functions;
use ExtUtils::MakeMaker;
use Getopt::Long qw(GetOptions);
@@ -15,20 +15,21 @@
) or die $usage;
my $svnlook;
-for my $d (
- path(),
- catfile('usr', 'local', 'bin'),
- catfile('usr', 'bin'),
- catfile('bin'),
-) {
- my $f = catfile($d, 'svnlook');
- next unless -x $f;
- next unless system("$f help >/dev/null 2>/dev/null") == 0;
- $svnlook = $f;
- last;
+
+if ($^O eq 'MSWin32') {
+ $ENV{PATH} .= ';C:\Program Files (x86)\VisualSVN Server\bin';
+} else {
+ $ENV{PATH} .= ':/usr/local/bin:/usr/bin:/bin';
}
+
+eval {
+ open my $svnlook, '-|', 'svnlook --version' or die;
+ local $/ = undef; # slurp mode
+ <$svnlook>;
+ close $svnlook or die;
+};
die "Aborting because I couldn't find the 'svnlook' executable.\n"
- unless $svnlook;
+ if $@;
if ($author_tests) {
open(ENABLED, ">t/author.enabled") or die "Can't touch ./t/author.enabled: $!";
Modified: trunk/libsvn-look-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-look-perl/README?rev=77693&op=diff
==============================================================================
--- trunk/libsvn-look-perl/README (original)
+++ trunk/libsvn-look-perl/README Thu Jul 21 13:09:43 2011
@@ -1,6 +1,6 @@
Name: SVN-Look
What: A caching wrapper aroung the svnlook command.
-Version: 0.20
+Version: 0.21
Author: Gustavo Chaves <gnustavo at cpan.org>
SVN-Look is a caching wrapper aroung the svnlook command.
Modified: trunk/libsvn-look-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-look-perl/debian/changelog?rev=77693&op=diff
==============================================================================
--- trunk/libsvn-look-perl/debian/changelog (original)
+++ trunk/libsvn-look-perl/debian/changelog Thu Jul 21 13:09:43 2011
@@ -1,3 +1,17 @@
+libsvn-look-perl (0.21-1) unstable; urgency=low
+
+ * New upstream release
+ * debian/copyright:
+ - Update copyright years
+ - Update license stanza
+ * Bump Debhelper compat level to 8
+ * Bump Standards-Version to 3.9.2 (no changes)
+ * debian/control:
+ - Add libfile-slurp-perl and liburi-perl to Build-Depends to fix FTBFS
+ with tests
+
+ -- Angel Abad <angelabad at gmail.com> Thu, 21 Jul 2011 15:09:34 +0200
+
libsvn-look-perl (0.20-1) unstable; urgency=low
* New upstream release
Modified: trunk/libsvn-look-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-look-perl/debian/compat?rev=77693&op=diff
==============================================================================
--- trunk/libsvn-look-perl/debian/compat (original)
+++ trunk/libsvn-look-perl/debian/compat Thu Jul 21 13:09:43 2011
@@ -1,1 +1,1 @@
-7
+8
Modified: trunk/libsvn-look-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-look-perl/debian/control?rev=77693&op=diff
==============================================================================
--- trunk/libsvn-look-perl/debian/control (original)
+++ trunk/libsvn-look-perl/debian/control Thu Jul 21 13:09:43 2011
@@ -1,19 +1,24 @@
Source: libsvn-look-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 7)
-Build-Depends-Indep: perl, subversion
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Angel Abad <angelabad at gmail.com>, Jonathan Yu <jawnsy at cpan.org>,
+Uploaders: Angel Abad <angelabad at gmail.com>,
+ Jonathan Yu <jawnsy at cpan.org>,
Antonio Radici <antonio at dyne.org>
-Standards-Version: 3.9.1
+Build-Depends: debhelper (>= 8)
+Build-Depends-Indep: perl,
+ libfile-slurp-perl,
+ liburi-perl,
+ subversion
+Standards-Version: 3.9.2
+Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libsvn-look-perl/
+Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libsvn-look-perl/
Homepage: http://search.cpan.org/dist/SVN-Look/
-Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libsvn-look-perl/
-Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libsvn-look-perl/
Package: libsvn-look-perl
Architecture: all
-Depends: ${misc:Depends}, ${perl:Depends}, subversion
+Depends: ${misc:Depends}, ${perl:Depends},
+ subversion
Description: module providing access to svnlook data
SVN::Look is a simple Perl module that provides a object-oriented wrapper
around Subversion's svnlook command, with built-in caching to improve speed.
Modified: trunk/libsvn-look-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-look-perl/debian/copyright?rev=77693&op=diff
==============================================================================
--- trunk/libsvn-look-perl/debian/copyright (original)
+++ trunk/libsvn-look-perl/debian/copyright Thu Jul 21 13:09:43 2011
@@ -8,7 +8,7 @@
License: Artistic or GPL-1+
Files: debian/*
-Copyright: 2008-2010, Angel Abad <angelabad at gmail.com>
+Copyright: 2008-2011, Angel Abad <angelabad at gmail.com>
2009, Antonio Radici <antonio at dyne.org>
2010, Jonathan Yu <jawnsy at cpan.org>
License: Artistic or GPL-1+
Modified: trunk/libsvn-look-perl/lib/SVN/Look.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-look-perl/lib/SVN/Look.pm?rev=77693&op=diff
==============================================================================
--- trunk/libsvn-look-perl/lib/SVN/Look.pm (original)
+++ trunk/libsvn-look-perl/lib/SVN/Look.pm Thu Jul 21 13:09:43 2011
@@ -3,7 +3,7 @@
use strict;
use warnings;
use Carp;
-use File::Spec::Functions qw/catfile path rootdir/;
+use File::Spec::Functions;
=head1 NAME
@@ -11,11 +11,11 @@
=head1 VERSION
-Version 0.20
-
-=cut
-
-our $VERSION = '0.20';
+Version 0.21
+
+=cut
+
+our $VERSION = '0.21';
=head1 SYNOPSIS
@@ -43,22 +43,21 @@
=cut
-our $SVNLOOK;
-my $root = rootdir();
-for my $d (
- path(),
- catfile($root, 'usr', 'local', 'bin'),
- catfile($root, 'usr', 'bin'),
- catfile($root, 'bin'),
-) {
- my $f = catfile($d, 'svnlook');
- if (-x $f) {
- $SVNLOOK = $f;
- last;
- }
-}
-die "Aborting because I couldn't find the svnlook executable.\n"
- unless $SVNLOOK;
+BEGIN {
+ if ($^O eq 'MSWin32') {
+ $ENV{PATH} .= ';C:\Program Files (x86)\VisualSVN Server\bin';
+ } else {
+ $ENV{PATH} .= ':/usr/local/bin:/usr/bin:/bin';
+ }
+ eval {
+ open my $pipe, '-|', "svnlook --version" or die;
+ local $/ = undef; # slurp mode
+ <$pipe>;
+ close $pipe or die;
+ };
+ die "Aborting because I couldn't execute the svnlook command: $@\n"
+ if $@;
+}
=head1 METHODS
@@ -109,9 +108,9 @@
sub _svnlook {
my ($self, $cmd, @args) = @_;
- my @cmd = ($SVNLOOK, $cmd, $self->{repo});
+ my @cmd = (svnlook => $cmd, $self->{repo});
push @cmd, @{$self->{what}} unless $cmd =~ /^(?:youngest|uuid|lock)$/;
- open my $fd, '-|', @cmd, @args
+ open my $fd, '-|', '"' . join('" "', @cmd, @args) . '"'
or die "Can't exec svnlook $cmd: $!\n";
if (wantarray) {
my @lines = <$fd>;
Modified: trunk/libsvn-look-perl/t/01-commands.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-look-perl/t/01-commands.t?rev=77693&op=diff
==============================================================================
--- trunk/libsvn-look-perl/t/01-commands.t (original)
+++ trunk/libsvn-look-perl/t/01-commands.t Thu Jul 21 13:09:43 2011
@@ -15,20 +15,21 @@
my $t = reset_repo();
-system(<<"EOS");
-echo first >$t/wc/file
-svn add -q --no-auto-props $t/wc/file
-svn ps -q svn:mime-type text/plain $t/wc/file
-svn ci -q -mlog $t/wc/file
-EOS
+my $repo = catfile($t, 'repo');
+my $wcfile = catfile($t, 'wc', 'file');
-my $look = SVN::Look->new("$t/repo", -r => 1);
+system("echo first >$wcfile");
+system("svn add -q --no-auto-props $wcfile");
+system("svn ps -q svn:mime-type text/plain $wcfile");
+system("svn ci -q -mlog $wcfile");
+
+my $look = SVN::Look->new($repo, -r => 1);
ok(defined $look, 'constructor');
# Grok the author name
my $author;
-open my $svn, '-|', "svn info $t/wc/file"
+open my $svn, '-|', "svn info $wcfile"
or die "Can't exec svn info\n";
while (<$svn>) {
if (/Author: (.*)$/) {
@@ -44,23 +45,21 @@
cmp_ok(($look->added())[0], 'eq', 'file', 'added');
-system(<<"EOS");
-echo second >>$t/wc/file
-svn ci -q -mlog $t/wc/file
-EOS
+system("echo second >>$wcfile");
+system("svn ci -q -mlog $wcfile");
-$look = SVN::Look->new("$t/repo", -r => 2);
+$look = SVN::Look->new($repo, -r => 2);
cmp_ok($look->diff(), '=~', qr/\+second/, 'diff');
-system(<<"EOS");
-echo space in name >$t/wc/'a b.txt'
-svn add -q --no-auto-props $t/wc/'a b.txt'
-svn ps -q svn:mime-type text/plain $t/wc/'a b.txt'
-svn ci -q -mlog $t/wc/'a b.txt'
-EOS
+my $ab = catfile($t, 'wc', 'a b.txt');
-$look = SVN::Look->new("$t/repo", -r => 3);
+system("echo space_in_name >\"$ab\"");
+system("svn add -q --no-auto-props \"$ab\"");
+system("svn ps -q svn:mime-type text/plain \"$ab\"");
+system("svn ci -q -mlog \"$ab\"");
+
+$look = SVN::Look->new($repo, -r => 3);
my $pl = eval { $look->proplist('a b.txt') };
@@ -82,9 +81,7 @@
ok(! defined $lock, 'no lock');
-system(<<"EOS");
-svn lock -m'lock comment' $t/wc/file >/dev/null
-EOS
+system("svn lock -m \"lock comment\" $wcfile");
$lock = eval { $look->lock('file') };
Modified: trunk/libsvn-look-perl/t/test-functions.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsvn-look-perl/t/test-functions.pl?rev=77693&op=diff
==============================================================================
--- trunk/libsvn-look-perl/t/test-functions.pl (original)
+++ trunk/libsvn-look-perl/t/test-functions.pl Thu Jul 21 13:09:43 2011
@@ -1,13 +1,14 @@
# Copyright (C) 2008 by CPqD
-
-BEGIN { $ENV{PATH} = '/usr/local/bin:/usr/bin:/bin' }
use strict;
use warnings;
use Cwd;
use File::Temp qw/tempdir/;
-use File::Spec::Functions qw/catfile path/;
+use File::Spec::Functions;
use File::Path;
+use File::Copy;
+use File::Slurp;
+use URI::file;
# Make sure the svn messages come in English.
$ENV{LC_MESSAGES} = 'C';
@@ -15,45 +16,49 @@
sub can_svn {
CMD:
for my $cmd (qw/svn svnadmin svnlook/) {
- for my $path (path()) {
- next CMD if -x catfile($path, $cmd);
- }
- return 0;
+ eval {
+ open my $pipe, '-|', "$cmd --version" or die;
+ local $/ = undef; # slurp mode
+ <$pipe>;
+ close $pipe or die;
+ };
+ return 0 if $@;
}
-
- my $T = tempdir('t.XXXX', DIR => getcwd());
- my $canuseit = system("svnadmin create $T/repo") == 0;
- rmtree($T);
-
- return $canuseit;
+ return 1;
}
our $T;
sub newdir {
my $num = 1 + Test::Builder->new()->current_test();
- my $dir = "$T/$num";
+ my $dir = catdir($T, $num);
mkdir $dir;
$dir;
}
sub do_script {
my ($dir, $cmd) = @_;
+ my $script = catfile($dir, 'script');
+ my $stdout = catfile($dir, 'stdout');
+ my $stderr = catfile($dir, 'stderr');
{
- open my $script, '>', "$dir/script" or die;
- print $script $cmd;
- close $script;
- chmod 0755, "$dir/script";
+ open my $fd, '>', $script or die;
+ print $fd $cmd;
+ close $fd;
+ chmod 0755, $script;
}
+ copy(catfile($T, 'repo', 'hooks', 'svn-hooks.pl') => catfile($dir, 'svn-hooks.pl'));
+ copy(catfile($T, 'repo', 'conf', 'svn-hooks.conf') => catfile($dir, 'svn-hooks.conf'));
- system("$dir/script 1>$dir/stdout 2>$dir/stderr");
+ system("$script 1>$stdout 2>$stderr");
}
sub work_ok {
my ($tag, $cmd) = @_;
my $dir = newdir();
ok((do_script($dir, $cmd) == 0), $tag)
- or diag("work_ok command failed with following stderr:\n", `cat $dir/stderr`);
+ or diag("work_ok command failed with following stderr:\n",
+ scalar(read_file(catfile($dir, 'stderr'))));
}
sub work_nok {
@@ -66,7 +71,7 @@
return;
}
- my $stderr = `cat $dir/stderr`;
+ my $stderr = scalar(read_file(catfile($dir, 'stderr')));
if (! ref $error_expect) {
ok(index($stderr, $error_expect) >= 0, $tag)
@@ -85,13 +90,14 @@
my $cleanup = exists $ENV{REPO_CLEANUP} ? $ENV{REPO_CLEANUP} : 1;
$T = tempdir('t.XXXX', DIR => getcwd(), CLEANUP => $cleanup);
- system(<<"EOS");
-svnadmin create $T/repo
-EOS
+ my $repo = catfile($T, 'repo');
+ my $wc = catfile($T, 'wc');
- system(<<"EOS");
-svn co -q file://$T/repo $T/wc
-EOS
+ system("svnadmin create $repo");
+
+ my $repouri = URI::file->new($repo);
+
+ system("svn co -q $repouri $wc");
return $T;
}
More information about the Pkg-perl-cvs-commits
mailing list