This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bump version to 5.33.5
[perl5.git] / Porting / sync-with-cpan
CommitLineData
33e80a47 1#!/usr/bin/env perl
418f4069 2
c5e3e317
JL
3=head1 NAME
4
f703fc96 5Porting/sync-with-cpan - Synchronize with CPAN distributions
c5e3e317
JL
6
7=head1 SYNOPSIS
8
0b2c8fe5
JK
9 sh ./Configure
10 perl Porting/sync-with-cpan <module>
c5e3e317
JL
11
12where <module> is the name it appears in the C<%Modules> hash
13of F<Porting/Maintainers.pl>
14
15=head1 DESCRIPTION
16
17Script to help out with syncing cpan distros.
18
19Does the following:
20
21=over 4
22
23=item *
24
25Fetches the package list from CPAN. Finds the current version of the given
26package. [1]
27
28=item *
29
30Downloads the relevant tarball; unpacks the tarball. [1]
31
32=item *
33
34Clean out the old directory (C<git clean -dfx>)
35
36=item *
37
38Moves the old directory out of the way, moves the new directory in place.
39
40=item *
41
42Restores any F<.gitignore> file.
43
44=item *
45
46Removes files from C<@IGNORE> and C<EXCLUDED>
47
48=item *
49
50C<git add> any new files.
51
52=item *
53
54C<git rm> any files that are gone.
55
56=item *
57
58Remove the +x bit on files in F<t/>
59
60=item *
61
62Remove the +x bit on files that don't have it enabled in the current dir
63
64=item *
65
66Restore files mentioned in C<CUSTOMIZED>
67
68=item *
69
190c1b3b 70Updates the contents of F<MANIFEST>
c5e3e317
JL
71
72=item *
73
74Runs a C<make> (assumes a configure has been run)
75
76=item *
77
78Cleans up
79
80=item *
81
82Runs tests for the package
83
84=item *
85
86Runs the porting tests
87
88=back
89
90[1] If the C<--tarball> option is given, then CPAN is not consulted.
91C<--tarball> should be the path to the tarball; the version is extracted
92from the filename -- but can be overwritten by the C<--version> option.
93
b7078f1e
AC
94=head1 OPTIONS
95
96=over 4
97
98=item C<--jobs> I<N>
99
100When running C<make>, pass a C<< -jI<N> >> option to it.
101
102=back
103
c5e3e317
JL
104=head1 TODO
105
106=over 4
107
108=item *
109
c5e3e317
JL
110Update F<Porting/Maintainers.pl>
111
112=item *
113
114Optional, run a full test suite
115
116=item *
117
118Handle complicated C<FILES>
119
120=back
121
122This is an initial version; no attempt has been made yet to make this
123portable. It shells out instead of trying to find a Perl solution.
cd9a1714 124In particular, it assumes git, perl, and make
c5e3e317
JL
125to be available.
126
127=cut
128
418f4069 129
4d18e0a2
A
130package Maintainers;
131
418f4069
A
132use 5.010;
133
134use strict;
135use warnings;
4d18e0a2 136use Getopt::Long;
a1450e8b 137use Archive::Tar;
bd4de633 138use File::Basename qw( basename );
192f56b0 139use File::Path qw( remove_tree );
fc134225 140use File::Find;
84709797 141use File::Spec::Functions qw( tmpdir rel2abs );
160daab8 142use Config qw( %Config );
418f4069
A
143
144$| = 1;
145
215d9c65
AC
146use constant WIN32 => $^O eq 'MSWin32';
147
07a826df 148die "This does not look like a top level directory"
418f4069
A
149 unless -d "cpan" && -d "Porting";
150
4b760246
AC
151# Check that there's a Makefile, if needed; otherwise, we'll do most of our
152# work only to fail when we try to run make, and the user will have to
153# either unpick everything we've done, or do the rest manually.
154die "Please run Configure before using $0\n"
155 if !WIN32 && !-f "Makefile";
156
418f4069
A
157our @IGNORABLE;
158our %Modules;
159
160use autodie;
161
b27c755c 162require "./Porting/Maintainers.pl";
418f4069 163
e6e4cae9
AC
164my $MAKE_LOG = 'make.log';
165
418f4069
A
166my %IGNORABLE = map {$_ => 1} @IGNORABLE;
167
af8c53c3 168my $tmpdir = tmpdir();
fc134225 169
418f4069
A
170my $package = "02packages.details.txt";
171my $package_url = "http://www.cpan.org/modules/$package";
fc134225 172my $package_file = "$tmpdir/$package"; # this is a cache
418f4069 173
b7e2b692
JL
174my @problematic = (
175 'podlators', # weird CUSTOMIZED section due to .PL files
176);
177
418f4069 178
311454c0
MB
179sub usage
180{
181 my $err = shift and select STDERR;
182 print "Usage: $0 module [args] [cpan package]\n";
183 exit $err;
184}
185
4d18e0a2 186GetOptions ('tarball=s' => \my $tarball,
b5bf278a 187 'version=s' => \my $version,
b7078f1e 188 'jobs=i' => \my $make_jobs,
311454c0
MB
189 force => \my $force,
190 help => sub { usage 0; },
191 ) or die "Failed to parse arguments";
4d18e0a2 192
311454c0 193usage 1 unless @ARGV == 1 || @ARGV == 2;
418f4069 194
fc134225
MM
195sub find_type_f {
196 my @res;
197 find( { no_chdir => 1, wanted => sub {
198 my $file= $File::Find::name;
199 return unless -f $file;
200 push @res, $file
201 }}, @_ );
202 @res
203};
204
cd9a1714
MM
205# Equivalent of `chmod a-x`
206sub de_exec {
746bc9e1
AC
207 my ($filename) = @_;
208 my $mode = (stat $filename)[2] & 0777;
209 if ($mode & 0111) { # exec-bit set
210 chmod $mode & 0666, $filename;
cd9a1714
MM
211 }
212}
213
b6574671
AC
214# Equivalent of `chmod +w`
215sub make_writable {
216 my ($filename) = @_;
217 my $mode = (stat $filename)[2] & 0777;
218 if (!($mode & 0222)) { # not writable
219 chmod $mode | (0222 & ~umask), $filename;
220 }
221}
222
cd9a1714 223sub make {
160daab8 224 my @args= @_;
b7078f1e 225 unshift @args, "-j$make_jobs" if defined $make_jobs;
215d9c65 226 if (WIN32) {
160daab8 227 chdir "Win32";
e6e4cae9
AC
228 system "$Config{make} @args> ..\\$MAKE_LOG 2>&1"
229 and die "Running make failed, see $MAKE_LOG";
160daab8
MM
230 chdir '..';
231 } else {
e6e4cae9
AC
232 system "$Config{make} @args> $MAKE_LOG 2>&1"
233 and die "Running make failed, see $MAKE_LOG";
160daab8
MM
234 };
235};
236
5b73aae5 237my ($module) = shift;
418f4069 238
24c7e242
AC
239my $info = $Modules{$module};
240if (!$info) {
469f7948
AC
241 # Maybe the user said "Test-Simple" instead of "Test::Simple", or
242 # "IO::Compress" instead of "IO-Compress". See if we can fix it up.
243 my $guess = $module;
244 s/-/::/g or s/::/-/g for $guess;
245 $info = $Modules{$guess} or die <<"EOF";
246Cannot find module $module.
247The available options are listed in the %Modules hash in Porting/Maintainers.pl
248EOF
24c7e242
AC
249 say "Guessing you meant $guess instead of $module";
250 $module = $guess;
251}
252
7035e4d3
AC
253if ($info->{CUSTOMIZED}) {
254 print <<"EOF";
255$module has a CUSTOMIZED entry in Porting/Maintainers.pl.
256
257This program's behaviour is to copy every CUSTOMIZED file into the version
258of the module being imported. But that might not be the right thing: in some
259cases, the new CPAN version will supersede whatever changes had previously
260been made in blead, so it would be better to import the new CPAN files.
261
262If you've checked that the CUSTOMIZED versions are still correct, you can
263proceed now. Otherwise, you should abort and investigate the situation. If
264the blead customizations are no longer needed, delete the CUSTOMIZED entry
265for $module in Porting/Maintainers.pl (and you'll also need to regenerate
266t/porting/customized.dat in that case; see t/porting/customized.t).
267
268EOF
269 print "Hit return to continue; ^C to abort "; <STDIN>;
270}
271
24c7e242 272my $cpan_mod = @ARGV ? shift : $module;
4d18e0a2 273
418f4069 274my $distribution = $$info {DISTRIBUTION};
b5bf278a
A
275
276my @files = glob $$info {FILES};
b7e2b692 277if (!-d $files [0] || grep { $_ eq $module } @problematic) {
b5bf278a
A
278 say "This looks like a setup $0 cannot handle (yet)";
279 unless ($force) {
280 say "Will not continue without a --force option";
281 exit 1;
282 }
283 say "--force is in effect, so we'll soldier on. Wish me luck!";
284}
285
84709797
FC
286use Cwd 'cwd';
287my $orig_pwd = cwd();
b5bf278a
A
288
289chdir "cpan";
290
83d3dd1d 291my $pkg_dir = $files[0];
418f4069
A
292 $pkg_dir =~ s!.*/!!;
293
87a7cbad 294my ($old_version) = $distribution =~ /-([0-9.]+(?:-TRIAL[0-9]*)?)\.tar\.gz/;
418f4069
A
295
296my $o_module = $module;
5b73aae5
A
297if ($cpan_mod =~ /-/ && $cpan_mod !~ /::/) {
298 $cpan_mod =~ s/-/::/g;
418f4069
A
299}
300
fea97686
FC
301sub wget {
302 my ($url, $saveas) = @_;
55d756db 303 my $ht_res;
fea97686 304 eval {
34c20093
JK
305 require IO::Socket::SSL;
306 require Net::SSLeay;
fea97686 307 require HTTP::Tiny;
55d756db
S
308 my $http = HTTP::Tiny->new();
309 $ht_res = $http->mirror( $url => $saveas );
310 1;
fea97686 311 } or
55d756db 312 # Try harder to download the file
fea97686
FC
313 # Some system do not have wget. Fall back to curl if we do not
314 # have it. On Windows, `which wget` is not going to work, so
315 # just use wget, as this script has always done.
316 WIN32 || -x substr(`which wget`, 0, -1)
317 ? system wget => $url, '-qO', $saveas
318 : system curl => $url, '-sSo', $saveas;
55d756db
S
319
320 # We were able to use HTTP::Tiny and it didn't have fatal errors,
321 # but we failed the request
322 if ( $ht_res && ! $ht_res->{'success'} ) {
323 die "Cannot retrieve file: $url\n" .
324 sprintf "Status: %s\nReason: %s\nContent: %s\n",
325 map $_ // '(unavailable)', @{$ht_res}{qw< status reason content >};
326 }
fea97686
FC
327}
328
418f4069
A
329#
330# Find the information from CPAN.
331#
4d18e0a2
A
332my $new_file;
333my $new_version;
d11e2991 334if (defined $tarball) {
84709797 335 $tarball = rel2abs( $tarball, $orig_pwd ) ;
861c6796
AC
336 die "Tarball $tarball does not exist\n" if !-e $tarball;
337 die "Tarball $tarball is not a plain file\n" if !-f _;
d11e2991
AC
338 $new_file = $tarball;
339 $new_version = $version // ($new_file =~ /-([0-9._]+(?:-TRIAL[0-9]*)?)\.tar\.gz/) [0];
08ee4cf2
AC
340 die "Blead and that tarball both have version $new_version of $module\n"
341 if $new_version eq $old_version;
d11e2991
AC
342}
343else {
4d18e0a2
A
344 #
345 # Poor man's cache
346 #
347 unless (-f $package_file && -M $package_file < 1) {
fea97686 348 wget $package_url, $package_file;
4d18e0a2
A
349 }
350
cefd15c2
MM
351 open my $fh, '<', $package_file;
352 (my $new_line) = grep {/^$cpan_mod/} <$fh> # Yes, this needs a lot of memory
4d18e0a2 353 or die "Cannot find $cpan_mod on CPAN\n";
4d18e0a2 354 (undef, $new_version, my $new_path) = split ' ', $new_line;
3a4316cc
JL
355 if (defined $version) {
356 $new_path =~ s/-$new_version\./-$version\./;
357 $new_version = $version;
358 }
4d18e0a2
A
359 $new_file = (split '/', $new_path) [-1];
360
08ee4cf2
AC
361 die "The latest version of $module is $new_version, but blead already has it\n"
362 if $new_version eq $old_version;
363
499e37eb 364 my $url = "https://cpan.metacpan.org/authors/id/$new_path";
4d18e0a2
A
365 say "Fetching $url";
366 #
367 # Fetch the new distro
368 #
fea97686 369 wget $url, $new_file;
4d18e0a2 370}
418f4069
A
371
372my $old_dir = "$pkg_dir-$old_version";
418f4069
A
373
374say "Cleaning out old directory";
375system git => 'clean', '-dfxq', $pkg_dir;
376
418f4069 377say "Unpacking $new_file";
5fb91d48 378Archive::Tar->extract_archive( $new_file );
418f4069 379
bd4de633 380(my $new_dir = basename($new_file)) =~ s/\.tar\.gz//;
3f7808eb 381# ensure 'make' will update all files
fc134225
MM
382my $t= time;
383for my $file (find_type_f($new_dir)) {
b6574671 384 make_writable($file); # for convenience if the user later edits it
fc134225
MM
385 utime($t,$t,$file);
386};
418f4069
A
387
388say "Renaming directories";
389rename $pkg_dir => $old_dir;
418f4069 390
83d3dd1d
JL
391say "Creating new package directory";
392mkdir $pkg_dir;
393
394say "Populating new package directory";
395my $map = $$info {MAP};
396my @EXCLUDED_QR;
397my %EXCLUDED_QQ;
398if ($$info {EXCLUDED}) {
399 foreach my $entry (@{$$info {EXCLUDED}}) {
400 if (ref $entry) {push @EXCLUDED_QR => $entry}
401 else {$EXCLUDED_QQ {$entry} = 1}
402 }
403}
404
fc134225 405FILE: for my $file ( find_type_f( $new_dir )) {
83d3dd1d
JL
406 my $old_file = $file;
407 $file =~ s{^$new_dir/}{};
408
409 next if $EXCLUDED_QQ{$file};
410 for my $qr (@EXCLUDED_QR) {
411 next FILE if $file =~ $qr;
412 }
413
414 if ( $map ) {
415 for my $key ( sort { length $b <=> length $a } keys %$map ) {
416 my $val = $map->{$key};
417 last if $file =~ s/^$key/$val/;
418 }
419 }
7bbb137d
JL
420 else {
421 $file = $files[0] . '/' . $file;
422 }
83d3dd1d
JL
423
424 if ( $file =~ m{^cpan/} ) {
425 $file =~ s{^cpan/}{};
426 }
427 else {
428 $file = '../' . $file;
429 }
430
431 my $prefix = '';
432 my @parts = split '/', $file;
433 pop @parts;
434 for my $part (@parts) {
435 $prefix .= '/' if $prefix;
436 $prefix .= $part;
437 mkdir $prefix unless -d $prefix;
438 }
439
440 rename $old_file => $file;
441}
192f56b0 442remove_tree( $new_dir );
418f4069
A
443
444if (-f "$old_dir/.gitignore") {
445 say "Restoring .gitignore";
446 system git => 'checkout', "$pkg_dir/.gitignore";
447}
448
fc134225 449my @new_files = find_type_f( $pkg_dir );
418f4069
A
450@new_files = grep {$_ ne $pkg_dir} @new_files;
451s!^[^/]+/!! for @new_files;
452my %new_files = map {$_ => 1} @new_files;
453
fc134225 454my @old_files = find_type_f( $old_dir );
418f4069
A
455@old_files = grep {$_ ne $old_dir} @old_files;
456s!^[^/]+/!! for @old_files;
457my %old_files = map {$_ => 1} @old_files;
458
418f4069
A
459my @delete;
460my @commit;
461my @gone;
418f4069
A
462FILE:
463foreach my $file (@new_files) {
464 next if -d "$pkg_dir/$file"; # Ignore directories.
465 next if $old_files {$file}; # It's already there.
466 if ($IGNORABLE {$file}) {
467 push @delete => $file;
468 next;
469 }
418f4069
A
470 push @commit => $file;
471}
472foreach my $file (@old_files) {
473 next if -d "$old_dir/$file";
474 next if $new_files {$file};
475 push @gone => $file;
476}
ad9b4e6f
A
477
478#
479# Find all files with an exec bit
480#
fc134225 481my @exec = find_type_f( $pkg_dir );
ad9b4e6f
A
482my @de_exec;
483foreach my $file (@exec) {
484 # Remove leading dir
485 $file =~ s!^[^/]+/!!;
486 if ($file =~ m!^t/!) {
487 push @de_exec => $file;
488 next;
489 }
490 # Check to see if the file exists; if it doesn't and doesn't have
491 # the exec bit, remove it.
492 if ($old_files {$file}) {
493 unless (-x "$old_dir/$file") {
494 push @de_exec => $file;
495 }
496 }
497}
418f4069
A
498
499#
500# No need to change the +x bit on files that will be deleted.
501#
ad9b4e6f 502if (@de_exec && @delete) {
a9f5d1d4 503 my %delete = map {+"$pkg_dir/$_" => 1} @delete;
ad9b4e6f 504 @de_exec = grep {!$delete {$_}} @de_exec;
418f4069
A
505}
506
e42bf9ad
AC
507#
508# Mustn't change the +x bit on files that are whitelisted
509#
510if (@de_exec) {
54ed4dc4 511 my %permitted = map { (my $x = $_) =~ tr/\n//d; $x => 1 } grep !/^#/,
e42bf9ad
AC
512 do { local @ARGV = '../Porting/exec-bit.txt'; <> };
513 @de_exec = grep !$permitted{"cpan/$pkg_dir/$_"}, @de_exec;
514}
515
418f4069
A
516say "unlink $pkg_dir/$_" for @delete;
517say "git add $pkg_dir/$_" for @commit;
518say "git rm -f $pkg_dir/$_" for @gone;
ad9b4e6f 519say "chmod a-x $pkg_dir/$_" for @de_exec;
418f4069
A
520
521print "Hit return to continue; ^C to abort "; <STDIN>;
522
523unlink "$pkg_dir/$_" for @delete;
524system git => 'add', "$pkg_dir/$_" for @commit;
525system git => 'rm', '-f', "$pkg_dir/$_" for @gone;
cd9a1714 526de_exec( "$pkg_dir/$_" ) for @de_exec;
418f4069 527
9c259538
A
528#
529# Restore anything that is customized.
530# We don't really care whether we've deleted the file - since we
531# do a git restore, it's going to be resurrected if necessary.
532#
533if ($$info {CUSTOMIZED}) {
534 say "Restoring customized files";
535 foreach my $file (@{$$info {CUSTOMIZED}}) {
536 system git => "checkout", "$pkg_dir/$file";
537 }
538}
539
a8121781 540chdir "..";
190c1b3b 541if (@commit || @gone) {
418f4069 542 say "Fixing MANIFEST";
190c1b3b
AC
543 my $MANIFEST = "MANIFEST";
544 my $MANIFEST_NEW = "$MANIFEST.new";
545
546 open my $orig, "<", $MANIFEST
547 or die "Failed to open $MANIFEST for reading: $!\n";
548 open my $new, ">", $MANIFEST_NEW
549 or die "Failed to open $MANIFEST_NEW for writing: $!\n";
550 my %gone = map +("cpan/$pkg_dir/$_" => 1), @gone;
551 while (my $line = <$orig>) {
552 my ($file) = $line =~ /^(\S+)/
553 or die "Can't parse MANIFEST line: $line";
554 print $new $line if !$gone{$file};
555 }
556
557 say $new "cpan/$pkg_dir/$_" for @commit;
558
559 close $new or die "Can't close $MANIFEST: $!\n";
560
561 system $^X => "Porting/manisort", '--quiet', "--output=$MANIFEST", $MANIFEST_NEW;
562 unlink $MANIFEST_NEW
563 or die "Can't delete temporary $MANIFEST_NEW: $!\n";
418f4069
A
564}
565
566
e6e4cae9 567print "Running a make and saving its output to $MAKE_LOG ... ";
160daab8
MM
568# Prepare for running (selected) tests
569make 'test-prep';
418f4069
A
570print "done\n";
571
d8a823f4
AC
572# The build system installs code from CPAN dists into the lib/ directory,
573# creating directories as needed. This means that the cleaning-related rules
574# in the Makefile need to know which directories to clean up. The Makefile
575# is generated by Configure from Makefile.SH, so *that* file needs the list
576# of directories. regen/lib_cleanup.pl is capable of automatically updating
577# the contents of Makefile.SH (and win32/Makefile, which needs similar but
578# not identical lists of directories), so we can just run that (using the
579# newly-built Perl, as is done with the regen programs run by "make regen").
580#
581# We do this if any files at all have been added or deleted, regardless of
582# whether those changes result in any directories being added or deleted,
583# because the alternative would be to replicate the regen/lib_cleanup.pl
584# logic here. That's fine, because regen/lib_cleanup.pl is idempotent if run
585# repeatedly.
586if (@commit || @gone) {
587 say "Running regen/lib_cleanup.pl to handle potential added/deleted dirs";
215d9c65 588 my $exe_dir = WIN32 ? ".\\" : './';
d8a823f4
AC
589 system "${exe_dir}perl$Config{_exe}", "-Ilib", "regen/lib_cleanup.pl"
590 and die "regen/lib_cleanup.pl failed\n";
591}
592
418f4069
A
593#
594# Must clean up, or else t/porting/FindExt.t will fail.
730ad6b9 595# Note that we can always retrieve the original directory with a git checkout.
418f4069
A
596#
597print "About to clean up; hit return or abort (^C) "; <STDIN>;
598
192f56b0
MM
599remove_tree( "cpan/$old_dir" );
600unlink "cpan/$new_file" unless $tarball;
418f4069 601
ad9b4e6f
A
602#
603# Run the tests. First the test belonging to the module, followed by the
a3815e44 604# tests in t/porting
ad9b4e6f 605#
192f56b0 606chdir "t";
ad9b4e6f 607say "Running module tests";
57b5d6e1 608my @test_files = grep { /\.t$/ } find_type_f( "../cpan/$pkg_dir" );
215d9c65 609my $exe_dir = WIN32 ? "..\\" : './';
60f5272c 610my $output = `${exe_dir}perl$Config{_exe} TEST @test_files`;
ad9b4e6f
A
611unless ($output =~ /All tests successful/) {
612 say $output;
613 exit 1;
614}
615
418f4069 616print "Running tests in t/porting ";
fc134225 617my @tests = glob 'porting/*.t';
418f4069
A
618chomp @tests;
619my @failed;
620foreach my $t (@tests) {
cefd15c2
MM
621 my @not = grep {!/# TODO/ }
622 grep { /^not/ }
623 `${exe_dir}perl -I../lib -I.. $t`;
418f4069
A
624 print @not ? '!' : '.';
625 push @failed => $t if @not;
626}
627print "\n";
628say "Failed tests: @failed" if @failed;
629
630
9807c17b
JL
631chdir '..';
632
633open my $Maintainers_pl, '<', 'Porting/Maintainers.pl';
634open my $new_Maintainers_pl, '>', 'Maintainers.pl';
635
636my $found;
637my $in_mod_section;
638while (<$Maintainers_pl>) {
639 if (!$found) {
640 if ($in_mod_section) {
641 if (/DISTRIBUTION/) {
33c6567b 642 if (s/\Q$old_version/$new_version/) {
9807c17b
JL
643 $found = 1;
644 }
645 }
646
92e8e650 647 if (/^ \}/) {
9807c17b
JL
648 $in_mod_section = 0;
649 }
650 }
651
ec1d1ba0 652 if (/\Q$module/) {
9807c17b
JL
653 $in_mod_section = 1;
654 }
655 }
656
657 print $new_Maintainers_pl $_;
658}
659
660if ($found) {
d9d83ea5 661 say "Successfully updated Maintainers.pl";
9807c17b
JL
662 unlink 'Porting/Maintainers.pl';
663 rename 'Maintainers.pl' => 'Porting/Maintainers.pl';
cd9a1714 664 chmod 0755 => 'Porting/Maintainers.pl';
9807c17b
JL
665}
666else {
667 say "Could not update Porting/Maintainers.pl.";
668 say "Make sure you update this by hand before committing.";
669}
418f4069 670
592f3827 671print <<"EOF";
418f4069 672
592f3827
AC
673=======================================================================
674
675$o_module is now at version $new_version
676Next, you should run a "make test".
677
678Hopefully that will complete successfully, but if not, you can make any
679changes you need to get the tests to pass. Don't forget that you'll need
680a "CUSTOMIZED" entry in Porting/Maintainers.pl if you change any of the
681files under cpan/$pkg_dir.
682
683Once all tests pass, you can "git add -u" and "git commit" the changes.
684
685EOF
418f4069
A
686
687__END__