Revert "make remoteroot like verbose a method that propagates to the recentfiles"
[rersyncrecent.git] / bin / rrr-aggregate
blob6e5dc7e93cba80e81d55045fc6c0f9a1fa3be0c3
1 #!/usr/bin/perl -- -*- mode: cperl -*-
3 =head1 NAME
5 rrr-aggregate - merge a set of recentfiles
7 =head1 SYNOPSIS
9 rrr-aggregate [options] file
11 =head1 OPTIONS
13 =over 8
15 =cut
17 my @opt = <<'=back' =~ /B<--(\S+)>/g;
19 =item B<--dry-run!>
21 (TBD) Do not really run the command, ...
23 =item B<--help|h>
25 Prints a brief message and exists.
27 =item B<--locktimeout=s>
29 Sets the locktimeout. See L<File::Rsync::Mirror::Recentfile>.
31 =item B<--verbose|v+>
33 More feedback.
35 =back
37 =head1 DESCRIPTION
39 rersyncrecent is a project to get speedy rsync operation on large
40 trees over multiple hosts. It maintains a collection of files with
41 metadata (so called recentfiles) that represent adjacent or
42 overlapping timespans of file change events.
44 rrr-aggregate merges the recentfiles that describe a tree. The file
45 argument is the path to the principal (the shortest) in a collection
46 of recentfiles.
48 =cut
51 use strict;
52 use warnings;
54 use File::Rsync::Mirror::Recentfile;
55 use Getopt::Long;
56 use Pod::Usage qw(pod2usage);
58 our %Opt;
59 GetOptions(\%Opt,
60 @opt,
61 ) or pod2usage(2);
63 if ($Opt{help}) {
64 pod2usage(0);
67 if (! @ARGV) {
68 pod2usage(2);
71 if ($Opt{'dry-run'}) {
72 die "FIXME: not yet implemented";
75 my $rf = File::Rsync::Mirror::Recentfile->new_from_file($ARGV[0]);
76 if (my $tout = $Opt{locktimeout}) {
77 $rf->locktimeout($tout);
79 $rf->aggregate();
81 __END__
84 # Local Variables:
85 # mode: cperl
86 # coding: utf-8
87 # cperl-indent-level: 4
88 # End: