| Archer documentation | Contained in the Archer distribution. |
Archer::Plugin::SVN::Diff - svn diff
- module: SVN::Diff
config:
path: "[% work_dir %]/[% project %]"
Execute svn diff.
Svn working directory path.Default is [% work_dir %]/[% project %].
Gosuke Miyashita
| Archer documentation | Contained in the Archer distribution. |
package Archer::Plugin::SVN::Diff; use strict; use warnings; use base qw( Archer::Plugin::SVN ); use SVN::Agent; sub run { my ($self, $context, $args) = @_; $ENV{LANG} = 'C'; my $path = $self->{config}->{path} || File::Spec->catfile($context->{config}->{global}->{work_dir}, $context->{project}); $path = $self->templatize($path); my $rev = `svn info $path`; $rev = $1 if $rev =~ /Revision: (\d+)/; my $svn = SVN::Agent->load({ path => $path }); print eval { $svn->diff("-r$rev:HEAD") }; } 1; __END__