package Test::Smoke::App::SyncTree;
use warnings;
use strict;

our $VERSION = '0.001';

use base 'Test::Smoke::App::Base';

use Test::Smoke::Syncer;

=head1 NAME

Test::Smoke::App::SyncTree - Synchronise the perl source tree from a source.


This module synchronises the smoke destination directory with a given source in a
given way. The source depends on the synchonisation method.

=head2 Synchronisers

The primary synchronisers are:


=item git

This method will use the L<git()> program to set up a main clone of the
C<gitorigin> source tree.  From this local git repository yet another clone is
made into the smoke destination directory. See L<Test::Smoke::Syncer::Git> for

=item rsync

This method uses the L<rsync()> program to synchronise the smoke destination
directory with a given remote directory/archive C<source>, with C<opts>.

=item copy

This method copies all files in C<cdir>/MANIFEST to C<ddir> and removes all
files not mentioned in that MANIFEST. See L<Test::Smoke::SourceTree>.


=head2 Test::Smoke::App::Syncer->new()

Add a L<Test::Smoke::Syncer> object to the instance.


sub new {
    my $class = shift;
    my $self = $class->SUPER::new(@_);

    $self->{_syncer} = Test::Smoke::Syncer->new(
        v => $self->option('verbose'),

    return $self;

=head2 $syncer->run()

Actually call C<< $self->syncer->sync() >>.


sub run {
    my $self = shift;

    my $patchlevel = $self->syncer->sync();
        "%s is now up to patchlevel %s",
    return $patchlevel;



(c) 2002-2013, Abe Timmerman <> All rights reserved.

With contributions from Jarkko Hietaniemi, Merijn Brand, Campo
Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop,
Rich Rauenzahn, David Cantrell.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.


=over 4

=item * L<>

=item * L<>


This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of