# # # patch "AdvancedFind.pm" # from [43deae55d1e14ea540a8923aae6db003740009ea] # to [efa8f6e45fd987c309c96b36be5872fc9b7d2072] # # patch "Common.pm" # from [03d08998dd1349208b277c16355d2d5ab9dd5f25] # to [71b46b955d4f154a84307ec346c815ef033132a2] # # patch "History.pm" # from [d6dad9209d2187519bd67157e783eed160663b2c] # to [6a9e6bbe43a118fddc3eb65c948b8762a1e6032e] # # patch "mtn-browse" # from [95cb6a8f3691166b8795b620ceece7412c810b59] # to [f37c64b1707bc37f10752949a6cacc3e2a53e3a2] # ============================================================ --- AdvancedFind.pm 43deae55d1e14ea540a8923aae6db003740009ea +++ AdvancedFind.pm efa8f6e45fd987c309c96b36be5872fc9b7d2072 @@ -922,7 +922,7 @@ sub update_advanced_find_state($$) # queries! So protect ourselves. Monotone::AutomateStdio->register_error_handler - ("both", + (MTN_SEVERITY_ALL, sub { my($severity, $message) = @_; my $dialog; @@ -945,7 +945,7 @@ sub update_advanced_find_state($$) }; $err = $@; Monotone::AutomateStdio->register_error_handler - ("both", \&mtn_error_handler); + (MTN_SEVERITY_ALL, \&mtn_error_handler); # If the query was valid then store it in the history. ============================================================ --- Common.pm 03d08998dd1349208b277c16355d2d5ab9dd5f25 +++ Common.pm 71b46b955d4f154a84307ec346c815ef033132a2 @@ -396,14 +396,15 @@ sub open_database($$$) # Ok it is a readable file, try and open it but deal with any # errors in a nicer way than normal. - Monotone::AutomateStdio->register_error_handler("both"); + Monotone::AutomateStdio->register_error_handler + (MTN_SEVERITY_ALL); eval { $mtn_obj = Monotone::AutomateStdio->new($fname); }; $err = $@; Monotone::AutomateStdio->register_error_handler - ("both", \&mtn_error_handler); + (MTN_SEVERITY_ALL, \&mtn_error_handler); if ($err ne "") { my $dialog = Gtk2::MessageDialog->new ============================================================ --- History.pm d6dad9209d2187519bd67157e783eed160663b2c +++ History.pm 6a9e6bbe43a118fddc3eb65c948b8762a1e6032e @@ -75,7 +75,6 @@ my $__select_id_rev_2_ttip = __("Select my $__select_id_rev_2_ttip = __("Select this revision for comparison\n" . "as the first revision"); - # ***** FUNCTIONAL PROTOTYPES ***** # Public routines. @@ -356,9 +355,9 @@ sub display_file_change_history($$$) $instance->{appbar}->set_status(__("Fetching revision list")); $instance->{stop_button}->set_sensitive(TRUE); $wm->update_gui(); - Monotone::AutomateStdio->register_error_handler("warning"); + Monotone::AutomateStdio->register_error_handler(MTN_SEVERITY_WARNING); get_file_history_helper($instance, \%history_hash, $revision_id); - Monotone::AutomateStdio->register_error_handler("both", + Monotone::AutomateStdio->register_error_handler(MTN_SEVERITY_ALL, \&mtn_error_handler); $instance->{stop_button}->set_sensitive(FALSE); ============================================================ --- mtn-browse 95cb6a8f3691166b8795b620ceece7412c810b59 +++ mtn-browse f37c64b1707bc37f10752949a6cacc3e2a53e3a2 @@ -79,7 +79,7 @@ use Time::Local; # Monotone AutomateStdio module. -use Monotone::AutomateStdio qw(:constants); +use Monotone::AutomateStdio qw(:capabilities :severities); # Modules specific to this application. @@ -302,7 +302,7 @@ sub view_button_clicked_cb($$); # Set up the error handlers for the Monotone class. - Monotone::AutomateStdio->register_error_handler("both", + Monotone::AutomateStdio->register_error_handler(MTN_SEVERITY_ALL, \&mtn_error_handler); # Create the browser window and display it. Please note that updating the @@ -2698,7 +2698,7 @@ sub mtn_error_handler($$) my $dialog; my $wm = WindowManager->instance(); - if ($severity eq "warning") + if ($severity == MTN_SEVERITY_WARNING) { $dialog = Gtk2::MessageDialog->new_with_markup (undef,