Changeset 361

Show
Ignore:
Timestamp:
02/11/07 13:20:47 (2 years ago)
Author:
miya
Message:

Rsync: Change config format in yaml.
SVN::*: change variable name of SVN::Agent object.

Archer::Plugin: Fix to set dest_dir in templatize.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • library/perl/trunk/Archer/examples/test.yaml

    r358 r361  
    1919        source: "[% work_dir %]/[% project %]" 
    2020        dest: "[% server %]:[% dest_dir %]" 
    21         rsync_option: 
    22           exclude: 
    23             - test 
     21        exclude: 
     22          - test 
    2423 
    2524projects: 
  • library/perl/trunk/Archer/lib/Archer/Plugin/Rsync.pm

    r359 r361  
    1717    $dest   = $self->templatize($dest); 
    1818 
     19    delete $self->{config}->{source}; 
     20    delete $self->{config}->{dest}; 
     21 
    1922    my %defaults = ( 
    2023        archive  => 1, 
     
    2427        exclude  => [ '.svn/' ], 
    2528        rsh      => 'ssh', 
     29        source => $source, 
     30        dest   => $dest, 
    2631    ); 
    2732 
    28     my $option = $self->{config}->{rsync_option} || {}; 
     33    my $option = $self->{config} || {}; 
    2934    my $rsync = File::Rsync->new({ 
    3035        %defaults, 
    3136        %$option, 
    32         source => $source, 
    33         dest   => $dest, 
    3437    }); 
    3538 
     
    5356      source: "[% work_dir %]/[% project %]" 
    5457      dest: "[% server %]:[% dest_dir %]" 
    55       rsync_option: 
    56         archive:  1 
    57         compress: 1 
    58         rsh:      ssh 
    59         update:   1 
    60         delete:   1 
    61         exclude: 
    62           - .svn/ 
     58      archive:  1 
     59      compress: 1 
     60      rsh:      ssh 
     61      update:   1 
     62      delete:   1 
     63      exclude: 
     64        - .svn/ 
    6365 
    6466=head1 DESCRIPTION 
     
    6870=head1 CONFIG 
    6971 
    70 =head2 source 
    71  
    72 Source path.Default is [% work_dir %]/[% project %]. 
    73  
    74 =head2 dest 
    75  
    76 Destination host and path. Default is [% server %]:[% dest_dir %]. 
    77  
    78 =head2 rsync_option 
    79  
    80 Options passed to File::Rsync object.Defaults are: 
    81  
    82  archive:  1 
    83  update:   1 
    84  compress: 1 
    85  delete:   1 
    86  rsh:      ssh 
    87  exclude 
    88    - .svn/ 
     72See L<File::Rsync>. 
    8973 
    9074=head1 AUTHORS 
  • library/perl/trunk/Archer/lib/Archer/Plugin/SVN/Log.pm

    r360 r361  
    1818    $rev = $1 + 1 if $rev =~ /Revision: (\d+)/; 
    1919 
    20     my $sa = SVN::Agent->load({ path => $path }); 
    21     print $sa->log('-v', "-r$rev:HEAD"); 
     20    my $svn = SVN::Agent->load({ path => $path }); 
     21    print $svn->log('-v', "-r$rev:HEAD"); 
    2222} 
    2323 
  • library/perl/trunk/Archer/lib/Archer/Plugin/SVN/Update.pm

    r360 r361  
    1414    $path = $self->templatize($path); 
    1515 
    16     my $sa = SVN::Agent->load({ path => $path }); 
    17     $sa->update; 
     16    my $svn = SVN::Agent->load({ path => $path }); 
     17    $svn->update; 
    1818} 
    1919