# # # patch "ComboAutoCompletion.pm" # from [e64c089c106406ce01bd742aa45cf28a164aebea] # to [4682fa6a13d960ac1c1e63ccf5e6dfc4b6c5b9dc] # # patch "FindFiles.pm" # from [fb80c399c9551ba7d3da269d466ede47e7d4e027] # to [1f4661fa7ac0fc844818a0fb9762dddbbcf8d0ec] # # patch "History.pm" # from [591b6d22fc8b0f99ea5127f90a2087171f576cb6] # to [3d555a25521e72193dd2e8bdfd63ddb61c8edc8b] # # patch "Utilities.pm" # from [37cc44fcd142e960e9d888dd0d5f0f0e6fde9208] # to [c62f4cdcc9ff11f30ad4d01ec6387d0a5b2c6b60] # # patch "mtn-browse" # from [c4da8275bcc59dac9bd253aae27e1a380be8aa4a] # to [53961484ff210d65a9a82866523ac6ee68a85448] # ============================================================ --- ComboAutoCompletion.pm e64c089c106406ce01bd742aa45cf28a164aebea +++ ComboAutoCompletion.pm 4682fa6a13d960ac1c1e63ccf5e6dfc4b6c5b9dc @@ -52,6 +52,7 @@ sub comboboxentry_key_release_event_cb($ sub comboboxentry_changed_cb($$); sub comboboxentry_key_release_event_cb($$$); +sub tagged_checkbutton_toggled_cb($$); # ############################################################################## # @@ -260,5 +261,33 @@ sub comboboxentry_key_release_event_cb($ return FALSE; } +# +############################################################################## +# +# Routine - tagged_checkbutton_toggled_cb +# +# Description - Callback routine called when the user changes the value of +# the tagged check button. +# +# Data - $widget : The widget object that received the signal. +# $instance : The window instance that is associated with +# this widget. +# +############################################################################## + + +sub tagged_checkbutton_toggled_cb($$) +{ + + my($widget, $instance) = @_; + + return if ($instance->{in_cb}); + local $instance->{in_cb} = 1; + + $instance->{appbar}->clear_stack(); + &{$instance->{update_handler}}($instance, BRANCH_CHANGED); + +} + 1; ============================================================ --- FindFiles.pm fb80c399c9551ba7d3da269d466ede47e7d4e027 +++ FindFiles.pm 1f4661fa7ac0fc844818a0fb9762dddbbcf8d0ec @@ -73,7 +73,7 @@ use constant SIZE_MB => 2; # Public routines. -sub display_find_files($$$$); +sub display_find_files($$$$$); # Private routines. @@ -96,6 +96,10 @@ sub validate_query($$); # # Data - $mtn : The Monotone instance handle that is to # be used to search for files. +# $tag : Either a tag name for the specified +# revision that is to be used in the window +# title instead of the revision id or undef +# if the revision id should be used. # $revision_id : The id of the revision that is to be # searched. # $manifest : A reference to the corresponding revision @@ -107,10 +111,10 @@ sub validate_query($$); -sub display_find_files($$$$) +sub display_find_files($$$$$) { - my($mtn, $revision_id, $manifest, $starting_point) = @_; + my($mtn, $tag, $revision_id, $manifest, $starting_point) = @_; my $instance; @@ -122,8 +126,9 @@ sub display_find_files($$$$) $instance->{manifest} = $manifest; $instance->{starting_point} = $starting_point; - $instance->{window}->set_title(__x("Find Files With Revision {rev}", - rev => $revision_id)); + $instance->{window}->set_title(__x("Find Files Within Revision {rev}", + rev => defined($tag) ? + $tag : $revision_id)); set_label_value($instance->{searching_from_value_label}, $instance->{starting_point}); ============================================================ --- History.pm 591b6d22fc8b0f99ea5127f90a2087171f576cb6 +++ History.pm 3d555a25521e72193dd2e8bdfd63ddb61c8edc8b @@ -60,7 +60,7 @@ sub display_file_change_history($$$); # Public routines. sub display_file_change_history($$$); -sub display_revision_change_history($$); +sub display_revision_change_history($$$); # Private routines. @@ -86,6 +86,10 @@ sub save_differences_button_clicked_cb($ # # Data - $mtn : The Monotone instance handle that is to be # used to get the change history. +# $tag : Either a tag name for the specified revision +# that is to be used in the window title +# instead of the revision id or undef if the +# revision id should be used. # $revision_id : The id of the revision that is to have its # change log displayed. # @@ -93,10 +97,10 @@ sub save_differences_button_clicked_cb($ -sub display_revision_change_history($$) +sub display_revision_change_history($$$) { - my($mtn, $revision_id) = @_; + my($mtn, $tag, $revision_id) = @_; my($button, @certs_list, @@ -113,7 +117,8 @@ sub display_revision_change_history($$) $instance->{first_revision_id} = ""; $instance->{second_revision_id} = ""; $instance->{window}->set_title(__x("Revision History For {rev}", - rev => $revision_id)); + rev => defined($tag) ? + $tag : $revision_id)); $instance->{history_label}->set_markup(__("Revision History")); $instance->{window}->show_all(); ============================================================ --- Utilities.pm 37cc44fcd142e960e9d888dd0d5f0f0e6fde9208 +++ Utilities.pm c62f4cdcc9ff11f30ad4d01ec6387d0a5b2c6b60 @@ -64,7 +64,7 @@ sub get_file_details($$$$$$); sub get_branch_revisions($$$$$); sub get_dir_contents($$$); sub get_file_details($$$$$$); -sub get_revision_ids($$); +sub get_revision_ids($$;$); sub glade_signal_autoconnect($$); sub hex_dump($); sub open_database($$$); @@ -784,27 +784,35 @@ sub get_file_details($$$$$$) # specified via a tag or as a revision id. # # Data - $instance : The window instance. -# $revision_ids : The list of selected revision ids. Normally -# the list will have at most one element but -# may contain more if the tag isn't unique on -# the current branch. +# $revision_ids : A reference to a list that is to contain +# the revision ids. Normally the list will +# have at most one element but may contain +# more if the tag isn't unique on the current +# branch. +# $tag : A reference to a variable that is to +# contain the tag name that the user selected +# or undef if the user selected a revision id +# directly. This is optional. # ############################################################################## -sub get_revision_ids($$) +sub get_revision_ids($$;$) { - my($instance, $revision_ids) = @_; + my($instance, $revision_ids, $tag) = @_; @$revision_ids=(); + $$tag = undef if (defined($tag)); return unless ($instance->{revision_combo_details}->{complete}); if ($instance->{tagged_checkbutton}->get_active()) { $instance->{mtn}-> select($revision_ids, "t:" . $instance->{revision_combo_details}->{value}); + $$tag = $instance->{revision_combo_details}->{value} + if (defined($tag)); } else { ============================================================ --- mtn-browse c4da8275bcc59dac9bd253aae27e1a380be8aa4a +++ mtn-browse 53961484ff210d65a9a82866523ac6ee68a85448 @@ -650,34 +650,6 @@ sub help_toolbutton_clicked_cb($$) # ############################################################################## # -# Routine - tagged_checkbutton_toggled_cb -# -# Description - Callback routine called when the user changes the value of -# the tagged check button. -# -# Data - $widget : The widget object that received the signal. -# $instance : The window instance that is associated with -# this widget. -# -############################################################################## - - - -sub tagged_checkbutton_toggled_cb($$) -{ - - my($widget, $instance) = @_; - - return if ($instance->{in_cb}); - local $instance->{in_cb} = 1; - - $instance->{appbar}->clear_stack(); - &{$instance->{update_handler}}($instance, BRANCH_CHANGED); - -} -# -############################################################################## -# # Routine - advanced_find_button_clicked_cb # # Description - Callback routine called when the user clicks on the @@ -769,10 +741,11 @@ sub revision_change_history_button_click return if ($browser->{in_cb}); local $browser->{in_cb} = 1; - my @revision_ids; + my(@revision_ids, + $tag); - get_revision_ids($browser, address@hidden); - display_revision_change_history($browser->{mtn}, $revision_ids[0]); + get_revision_ids($browser, address@hidden, \$tag); + display_revision_change_history($browser->{mtn}, $tag, $revision_ids[0]); } # @@ -799,15 +772,13 @@ sub revision_change_log_button_clicked_c return if ($browser->{in_cb}); local $browser->{in_cb} = 1; - my @revision_ids; + my(@revision_ids, + $tag); # Get the currently selected revision id and then display its change log. - get_revision_ids($browser, address@hidden); - display_change_log($browser->{mtn}, - $revision_ids[0], - "", - $browser->{revision_combo_details}->{value}); + get_revision_ids($browser, address@hidden, \$tag); + display_change_log($browser->{mtn}, $revision_ids[0], "", $tag); } # @@ -941,8 +912,13 @@ sub find_files_button_clicked_cb($$) return if ($browser->{in_cb}); local $browser->{in_cb} = 1; + my(@revision_ids, + $tag); + + get_revision_ids($browser, address@hidden, \$tag); display_find_files($browser->{mtn}, - $browser->{revision_combo_details}->{value}, + $tag, + $revision_ids[0], $browser->{manifest}, $browser->{directory_combo_details}->{value});