# # # patch "contrib/monotone-notify.pl" # from [d87bd442725b5111f4e3178d0d97cf58668838b4] # to [432b768f797d95689428719d299831d74d61295d] # ============================================================ --- contrib/monotone-notify.pl d87bd442725b5111f4e3178d0d97cf58668838b4 +++ contrib/monotone-notify.pl 432b768f797d95689428719d299831d74d61295d @@ -62,6 +62,7 @@ GetOptions('help|?' => \$help, 'db=s' => \$user_database, 'root=s' => \$root, 'branch=s' => address@hidden, + 'not-branch=s' => address@hidden, 'update!' => \$update, 'mail!' => \$mail, 'attachments!' => \$attachments, @@ -167,6 +168,13 @@ if ($#user_branches >= 0) { s/\*/.\*/g; $_ } @user_branches).')$'; } +if ($#user_not_branches >= 0) { + $not_branches_re= + '^('.join('|', map { s/([^a-zA-Z0-9\[\]\*\?_])/\\$1/g; + s/\?/./g; + s/\*/.\*/g; + $_ } @user_not_branches).')$'; +} my_debug("using the regular expression /$branches_re/ to select branches"); my @files_to_clean_up = (); @@ -183,8 +191,9 @@ my %branches = my %branches = map { $_ => 1 } grep (/$branches_re/, - map { chomp; $_ } - my_backtick("$monotone$database list branches")); + grep (!/$not_branches_re, + map { chomp; $_ } + my_backtick("$monotone$database list branches"))); my_debug("collected the following branches:\n", map { " $_\n" } keys %branches);