monotone

monotone Commit Details

Date:2008-12-07 19:35:59 (10 years 6 months ago)
Author:Tony Cooper
Branch:net.venge.monotone.contrib.mtn-browse
Commit:46a0445fc5174703355d703a8f563ce9bdf2c2fe
Parents: 7d42f95431e96d7ff8e2b80b77454b98166094b6
Message:- Written Linux installer.

- Now deal with file renames in a more sensible way when dealing with file
histories.
Changes:
Alinux-install (full)
Mlib/perl/History.pm (18 diffs)
Mmtn-browse (4 diffs)
Plinux-install
mtn:execute true

File differences

lib/perl/History.pm
8787
8888
8989
90
9091
9192
9293
9394
9495
95
96
9697
9798
9899
......
125126
126127
127128
128
129129
130130
131131
......
153153
154154
155155
156
157
156
157
158158
159159
160160
......
162162
163163
164164
165
166
165
166
167
167168
168169
169170
......
328329
329330
330331
331
332332
333333
334334
......
355355
356356
357357
358
358359
359
360
360361
361362
362363
......
367368
368369
369370
370
371
371
372
372373
373374
374375
......
593594
594595
595596
596
597
598
597599
598600
599601
......
610612
611613
612614
613
615
616
614617
615
618
616619
617620
618621
......
665668
666669
667670
668
671
672
673
669674
670
671
672
673
675
676
677
678
674679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
675772
676773
677774
......
12031300
12041301
12051302
1206
1207
1208
1303
12091304
12101305
1211
1212
1213
1214
1215
1306
12161307
12171308
12181309
......
12241315
12251316
12261317
1227
1318
12281319
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1320
12421321
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
12771322
12781323
12791324
......
14341479
14351480
14361481
1482
1483
14371484
14381485
14391486
......
14901537
14911538
14921539
1493
1494
1495
1496
1497
1540
1541
1542
1543
1544
14981545
14991546
15001547
......
15031550
15041551
15051552
1506
1553
15071554
15081555
15091556
1510
1511
1557
15121558
1513
1559
15141560
1515
1516
1561
1562
15171563
1518
1564
15191565
1520
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
15211591
1522
1592
15231593
1524
1594
1595
1596
15251597
15261598
15271599
1528
1600
1601
1602
1603
1604
1605
1606
1607
15291608
1609
15301610
15311611
15321612
......
15401620
15411621
15421622
1543
1544
15451623
15461624
15471625
......
15491627
15501628
15511629
1552
1630
15531631
15541632
1555
1633
15561634
15571635
15581636
15591637
15601638
1639
1640
1641
1642
15611643
15621644
15631645
1564
1565
1566
1567
1568
1569
1570
1571
1646
1647
15721648
15731649
15741650
......
17351811
17361812
17371813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
17381901
17391902
17401903
sub compare_button_clicked_cb($$);
sub compare_revisions($$$;$);
sub comparison_revision_change_log_button_clicked_cb($$);
sub external_diffs($$$$$);
sub external_diffs_button_clicked_cb($$);
sub file_comparison_combobox_changed_cb($$);
sub get_file_history_helper($$$);
sub get_history_window();
sub get_revision_comparison_window();
sub get_revision_history_helper($$$);
sub get_revision_history_helper($$);
sub history_list_button_clicked_cb($$);
sub mtn_diff($$$$;$);
sub save_differences_button_clicked_cb($$);
my($button,
@certs_list,
$counter,
%history_hash,
$instance);
my $wm = WindowManager->instance();
$instance->{appbar}->set_status(__("Fetching revision list"));
$wm->update_gui();
$history_hash{$revision_id} = 1;
get_revision_history_helper($instance, \%history_hash, $revision_id);
$instance->{revision_hits} = {};
get_revision_history_helper($instance, $revision_id);
# Sort the list.
$instance->{appbar}->set_status(__("Sorting revision list"));
$wm->update_gui();
$instance->{history} = [];
$instance->{mtn}->toposort($instance->{history}, keys(%history_hash));
%history_hash = ();
$instance->{mtn}->toposort($instance->{history},
keys(%{$instance->{revision_hits}}));
$instance->{revision_hits} = undef;
@{$instance->{history}} = reverse(@{$instance->{history}});
$instance->{appbar}->set_progress_percentage(1);
$wm->update_gui();
my($button,
@certs_list,
$counter,
%history_hash,
$instance);
my $wm = WindowManager->instance();
$instance->{appbar}->set_status(__("Fetching revision list"));
$instance->{stop_button}->set_sensitive(TRUE);
$wm->update_gui();
$instance->{revision_hits} = {};
Monotone::AutomateStdio->register_error_handler(MTN_SEVERITY_WARNING);
get_file_history_helper($instance, \%history_hash, $revision_id);
get_file_history_helper($instance, $revision_id, \$instance->{file_name});
Monotone::AutomateStdio->register_error_handler(MTN_SEVERITY_ALL,
\&mtn_error_handler);
$instance->{stop_button}->set_sensitive(FALSE);
$instance->{appbar}->set_status(__("Sorting revision list"));
$wm->update_gui();
$instance->{history} = [];
$instance->{mtn}->toposort($instance->{history}, keys(%history_hash));
%history_hash = ();
$instance->{mtn}->toposort($instance->{history},
keys(%{$instance->{revision_hits}}));
@{$instance->{history}} = reverse(@{$instance->{history}});
$instance->{appbar}->set_progress_percentage(1);
$wm->update_gui();
my($branch,
@certs_list,
$dir,
$file);
$file,
$path_ref);
# First find out what branch the revision is on (take the first one).
# Split the file name into directory and file components.
$dir = dirname($instance->{file_name});
$path_ref = $instance->{revision_hits}->{$revision_id};
$dir = dirname($$path_ref);
$dir = "" if ($dir eq ".");
$file = basename($instance->{file_name});
$file = basename($$path_ref);
# Get a new browser window preloaded with the desired file.
$instance->{second_revision_id});
$instance->{mtn}->toposort(\@revision_ids, @revision_ids);
# Now compare them.
# If a file is being compared and it has been renamed between the two
# comparison revisions then we have to fall back on the external helper
# application, otherwise we can use Monotone's comparison feature.
compare_revisions($instance->{mtn},
$revision_ids[0],
$revision_ids[1],
$instance->{file_name});
if (defined($instance->{file_name})
&& $instance->{revision_hits}->{$revision_ids[0]}
!= $instance->{revision_hits}->{$revision_ids[1]})
{
my($answer,
$dialog,
@manifest,
$new_file_id,
$old_file_id);
$dialog = Gtk2::MessageDialog->new
($instance->{window},
["modal"],
"question",
"yes-no",
__("The name of the selected file has changed\n"
. "between the two selected revisions and cannot\n"
. "be compared internally. Would you like to do\n"
. "the comparison using the external helper application?"));
$dialog->set_title(__("External Comparison"));
$answer = $dialog->run();
$dialog->destroy();
# Only continue if asked to do so.
if ($answer eq "yes")
{
# Get the manifests of the two revisions and look for the files in
# order to get their file ids.
$instance->{mtn}->get_manifest_of(\@manifest, $revision_ids[0]);
foreach my $entry (@manifest)
{
if ($entry->{name}
eq ${$instance->{revision_hits}->{$revision_ids[0]}})
{
$old_file_id = $entry->{file_id};
last;
}
}
$instance->{mtn}->get_manifest_of(\@manifest, $revision_ids[1]);
foreach my $entry (@manifest)
{
if ($entry->{name}
eq ${$instance->{revision_hits}->{$revision_ids[1]}})
{
$new_file_id = $entry->{file_id};
last;
}
}
# Make sure we have the file ids.
if (! defined($old_file_id) || ! defined ($new_file_id))
{
my $dialog;
$dialog = Gtk2::MessageDialog->new
($instance->{window},
["modal"],
"warning",
"close",
__("The file contents cannot be\n"
. "found in the select revisions.\n"
. "This should not be happening."));
$dialog->run();
$dialog->destroy();
return;
}
# Use the external helper application to compare the files.
external_diffs($instance,
${$instance->{revision_hits}->{$revision_ids[0]}},
$old_file_id,
${$instance->{revision_hits}->{$revision_ids[1]}},
$new_file_id);
}
}
else
{
# Use Monotone's comparison feature.
compare_revisions($instance->{mtn},
$revision_ids[0],
$revision_ids[1],
defined($instance->{file_name})
? ${$instance->{revision_hits}->
{$revision_ids[0]}}
: undef);
}
}
#
##############################################################################
return if ($instance->{in_cb});
local $instance->{in_cb} = 1;
my($cmd,
$data,
$file_id_1,
my($file_id_1,
$file_id_2,
$file_name,
$iter,
$new_fh,
$new_file,
$old_fh,
$old_file);
$iter);
# Get the details associated with the currently selected file.
$file_id_2 = $instance->{file_comparison_combobox}->get_model()->
get($iter, CLS_FILE_ID_2_COLUMN);
# Generate temporary disk file names.
# Use the external helper application to compare the files.
if (! defined($old_file = generate_tmp_path(__("OLDER_") . $file_name))
|| ! defined($new_file = generate_tmp_path(__("NEWER_") . $file_name)))
{
my $dialog = Gtk2::MessageDialog->new
($instance->{window},
["modal"],
"warning",
__x("Cannot generate temporary file name:\n{error_message}.",
error_message => $!));
$dialog->run();
$dialog->destroy();
return;
}
external_diffs($instance, $file_name, $file_id_1, $file_name, $file_id_2);
# Attempt to save the contents to the files.
if (! defined($old_fh = IO::File->new($old_file, "w"))
|| ! defined($new_fh = IO::File->new($new_file, "w")))
{
my $dialog = Gtk2::MessageDialog->new
($instance->{window},
["modal"],
"warning",
"close",
__x("{error_message}.", error_message => $!));
$dialog->run();
$dialog->destroy();
return;
}
$instance->{mtn}->get_file(\$data, $file_id_1);
$old_fh->print($data);
$instance->{mtn}->get_file(\$data, $file_id_2);
$new_fh->print($data);
$old_fh->close();
$new_fh->close();
$old_fh = $new_fh = undef;
# Use the specified differences application, replacing `{file1}' and
# `{file2}' with the real file names.
$cmd = $user_preferences->{diffs_application};
$cmd =~ s/\{file1\}/$old_file/g;
$cmd =~ s/\{file2\}/$new_file/g;
# Launch it.
system($cmd . " &");
}
#
##############################################################################
hide_find_text($instance->{history_textview});
$widget->hide();
$instance->{history_buffer}->set_text("");
$instance->{history} = undef;
$instance->{revision_hits} = undef;
$instance->{mtn} = undef;
return TRUE;
},
# Description - Recursive routine for getting the revisions in a file's
# change history.
#
# Data - $instance : The file history window instance.
# $hash : A reference to a hash that is to contain the
# list of revision ids.
# $revision_id : The revision id from where the search is to
# commence.
# Data - $instance : The file history window instance.
# $revision_id : The revision id from where the search is
# to commence.
# $file_name_ref : A reference to the name of the file that
# is to have its history returned.
#
##############################################################################
sub get_file_history_helper($$$)
{
my($instance, $hash, $revision_id) = @_;
my($instance, $revision_id, $file_name_ref) = @_;
return if ($instance->{stop});
my(@change_parents,
@parents);
my(@changed_ancestors);
$instance->{mtn}->get_content_changed(\@change_parents,
$instance->{mtn}->get_content_changed(\@changed_ancestors,
$revision_id,
$instance->{file_name});
foreach my $revision (@change_parents)
$$file_name_ref);
foreach my $revision (@changed_ancestors)
{
if (! exists($hash->{$revision}))
if (! exists($instance->{revision_hits}->{$revision}))
{
$hash->{$revision} = 1;
my @parents;
# Track file renames in the changed ancestor revisions (no need to
# bother if the ancestor revision is the same as the current one as
# we were passed the file name).
if ($revision ne $revision_id)
{
my $file_name;
$instance->{mtn}->
get_corresponding_path(\$file_name,
$revision_id,
$$file_name_ref,
$revision);
$file_name_ref = \$file_name
if ($file_name ne $$file_name_ref);
}
# Store a reference to the current file name in the revision hit
# hash, this can be used later to refer to the correct file name
# for a given changed ancestor revision.
$instance->{revision_hits}->{$revision} = $file_name_ref;
set_label_value($instance->{numbers_value_label},
scalar(keys(%$hash)));
scalar(keys(%{$instance->{revision_hits}})));
WindowManager->update_gui();
@parents = ();
# Now repeat for each parent, remembering to track file renames.
$instance->{mtn}->parents(\@parents, $revision);
foreach my $parent (@parents)
{
get_file_history_helper($instance, $hash, $parent);
my $file_name;
$instance->{mtn}->get_corresponding_path(\$file_name,
$revision,
$$file_name_ref,
$parent);
$file_name_ref = \$file_name
if ($file_name ne $$file_name_ref);
get_file_history_helper($instance, $parent, $file_name_ref);
}
}
}
# change history.
#
# Data - $instance : The revision history window instance.
# $hash : A reference to a hash that is to contain the
# list of revision ids.
# $revision_id : The revision id from where the search is to
# commence.
#
sub get_revision_history_helper($$$)
sub get_revision_history_helper($$)
{
my($instance, $hash, $revision_id) = @_;
my($instance, $revision_id) = @_;
return if ($instance->{stop});
my @parents;
$instance->{revision_hits}->{$revision_id} = 1;
set_label_value($instance->{numbers_value_label},
scalar(keys(%{$instance->{revision_hits}})));
WindowManager->update_gui();
$instance->{mtn}->parents(\@parents, $revision_id);
foreach my $parent (@parents)
{
if (! exists($hash->{$parent}))
{
$hash->{$parent} = 1;
set_label_value($instance->{numbers_value_label},
scalar(keys(%$hash)));
WindowManager->update_gui();
get_revision_history_helper($instance, $hash, $parent);
}
get_revision_history_helper($instance, $parent)
if (! exists($instance->{revision_hits}->{$parent}));
}
}
#
##############################################################################
#
# Routine - external_diffs
#
# Description - Launch the external differences helper program, loading in
# the contents of the specified files.
#
# Data - $instance : The revision history window instance.
# $old_file_name : The file name of the older version of the
# file.
# $old_file_id : Monotone's file id for the older version
# of the file.
# $new_file_name : The file name of the newer version of the
# file.
# $new_file_id : Monotone's file id for the newer version
# of the file.
#
##############################################################################
sub external_diffs($$$$$)
{
my($instance, $old_file_name, $old_file_id, $new_file_name, $new_file_id)
= @_;
my($cmd,
$data,
$new_fh,
$new_file,
$old_fh,
$old_file);
# 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)))
{
my $dialog = Gtk2::MessageDialog->new
($instance->{window},
["modal"],
"warning",
__x("Cannot generate temporary file name:\n{error_message}.",
error_message => $!));
$dialog->run();
$dialog->destroy();
return;
}
# Attempt to save the contents to the files.
if (! defined($old_fh = IO::File->new($old_file, "w"))
|| ! defined($new_fh = IO::File->new($new_file, "w")))
{
my $dialog = Gtk2::MessageDialog->new
($instance->{window},
["modal"],
"warning",
"close",
__x("{error_message}.", error_message => $!));
$dialog->run();
$dialog->destroy();
return;
}
$instance->{mtn}->get_file(\$data, $old_file_id);
$old_fh->print($data);
$instance->{mtn}->get_file(\$data, $new_file_id);
$new_fh->print($data);
$old_fh->close();
$new_fh->close();
$old_fh = $new_fh = undef;
# Use the specified differences application, replacing `{file1}' and
# `{file2}' with the real file names.
$cmd = $user_preferences->{diffs_application};
$cmd =~ s/\{file1\}/$old_file/g;
$cmd =~ s/\{file2\}/$new_file/g;
# Launch it.
system($cmd . " &");
}
#
##############################################################################
#
# Routine - mtn_diff
#
# Description - Compare two the specified two revisions, optionally
linux-install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
#!/usr/bin/perl
##############################################################################
#
# File Name - linux-install
#
# Description - Perl Linux installer for mtn-browse
#
# Author - A.E.Cooper.
#
# Legal Stuff - Copyright (c) 2007 Anthony Edward Cooper
# <aecooper@coosoft.plus.com>.
#
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation;
# either version 3 of the License, or (at your option) any
# later version.
#
# This program 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 General Public License for more
# details.
#
# You should have received a copy of the GNU General Public
# License along with this software; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307 USA.
#
##############################################################################
#
##############################################################################
#
# Global Data For This Module
#
##############################################################################
# ***** DIRECTIVES *****
require 5.008;
use strict;
use warnings;
# ***** REQUIRED PACKAGES *****
# Standard Perl and CPAN modules.
use IO::Dir;
use IO::File;
#
##############################################################################
#
# Routine - Main Body Of Code
#
# Description - This is the main body of code for the install script.
#
# Data - @_ : The command line arguments.
# Return Value : Unix exit code.
#
##############################################################################
{
my($dir,
$file,
$globs_file,
$infile,
$input,
$install,
$install_bin,
$lib_dir,
$mas_path,
$outfile,
$prefix_dir,
$use_dist_mas_lib);
print("Linux installer for mtn-browse\n\n");
$globs_file = "/usr/share/mime/globs";
$prefix_dir = "/usr";
while (1)
{
print("Where is your MIME globs file? [" . $globs_file . "]: ");
chomp($input = <STDIN>);
($input) = ($input =~ m/^\s*(.*)\s*$/);
if ($input ne "")
{
if (! -f $input)
{
print("Error: File `" . $input . "' is unreadable.\n");
next;
}
$globs_file = $input;
}
print("Where do you want to install it? [" . $prefix_dir . "]: ");
chomp($input = <STDIN>);
($input) = ($input =~ m/^\s*(.*)\s*$/);
if ($input ne "")
{
if (-e $input && (! -d $input || ! -w $input))
{
print("Error: Directory `" . $input . "' is unwritable or not "
. "a directory.\n");
next;
}
$prefix_dir = $input;
}
$lib_dir = $prefix_dir . "/lib/mtn-browse";
print("Where should the libraries go? [" . $lib_dir . "]: ");
chomp($input = <STDIN>);
($input) = ($input =~ m/^\s*(.*)\s*$/);
if ($input ne "")
{
if (-e $input && (! -d $input || ! -w $input))
{
print("Error: Directory `" . $input . "' is unwritable or not "
. "a directory.\n");
next;
}
$lib_dir = $input;
}
print("Use the Monotone::AutomateStdio (MAS) library that came with "
. "this package? [Y]: ");
chomp($input = <STDIN>);
if ($input =~ m/^\s*[nN]\s*$/)
{
$use_dist_mas_lib = 0;
}
else
{
$use_dist_mas_lib = 1;
}
($input) = ($input =~ m/^\s*(.*)\s*$/);
if ($input ne "")
{
if (-e $input && (! -d $input || ! -w $input))
{
print("Error: Directory `" . $input . "' is unwritable or not "
. "a directory.\n");
next;
}
$lib_dir = $input;
}
print("\nInstallation options are:\n");
print("GLOBS_FILE = " . $globs_file . "\n");
print("PREFIX_DIR = " . $prefix_dir . "\n");
print("LIB_DIR = " . $lib_dir . "\n");
print("Use my MAS = " . ($use_dist_mas_lib ? "Yes" : "No") . "\n");
print("\nAccept these? [N]: ");
chomp($input = <STDIN>);
if ($input =~ m/^\s*[yY]\s*$/)
{
last;
}
}
# Install `executable'.
die("IO::File failed with $!")
if (! defined($infile = IO::File->new("mtn-browse", "r")));
die("IO::File failed with $!")
if (! defined($outfile = IO::File->new("mtn-browse.out", "w")));
while (defined($input = $infile->getline()))
{
$input =~ s/\@INST:LIB_DIR\@/$lib_dir/g;
$input =~ s/\@INST:GLOBS_FILE\@/$globs_file/g;
$input =~ s/\@INST:PREFIX_DIR\@/$prefix_dir/g;
$outfile->print($input);
}
$infile->close();
$outfile->close();
$infile = $outfile = undef;
$install_bin = "install -D -o 0 -g 0";
$install = "install -D -o 0 -g 0 -m 644";
system("$install_bin mtn-browse.out ${prefix_dir}/bin/mtn-browse");
unlink("mtn-browse.out");
# Install modules and libraries.
die("IO::Dir failed with $!")
if (! defined($dir = IO::Dir->new("lib/perl")));
while (defined($file = $dir->read()))
{
system("$install lib/perl/$file ${lib_dir}/perl/$file")
if ($file =~ m/.*\.pm$/);
}
$dir->close();
if ($use_dist_mas_lib)
{
my $mas_dir;
if (-r "lib/perl/Monotone/AutomateStdio.pm")
{
$mas_dir = "lib/perl/Monotone";
}
elsif (-r "../automate-stdio/lib/Monotone/AutomateStdio.pm")
{
$mas_dir = "../automate-stdio/lib/Monotone";
}
else
{
die("Been asked to use my MAS library but cannot find it.");
}
die("IO::Dir failed with $!")
if (! defined($dir = IO::Dir->new($mas_dir)));
while (defined($file = $dir->read()))
{
system("$install ${mas_dir}/$file ${lib_dir}/perl/Monotone/$file")
if ($file =~ m/.*\.pm$/ || $file =~ m/.*\.pod$/);
}
$dir->close();
}
# Install GUI components.
system("$install lib/ui/mtn-browse.glade ${lib_dir}/ui/mtn-browse.glade");
die("IO::Dir failed with $!")
if (! defined($dir = IO::Dir->new("lib/ui/pixmaps")));
while (defined($file = $dir->read()))
{
system("$install lib/ui/pixmaps/$file ${lib_dir}/ui/$file")
if ($file =~ m/.*\.png$/);
}
$dir->close();
exit(0);
}
mtn-browse
4444
4545
4646
47
48
47
48
49
4950
50
51
5152
5253
5354
......
6970
7071
7172
72
73
7374
7475
7576
......
176177
177178
178179
179
180
180181
181
182
182183
183184
184185
......
412413
413414
414415
415
416
416417
417418
418419
BEGIN
{
use constant LIB_PATH => "{INST:LIB_PATH}";
use constant MIME_GLOB_FILE => "{INST:GLOBS_FILE}";
use constant LIB_DIR => "@INST:LIB_DIR@";
use constant MIME_GLOB_FILE => "@INST:GLOBS_FILE@";
use constant PREFIX_DIR => "@INST:PREFIX_DIR@";
}
use lib LIB_PATH . "/perl";
use lib LIB_DIR . "/perl";
use locale;
use strict;
use warnings;
use Gtk2::Helper;
use Gtk2::Pango;
use Gtk2::SourceView;
use Locale::TextDomain ("mtn-browse", LIB_PATH . "/share/locale");
use Locale::TextDomain ("mtn-browse", PREFIX_DIR . "/share/locale");
use IO::File;
use IPC::Open3;
use POSIX qw(:errno_h :locale_h :sys_wait_h strftime);
Gnome2::Program->init("mtn-browse", 0.51);
setup_sigchld_handler(\&sigchld_handler);
$glade_file = LIB_PATH . "/ui/mtn-browse.glade";
$glade_file = LIB_DIR . "/ui/mtn-browse.glade";
$tooltips = Gtk2::Tooltips->new();
$line_image = Gtk2::Gdk::Pixbuf->new_from_file(LIB_PATH . "/ui/line.png");
$line_image = Gtk2::Gdk::Pixbuf->new_from_file(LIB_DIR . "/ui/line.png");
# Set up the default database locked and I/O wait handlers for the Monotone
# class.
local $browser->{in_cb} = 1;
$large_logo = Gtk2::Gdk::Pixbuf->new_from_file
(LIB_PATH . "/UI/mtn-browse-large.png")
(LIB_DIR . "/UI/mtn-browse-large.png")
if (! defined($large_logo));
Gnome2::About->new
("mtn-browse",

Archive Download the corresponding diff file

Branches

Tags

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