# # # add_file "README" # content [3fc8403adc2465b80881721e128ad08c363a3522] # # patch "Installer.pm" # from [5d7f0d6610fddf4c9693d91c32c7019fb46ba15c] # to [4106a5cac9038d987cf6f6e636cebbdead320ac0] # # patch "lib/perl/Common.pm" # from [5c8a9a2c2c51361964df595395e41cb5860ad3bb] # to [f2ee7741d79bf65a42e70c61c19122e45e9402e4] # # patch "lib/perl/Globals.pm" # from [a04f24cb8cead0f1284698ec95eab6a82d41e327] # to [8f1012dc8189c846ffbb5688ed43aafe4eda9520] # # patch "linux-install" # from [ed83eab524b9f196af92087e973a82b806cfe5fe] # to [2970e7bf38a76be04e3bb1352443e421230a36fb] # ============================================================ --- README 3fc8403adc2465b80881721e128ad08c363a3522 +++ README 3fc8403adc2465b80881721e128ad08c363a3522 @@ -0,0 +1,125 @@ +mtn-browse Version 0.60 +======================= + +mtn-browse is an application for browsing Monotone VCS databases without the +need of a workspace. The interface allows one to: + + * Easily select a revision from within a branch. + * Find a revision using complex queries. + * Navigate the contents of a revision using a built in file manager. + * Display file contents, either using the internal viewer or an external + helper application. + * Compare the changes between different revisions or versions of a file + either using the internal difference viewer or an external application. + * Find files within a revision based on detailed search criteria. + * Display file annotations and easily refer back to the corresponding + change documentation. + * Save files to disk. + +For further details on Monotone see http://monotone.ca. For further details on +mtn-browse see http://www.coosoft.plus.com/software.html. + + +INSTALLATION +------------ + +As root simply unpack the tar file and run the installer by doing: + + tar xvpzf mtn-browse-.tgz + cd mtn-browse- + chmod +x linux-install + ./linux-install + +and then follow the prompts. + +If you prefer to install this application manually then copy the files into +place using the following directory structure: + + + |-- bin + | `-- mtn-browse + `-- lib + `-- mtn-browse + |-- perl + | |-- AdvancedFind.pm + | |-- Annotate.pm + | |-- ChangeLog.pm + | |-- ComboAutoCompletion.pm + | |-- Common.pm + | |-- Completion.pm + | |-- FindFiles.pm + | |-- FindText.pm + | |-- Globals.pm + | |-- History.pm + | |-- Monotone <- 1) + | | |-- AutomateStdio.pm + | | `-- AutomateStdio.pod + | |-- Preferences.pm + | `-- WindowManager.pm + `-- ui + |-- annotate.png + |-- diffs.png + |-- external-diffs.png + |-- line.png + |-- monotone-viz.png + |-- mtn-browse-large.png + |-- mtn-browse.glade + `-- mtn-browse.png + +The only file that needs to be executable is the mtn-browse file under the bin +directory. + +1) The Monotone directory is only needed if the Monotone::AutomateStdion +package from CPAN has not already been installed. + +Once the files are in place then edit the mtn-browse executable and change the +constants at the top containing the "@INST:LIB_DIR@", "@INST:GLOBS_FILE@" and +"@INST:PREFIX_DIR@" values so that they contain the correct values. It is +probably best that you actually run the installer as a non-privileged user and +install it somewhere under your home directory and then change the paths +accordingly. + + +DEPENDENCIES +------------ + +This module requires these other modules and libraries: + + * Perl 5.8.5 or later + * Gnome and Gtk2 + * The following Perl CPAN modules: + - Glib (1.144) * + - Gnome2 (1.042) * + - Gnome2-Canvas (1.002) * + - Gnome2-Print (1.000) * + - Gnome2-VFS (1.080) * + - Gtk2 (1.146) * + - Gtk2-GladeXML (1.006) * + - Gtk2-SourceView (1.000) * + - libintl-perl (1.16) + - Monotone::AutomateStdio + +Please note that the Gtk2 CPAN bundle will probably satisfy all of the +dependencies marked with * at the end of the line. + +Older versions of Perl may work but these have not been tested at this point in +time. + + +COPYRIGHT AND LICENCE +--------------------- + +Copyright (c) 2007 Anthony Edward Cooper . + +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 3 of the License, or (at your option) any +later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this library; if not, write to the Free Software Foundation, Inc., 59 +Temple Place - Suite 330, Boston, MA 02111-1307 USA. ============================================================ --- Installer.pm 5d7f0d6610fddf4c9693d91c32c7019fb46ba15c +++ Installer.pm 4106a5cac9038d987cf6f6e636cebbdead320ac0 @@ -62,7 +62,7 @@ use File::Spec; # Public methods. -sub install($$$); +sub install($$$;$); sub new($$$$$$); # ***** PACKAGE INFORMATION ***** @@ -88,9 +88,9 @@ our $VERSION = 0.1; # $group : The group id for any destination files and # directories. # $dir_perms : Permissions for any created directories. -# $nexec_perms : Permissions for any created non-executable +# $exec_perms : Permissions for any created executable # files. -# $exec_perms : Permissions for any created executable +# $nexec_perms : Permissions for any created non-executable # files. # Return Value : A reference to the newly created object. # @@ -104,13 +104,13 @@ sub new($$$$$$) my $class = (ref($_[0]) ne "") ? ref($_[0]) : $_[0]; shift(); - my($owner, $group, $dir_perms, $nexec_perms, $exec_perms) = @_; + my($owner, $group, $dir_perms, $exec_perms, $nexec_perms) = @_; my $this = {owner => $owner, group => $group, dir_perms => $dir_perms, - non_exec_perms => $nexec_perms, - exec_perms => $exec_perms}; + exec_perms => $exec_perms, + non_exec_perms => $nexec_perms}; bless($this, $class); return $this; @@ -128,15 +128,18 @@ sub new($$$$$$) # $dest_file : The name of where the file is to be installed # to. Single `.' file names are allowed and are # taken to mean same file name. +# $perms : The file permissions for the target file or +# undef the default file permssions should be +# used. This is optional. # ############################################################################## -sub install($$$) +sub install($$$;$) { - my($this, $src_file, $dest_file) = @_; + my($this, $src_file, $dest_file, $perms) = @_; my($file, $full_path, @@ -176,16 +179,19 @@ sub install($$$) copy($src_file, $full_path) or croak("copy " . $src_file . " " . $full_path . " failed with: " . $!); - if (-x $src_file) + if (! defined($perms)) { - chmod($this->{exec_perms}, $full_path) - or croak ("chmod " . $full_path . "failed with: " . $!); + if (-x $src_file) + { + $perms = $this->{exec_perms}; + } + else + { + $perms = $this->{non_exec_perms}; + } } - else - { - chmod($this->{non_exec_perms}, $full_path) - or croak ("chmod " . $full_path . "failed with: " . $!); - } + chmod($perms, $full_path) + or croak ("chmod " . $full_path . "failed with: " . $!); chown($this->{owner}, $this->{group}, $full_path); } ============================================================ --- lib/perl/Common.pm 5c8a9a2c2c51361964df595395e41cb5860ad3bb +++ lib/perl/Common.pm f2ee7741d79bf65a42e70c61c19122e45e9402e4 @@ -943,7 +943,7 @@ sub file_glob_to_regexp($) # updated or loaded. # $value : The new value that is to be added to the # specified history list and comboboxentry or -# undef if the comboboxentry is just to +# undef if the comboboxentry is just to be # updated with the current history list. This # is optional. # @@ -970,7 +970,7 @@ sub handle_comboxentry_history($$;$) if ($entry eq $value) { $update_history = 0; - last; + last; } } } @@ -1006,11 +1006,13 @@ sub handle_comboxentry_history($$;$) if ($update_history) { + my $text_entry_value = $widget->child()->get_text(); $widget->get_model()->clear(); foreach my $entry (@$history_ref) { $widget->append_text($entry); } + $widget->child()->set_text($text_entry_value); } } ============================================================ --- lib/perl/Globals.pm a04f24cb8cead0f1284698ec95eab6a82d41e327 +++ lib/perl/Globals.pm 8f1012dc8189c846ffbb5688ed43aafe4eda9520 @@ -56,7 +56,7 @@ use constant APPLICATION_NAME => "mtn # Constants for the name and version of this application. use constant APPLICATION_NAME => "mtn-browse"; -use constant APPLICATION_VERSION => 0.51; +use constant APPLICATION_VERSION => 0.60; # Constants used to represent the different groups of widgets. ============================================================ --- linux-install ed83eab524b9f196af92087e973a82b806cfe5fe +++ linux-install 2970e7bf38a76be04e3bb1352443e421230a36fb @@ -185,7 +185,9 @@ use Installer; $infile->close(); $outfile->close(); $infile = $outfile = undef; - $installer->install("mtn-browse.out", "${prefix_dir}/bin/mtn-browse"); + $installer->install("mtn-browse.out", + "${prefix_dir}/bin/mtn-browse", + 0755); unlink("mtn-browse.out"); # Install modules and libraries.