# # # add_file ".mtn-ignore" # content [edafd9e0e50f99c15831f038e830208624fbd15d] # # patch "lib/perl/History.pm" # from [4358099f96576b81d1a5289c727c852ef52871d0] # to [3e5076984b1e4e6f17d7837b4d71d82f0df5852e] # # patch "mtn-browse" # from [f720671e32ddcf0e29bb09fe3850b7844f8a4d25] # to [a82b688d74aecb69bbe72e1910216b5a0bd5f102] # ============================================================ --- .mtn-ignore edafd9e0e50f99c15831f038e830208624fbd15d +++ .mtn-ignore edafd9e0e50f99c15831f038e830208624fbd15d @@ -0,0 +1,13 @@ +^.emacs.desktop$ +^MTN$ +^MTN-0.40$ +^lib/perl/Monotone$ +^lib/ui/annotate.png$ +^lib/ui/diffs.png$ +^lib/ui/external-diffs.png$ +^lib/ui/line.png$ +^lib/ui/monotone-viz.png$ +^lib/ui/mtn-browse-large.png$ +^lib/ui/mtn-browse.png$ +^test-0_40.mtn$ +^test.mtn$ ============================================================ --- lib/perl/History.pm 4358099f96576b81d1a5289c727c852ef52871d0 +++ lib/perl/History.pm 3e5076984b1e4e6f17d7837b4d71d82f0df5852e @@ -1308,8 +1308,8 @@ sub external_diffs_button_clicked_cb($$) # Get the details associated with the currently selected file. $iter = $instance->{file_comparison_combobox}->get_active_iter(); - $file_name = basename($instance->{file_comparison_combobox}->get_model()-> - get($iter, CLS_FILE_NAME_COLUMN)); + $file_name = $instance->{file_comparison_combobox}->get_model()-> + get($iter, CLS_FILE_NAME_COLUMN); $file_id_1 = $instance->{file_comparison_combobox}->get_model()-> get($iter, CLS_FILE_ID_1_COLUMN); $file_id_2 = $instance->{file_comparison_combobox}->get_model()-> @@ -1845,9 +1845,11 @@ sub external_diffs($$$$$) # Generate temporary disk file names. - if (! defined($old_file = generate_tmp_path(__("OLDER_") . $old_file_name)) - || ! defined($new_file = generate_tmp_path(__("NEWER_") - . $new_file_name))) + if (! defined($old_file = generate_tmp_path(__("OLDER_") + . basename($old_file_name))) + || ! defined($new_file = + generate_tmp_path(__("NEWER_") + . basename($new_file_name)))) { my $dialog = Gtk2::MessageDialog->new ($instance->{window}, ============================================================ --- mtn-browse f720671e32ddcf0e29bb09fe3850b7844f8a4d25 +++ mtn-browse a82b688d74aecb69bbe72e1910216b5a0bd5f102 @@ -238,47 +238,21 @@ sub view_button_clicked_cb($$); # workspace's database. If this doesn't work or the default database is to # be used anyway then attempt to open that database instead. - eval + if ($user_preferences->{workspace}->{takes_precedence}) { - $mtn = Monotone::AutomateStdio->new(); - $mtn = undef; - while (! -d "_MTN") + eval { - if (! chdir("..")) + $mtn = Monotone::AutomateStdio->new(); + if ($user_preferences->{workspace}->{auto_select}) { - my $dialog = Gtk2::MessageDialog->new - (undef, - ["modal"], - "error", - "close", - __("Started in a workspace but I cannot\n" - . "find _MTN, I am going to exit.")); - $dialog->run(); - $dialog->destroy(); - exit(1); + $mtn->get_option(\$branch, "branch"); + $mtn->get_base_revision_id(\$revision_id); } - } - $mtn = Monotone::AutomateStdio->new(); - if ($user_preferences->{workspace}->{auto_select}) - { - $mtn->get_option(\$branch, "branch"); - $mtn->get_base_revision_id(\$revision_id); - } - }; - if (! ($user_preferences->{workspace}->{takes_precedence} - && defined($mtn)) - && $user_preferences->{default_mtn_db} ne "") + }; + } + if (! defined($mtn) && $user_preferences->{default_mtn_db} ne "") { - # Before opening the default database, make sure we are not in any - # workspace. - - if (defined($mtn)) - { - chdir(".."); - $mtn = $branch = $revision_id = undef; - } - # Attempt to open the default database. eval