my $line = <$client>;
chomp($line);
warn "<<< $line\n";
- my ($user,$hostname,$pwd,$command,$rel_path,$message) = split(/\s+/,$line,5);
+ my ($user,$hostname,$pwd,$command,$rel_path,$message) = split(/\s+/,$line,6);
my $on_host = $1 if $rel_path =~ s/^([^:]+):(.+)$/$2/ && -e $1;
my $path = $rel_path =~ m{^/} ? $rel_path : "$pwd/$rel_path";
- $message ||= '';
- warn "$hostname [$command] $path | $message\n";
- $message ||= "$hostname [$command] $path";
+ warn "$hostname [$command] $on_host:$path | $message\n";
+ $message ||= "$path [$command]";
+ $message = "$hostname: $message";
my $dir = $path;
$dir =~ s{/[^/]+$}{};
pull_changes $hostname if $command eq 'diff';
if ( $on_host ) {
system 'rsync', '-avv', "root\@$on_host:$path", "$on_host/$path";
- open(my $diff, '-|', "diff -uw $hostname$path $on_host$path");
+ open(my $diff, '-|', "diff -Nuw $hostname$path $on_host$path");
while(<$diff>) {
print $client $_;
}