# # # patch "AdvancedFind.pm" # from [ec8d93ce749bdd731367afb9c9de6e84229b759c] # to [6e5be53cafef2639d987484861a69201ede8fc01] # # patch "ChangeLog.pm" # from [004a61a71b3a465a2c7e03be259d50882bff05e5] # to [0a0105366aa2b605389e85bce879d12e82deb8af] # # patch "Common.pm" # from [0031d4186ba5fad1cd40320302d4bfba75099ee2] # to [ca1b8ae5a378545b80fcee5134dc08105e067267] # # patch "mtn-browse" # from [d5048a0385597b68b60f183a6813593808f6276e] # to [1f39c894ebe1bda77f40188b0ac1baa18263ad49] # ============================================================ --- AdvancedFind.pm ec8d93ce749bdd731367afb9c9de6e84229b759c +++ AdvancedFind.pm 6e5be53cafef2639d987484861a69201ede8fc01 @@ -167,7 +167,6 @@ sub advanced_find($$$) } unshift(@$branches, $advanced_find->{branch_combo_details}->{value}) if ($found); - push(@$branches, "") if (scalar(@$branches) == 0); $ret_val = 1; } ============================================================ --- ChangeLog.pm 004a61a71b3a465a2c7e03be259d50882bff05e5 +++ ChangeLog.pm 0a0105366aa2b605389e85bce879d12e82deb8af @@ -141,7 +141,8 @@ sub generate_revision_report($$$$;$) my($bold, $cert_max_len, - $change_log, + @change_logs, + $i, $italics, $manifest_id, $normal, @@ -192,8 +193,9 @@ sub generate_revision_report($$$$;$) { if ($cert->{name} eq "changelog") { - $change_log = $cert->{value}; + my $change_log = $cert->{value}; $change_log =~ s/\s+$//os; + push(@change_logs, $change_log); } else { @@ -209,15 +211,28 @@ sub generate_revision_report($$$$;$) $normal); } } + push(@change_logs, "") if (scalar(@change_logs) == 0); - # Change log. + # Change log(s). - $text_buffer->insert_with_tags_by_name($text_buffer->get_end_iter(), - __("\nChange Log:\n"), - $bold); - $text_buffer->insert_with_tags_by_name($text_buffer->get_end_iter(), - sprintf("%s", $change_log), - $normal); + $i = 1; + foreach my $change_log (@change_logs) + { + $text_buffer->insert_with_tags_by_name($text_buffer->get_end_iter(), + "\n", + $normal) + if ($i > 1); + $text_buffer->insert_with_tags_by_name + ($text_buffer->get_end_iter(), + __x("\nChange Log{optional_count}:\n", + optional_count => (scalar(@change_logs) > 1) + ? sprintf(" %d", $i) : ""), + $bold); + $text_buffer->insert_with_tags_by_name($text_buffer->get_end_iter(), + $change_log, + $normal); + ++ $i; + } # The rest is only provided if it is a detailed report. ============================================================ --- Common.pm 0031d4186ba5fad1cd40320302d4bfba75099ee2 +++ Common.pm ca1b8ae5a378545b80fcee5134dc08105e067267 @@ -657,9 +657,12 @@ sub get_branch_revisions($$$$$) else { - # Get the list of revision ids. + # Get the list of revision ids, if no branch is specified then get all + # of the revisions within the database. - $mtn->select($revisions, "b:" . $branch); + $mtn->select($revisions, + ((defined($branch) && $branch ne "") ? "b:" : "i:") + . $branch); # Does it need truncating? @@ -720,6 +723,51 @@ sub get_branch_revisions($$$$$) # ############################################################################## # +# Routine - get_revision_ids +# +# Description - Return the currently selected revision id, whether this is +# specified via a tag or as a revision id. +# +# Data - $instance : The window instance. +# $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($$;$) +{ + + 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 + { + push(@$revision_ids, $instance->{revision_combo_details}->{value}); + } + +} +# +############################################################################## +# # Routine - get_file_details # # Description - Get the details of the specified file. @@ -778,51 +826,6 @@ sub get_file_details($$$$$$) # ############################################################################## # -# Routine - get_revision_ids -# -# Description - Return the currently selected revision id, whether this is -# specified via a tag or as a revision id. -# -# Data - $instance : The window instance. -# $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($$;$) -{ - - 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 - { - push(@$revision_ids, $instance->{revision_combo_details}->{value}); - } - -} -# -############################################################################## -# # Routine - file_glob_to_regexp # # Description - Converts the specified string containing a file name style ============================================================ --- mtn-browse d5048a0385597b68b60f183a6813593808f6276e +++ mtn-browse 1f39c894ebe1bda77f40188b0ac1baa18263ad49 @@ -701,7 +701,8 @@ sub advanced_find_button_clicked_cb($$) if ($preset_branch) { $browser->{branch_combo_details}->{preset} = 1; - $browser->{branch_combo_details}->{value} = $branches[0]; + $browser->{branch_combo_details}->{value} = + (scalar(@branches) > 0) ? $branches[0] : ""; $state = ALL_CHANGED; }