monotone

monotone Commit Details

Date:2008-08-31 20:52:38 (10 years 9 months ago)
Author:Tony Cooper
Branch:net.venge.monotone.contrib.mtn-browse
Commit:f178b077fb901e228a726f16c34746c11aa03bb3
Parents: c97a70d07a03fd9a6263d72150eed6a0cc3423d0
Message:Switched over to using the severity constants as against using strings.

Changes:
MAdvancedFind.pm (2 diffs)
MCommon.pm (1 diff)
MHistory.pm (2 diffs)
Mmtn-browse (3 diffs)

File differences

AdvancedFind.pm
922922
923923
924924
925
925
926926
927927
928928
......
945945
946946
947947
948
948
949949
950950
951951
# queries! So protect ourselves.
Monotone::AutomateStdio->register_error_handler
("both",
(MTN_SEVERITY_ALL,
sub {
my($severity, $message) = @_;
my $dialog;
};
$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
396396
397397
398398
399
399
400
400401
401402
402403
403404
404405
405406
406
407
407408
408409
409410
# 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
7575
7676
7777
78
7978
8079
8180
......
356355
357356
358357
359
358
360359
361
360
362361
363362
364363
my $__select_id_rev_2_ttip = __("Select this revision for comparison\n"
. "as the first revision");
# ***** FUNCTIONAL PROTOTYPES *****
# Public routines.
$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
7979
8080
8181
82
82
8383
8484
8585
......
302302
303303
304304
305
305
306306
307307
308308
......
26982698
26992699
27002700
2701
2701
27022702
27032703
27042704
# Monotone AutomateStdio module.
use Monotone::AutomateStdio qw(:constants);
use Monotone::AutomateStdio qw(:capabilities :severities);
# Modules specific to this application.
# 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
my $dialog;
my $wm = WindowManager->instance();
if ($severity eq "warning")
if ($severity == MTN_SEVERITY_WARNING)
{
$dialog = Gtk2::MessageDialog->new_with_markup
(undef,

Archive Download the corresponding diff file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status