log.pl
changeset 77 c32177d893a5
parent 62 9d3ec0d441a7
child 78 0d428ce0839a
equal deleted inserted replaced
64:f5c3eb82fa62 77:c32177d893a5
   117 
   117 
   118     if ($opt_message =~ /\n/) {
   118     if ($opt_message =~ /\n/) {
   119         $opt_message =~ s/\n/\n    /g;
   119         $opt_message =~ s/\n/\n    /g;
   120     }
   120     }
   121 
   121 
   122     if (defined @config::notify_dirs || $opt_initdir) {
   122     if (@config::notify_dirs || $opt_initdir) {
   123         check_hg_bin();
   123         check_hg_bin();
   124     }
   124     }
   125 
   125 
   126     if ($opt_initdir) {
   126     if ($opt_initdir) {
   127         my $repo = Logbuch::HG->new(repo => $opt_initdir);
   127         my $repo = Logbuch::HG->new(repo => $opt_initdir);
   137 
   137 
   138         exit 0;
   138         exit 0;
   139     }
   139     }
   140 
   140 
   141     my $hg_status_text = "";
   141     my $hg_status_text = "";
   142     if (defined @config::notify_dirs) {
   142     if (@config::notify_dirs) {
   143         foreach my $dir (@config::notify_dirs) {
   143         foreach my $dir (@config::notify_dirs) {
   144             -d $dir or next;
   144             -d $dir or next;
   145 
   145 
   146             print "$ME: Checking $dir for modifications\n";
   146             print "$ME: Checking $dir for modifications\n";
   147 
   147 
   265             print $mailer $head, "\n", $text;
   265             print $mailer $head, "\n", $text;
   266             close $mailer;
   266             close $mailer;
   267             print STDERR "Mail sent (to $mailto).\n";
   267             print STDERR "Mail sent (to $mailto).\n";
   268         }
   268         }
   269 
   269 
   270         if (defined @config::notify_dirs) {
   270         if (@config::notify_dirs) {
   271             foreach my $dir (@config::notify_dirs) {
   271             foreach my $dir (@config::notify_dirs) {
   272                 -d $dir or next;
   272                 -d $dir or next;
   273 
   273 
   274                 my $repo = Logbuch::HG->new(repo => $dir);
   274                 my $repo = Logbuch::HG->new(repo => $dir);
   275                 $repo->commit();
   275                 $repo->commit();