Author: jkeenan Date: Thu Mar 27 07:49:58 2008 New Revision: 26580 Removed: branches/norevision/lib/Parrot/Revision/ branches/norevision/t/postconfigure/03-revision.t branches/norevision/t/postconfigure/04-revision.t branches/norevision/t/tools/revision/01-get_revision_numbers.t branches/norevision/t/tools/revision/02-print_src.t branches/norevision/tools/build/revision_c.pl Modified: branches/norevision/MANIFEST branches/norevision/compilers/imcc/main.c branches/norevision/config/gen/config_h/config_h.in branches/norevision/config/gen/makefiles/root.in branches/norevision/lib/Parrot/Revision.pm branches/norevision/t/configure/018-revision_to_cache.t
Log: Further work on http://rt.perl.org/rt3/Ticket/Display.html?id=52154. Eliminate repository-revision-number related code post-configuration. Check revision number only if SVN is available. Modified: branches/norevision/MANIFEST ============================================================================== --- branches/norevision/MANIFEST (original) +++ branches/norevision/MANIFEST Thu Mar 27 07:49:58 2008 @@ -1,7 +1,7 @@ # ex: set ro: # $Id$ # -# generated by tools/dev/mk_manifest_and_skip.pl Thu Mar 27 02:11:05 2008 UT +# generated by tools/dev/mk_manifest_and_skip.pl Thu Mar 27 14:42:24 2008 UT # # See tools/dev/install_files.pl for documentation on the # format of this file. @@ -2523,7 +2523,6 @@ lib/Parrot/Pmc2c/UtilFunctions.pm [devel] lib/Parrot/Pmc2c/VTable.pm [devel] lib/Parrot/Revision.pm [devel] -lib/Parrot/Revision/Utils.pm [devel] lib/Parrot/Test.pm [devel] lib/Parrot/Test/APL.pm [devel] lib/Parrot/Test/Cardinal.pm [devel] @@ -3338,8 +3337,6 @@ t/pmc/vtablecache.t [] t/postconfigure/01-options.t [] t/postconfigure/02-data_slurp.t [] -t/postconfigure/03-revision.t [] -t/postconfigure/04-revision.t [] t/postconfigure/05-trace.t [] t/postconfigure/06-data_slurp_temp.t [] t/run/README [] @@ -3598,8 +3595,6 @@ t/tools/pmc2cutils/07-open_file.t [] t/tools/pmc2cutils/08-pmc-pm.t [] t/tools/pmc2cutils/README [] -t/tools/revision/01-get_revision_numbers.t [] -t/tools/revision/02-print_src.t [] t/tools/smartlinks.t [] tools/build/addopstags.pl [] tools/build/c2str.pl [] @@ -3615,7 +3610,6 @@ tools/build/pbc2c.pl [devel] tools/build/pbcversion_h.pl [] tools/build/pmc2c.pl [] -tools/build/revision_c.pl [devel] tools/build/vtable_extend.pl [] tools/build/vtable_h.pl [] tools/dev/.gdbinit [devel] Modified: branches/norevision/compilers/imcc/main.c ============================================================================== --- branches/norevision/compilers/imcc/main.c (original) +++ branches/norevision/compilers/imcc/main.c Thu Mar 27 07:49:58 2008 @@ -225,9 +225,7 @@ =item C<static void Parrot_version> -Print out parrot version number and copyright message. Include warning if -configuration and build were done at different revision numbers (applies only -when working from repository -- not from release versions). +Print out parrot version number. =cut @@ -236,19 +234,8 @@ static void Parrot_version(PARROT_INTERP) { - int rev; printf("This is parrot version " PARROT_VERSION); - rev = Parrot_revision(); - if (rev != 0) - printf(" (r%d)", PARROT_REVISION); printf(" built for " PARROT_ARCHNAME ".\n"); - if (rev != 0 && PARROT_REVISION != rev) { - printf("Warning: runtime has revision %d!\n", rev); - } - rev = Parrot_config_revision(); - if (rev != 0 && PARROT_REVISION != rev) { - printf("Warning: used Configure.pl revision %d!\n", rev); - } printf("Copyright (C) 2001-2008, The Perl Foundation.\n\ \n\ This code is distributed under the terms of the Artistic License 2.0.\ Modified: branches/norevision/config/gen/config_h/config_h.in ============================================================================== --- branches/norevision/config/gen/config_h/config_h.in (original) +++ branches/norevision/config/gen/config_h/config_h.in Thu Mar 27 07:49:58 2008 @@ -16,7 +16,6 @@ */ #define PARROT_VERSION "@VERSION@@DEVEL@" -#define PARROT_REVISION @revision@ #define PARROT_CONFIG_DATE "@configdate@" #define PARROT_MAJOR_VERSION @MAJOR@ #define PARROT_MINOR_VERSION @MINOR@ Modified: branches/norevision/config/gen/makefiles/root.in ============================================================================== --- branches/norevision/config/gen/makefiles/root.in (original) +++ branches/norevision/config/gen/makefiles/root.in Thu Mar 27 07:49:58 2008 @@ -70,10 +70,6 @@ # source directory SRC_DIR = src -# revision control -#CONDITIONED_LINE(SVN_ENTRIES):[EMAIL PROTECTED]@ -#INVERSE_CONDITIONED_LINE(SVN_ENTRIES):SVN_ENTRIES= - ############################################################################### # # BUILD TOOL CONFIGURATIONS: @@ -201,7 +197,6 @@ lib/Parrot/PMC.pm \ runtime/parrot/include/config.fpmc \ $(SRC_DIR)/platform.c \ - $(SRC_DIR)/revision.c \ #CONDITIONED_LINE(platform_asm): $(SRC_DIR)/platform_asm.s \ $(SRC_DIR)/core_pmcs.c \ CFLAGS \ @@ -446,7 +441,6 @@ $(SRC_DIR)/platform$(O) \ $(SRC_DIR)/pmc_freeze$(O) \ $(SRC_DIR)/pmc$(O) \ - $(SRC_DIR)/revision$(O) \ $(SRC_DIR)/runops_cores$(O) \ $(SRC_DIR)/scheduler$(O) \ $(SRC_DIR)/spf_render$(O) \ @@ -973,9 +967,6 @@ lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(OPS_DIR)/ops.num $(OPS_DIR)/ops.skip $(PERL) $(BUILD_TOOLS_DIR)/ops2pm.pl $(OPS_FILES) -$(SRC_DIR)/revision.c : $(SVN_ENTRIES) $(BUILD_TOOLS_DIR)/revision_c.pl - $(PERL) -Ilib $(BUILD_TOOLS_DIR)/revision_c.pl > $(SRC_DIR)/revision.c - ############################################################################### # # Examples (Assembly): Modified: branches/norevision/lib/Parrot/Revision.pm ============================================================================== --- branches/norevision/lib/Parrot/Revision.pm (original) +++ branches/norevision/lib/Parrot/Revision.pm Thu Mar 27 07:49:58 2008 @@ -29,7 +29,7 @@ sub _get_revision { my $revision; - if (-f $cache and ! -f 'Makefile') { + if (-f $cache) { eval { open my $FH, "<", $cache; chomp($revision = <$FH>); @@ -40,7 +40,7 @@ $revision = _analyze_sandbox(); - if (! -f $cache and ! -f 'Makefile') { + if (! -f $cache) { eval { open my $FH, ">", $cache; print $FH "$revision\n"; @@ -59,29 +59,29 @@ ($revision) = $line =~ /(\d+)/; } } - elsif ( -d '.git' && (my @git_info = qx/git log -1 --grep=^git-svn-id: 2>$nul/ and $? == 0) ) { - ($revision) = - $git_info[-1] =~ m[git-svn-id: https://svn.perl.org/parrot/trunk@(\d+) ]; - } - elsif ( my @svk_info = qx/svk info 2>$nul/ and $? == 0 ) { - if ( my ($line) = grep /(?:file|svn|https?)\b/, @svk_info ) { - ($revision) = $line =~ / (\d+)$/; - } - elsif ( my ($source_line) = grep /^(Copied|Merged) From/, @svk_info ) { - if ( my ($source_depot) = $source_line =~ /From: (.*?), Rev\. \d+/ ) { - - # convert /svk/trunk to //svk/trunk or /depot/svk/trunk - my ($depot_root) = map { m{Depot Path: (/[^/]*)} } @svk_info; - $depot_root ||= q{/}; - $source_depot = $depot_root . $source_depot; - if ( my @svk_info = qx/svk info $source_depot/ and $? == 0 ) { - if ( my ($line) = grep /(?:file|svn|https?)\b/, @svk_info ) { - ($revision) = $line =~ / (\d+)$/; - } - } - } - } - } +# elsif ( -d '.git' && (my @git_info = qx/git log -1 --grep=^git-svn-id: 2>$nul/ and $? == 0) ) { +# ($revision) = +# $git_info[-1] =~ m[git-svn-id: https://svn.perl.org/parrot/trunk@(\d+) ]; +# } +# elsif ( my @svk_info = qx/svk info 2>$nul/ and $? == 0 ) { +# if ( my ($line) = grep /(?:file|svn|https?)\b/, @svk_info ) { +# ($revision) = $line =~ / (\d+)$/; +# } +# elsif ( my ($source_line) = grep /^(Copied|Merged) From/, @svk_info ) { +# if ( my ($source_depot) = $source_line =~ /From: (.*?), Rev\. \d+/ ) { +# +# # convert /svk/trunk to //svk/trunk or /depot/svk/trunk +# my ($depot_root) = map { m{Depot Path: (/[^/]*)} } @svk_info; +# $depot_root ||= q{/}; +# $source_depot = $depot_root . $source_depot; +# if ( my @svk_info = qx/svk info $source_depot/ and $? == 0 ) { +# if ( my ($line) = grep /(?:file|svn|https?)\b/, @svk_info ) { +# ($revision) = $line =~ / (\d+)$/; +# } +# } +# } +# } +# } return $revision; } Modified: branches/norevision/t/configure/018-revision_to_cache.t ============================================================================== --- branches/norevision/t/configure/018-revision_to_cache.t (original) +++ branches/norevision/t/configure/018-revision_to_cache.t Thu Mar 27 07:49:58 2008 @@ -31,7 +31,7 @@ require Parrot::Revision; no warnings 'once'; like($Parrot::Revision::current, qr/^\d+$/, - "Got numeric value for reversion number"); + "Got numeric value for revision number"); use warnings; my $cache = q{.parrot_current_rev}; ok( ( -e $cache ), "Cache for revision number was created");
