use ExtUtils::MakeMaker; use strict ; use File::Find; require 5.00503 ; my @programs = qw( vcp ) ; my $ui_machines; my @prereqs; my $have_stateml = eval "require StateML"; my $have_stml_files = glob "ui_machines/*.stml"; ## ## Search ui_machines/ for StatML machines so we can build the rule ## for "make ui". The directory "ui_machines" does not ship with ## the distribution, so this rule will not apply to the distribution ## and users need not have StateML installed. ## my @missing_optional_prereqs; push @missing_optional_prereqs, "StateML module from CPAN" unless $have_stateml; push @missing_optional_prereqs, "ui_machines/*.stml files" unless $have_stml_files; unless ( @missing_optional_prereqs ) { my @ui_machines; find( sub { push @ui_machines, $File::Find::name if /\.stml\z/i; }, "ui_machines" ); @ui_machines = grep !/revml\.stml/, @ui_machines; warn <<WARNING; Ignoring revml UI machines to not clutter the UI and to avoid XML and StateML build prerequisites (XML is required for testing, however). WARNING @prereqs = ( StateML => 0 ); ## Sort by length to get the master machine first, then the others ## Sort by name just to get things in a repeatable order. $ui_machines = join " ", sort { length $a <=> length $b || $a cmp $b } @ui_machines; } if ( @missing_optional_prereqs ) { local $" = ""; my $missing_optional_prereqs = join "", map " - $_\n", @missing_optional_prereqs; warn <<WARNING; Missing optional items: $missing_optional_prereqs These are required only if you want to alter the UI. They are not present or needed for building or running VCP. WARNING } ## Identify help files so VCP::Help can be built if ( -e "lib/VCP/Help.pm" ) { ## This is mainly so that nmake lib/VCP/Help.pm will remake it. unlink "lib/VCP/Help.pm" or warn "$!:lib/VCP/Help.pm"; } my @help_files = qw( bin/vcp ); find( sub { return unless $File::Find::name =~ /source|dest|filter/i; return unless $File::Find::name =~ /\.(pm|pod)\z/i; return unless -f; push @help_files, $File::Find::name; }, "lib/VCP", ); ## Sort and Give .pod files precedence { my %seen; @help_files = reverse grep !$seen{ lc( (m{(.*)\.})[0] ) }++, ## Select first .pm or .pod seen reverse @help_files; ## .pod sorts after .pm, so reverse the sort } my $help_files = join " ", @help_files; # Build a hash of the makefile rules we'll need to build t/test-*.revml my @io_schemes = qw( revml cvs p4 svn vss ) ; #warn "ONLY BUILDING VSS!!!"; #@io_schemes = qw( vss ) ; my %io_scheme_revmls = ( ( # batch 0 map { my $fn = "t/test-$_-in-0.revml" ; ## Note the literal tabs here... ( $fn => <<TOHERE ) ; \$(PERL) "-I\$(INST_ARCHLIB)" "-I\$(INST_LIB)" "-I\$(PERL_ARCHLIB)" "-I\$(PERL_LIB)" \\ bin/gentrevml --$_ --batch 0 > $fn TOHERE } @io_schemes, ), ( # batch 1 (incremental) map { my $fn = "t/test-$_-in-1.revml" ; ## Note the literal tabs here... ( $fn => <<TOHERE ) ; \$(PERL) "-I\$(INST_ARCHLIB)" "-I\$(INST_LIB)" "-I\$(PERL_ARCHLIB)" "-I\$(PERL_LIB)" \\ bin/gentrevml --$_ --batch 1 > $fn TOHERE } @io_schemes ), ( # batch 1, --bootstrap map { my $fn = "t/test-$_-in-1-bootstrap.revml" ; ## Note the literal tabs here... ( $fn => <<TOHERE ) ; \$(PERL) "-I\$(INST_ARCHLIB)" "-I\$(INST_LIB)" "-I\$(PERL_ARCHLIB)" "-I\$(PERL_LIB)" \\ bin/gentrevml --$_ --batch 1 --bootstrap > $fn TOHERE } @io_schemes ), ( # batch 0, --no-big-files so some tests can run faster / be less verbose on failure map { my $fn = "t/test-$_-in-0-no-big-files.revml" ; ## Note the literal tabs here... ( $fn => <<TOHERE ) ; \$(PERL) "-I\$(INST_ARCHLIB)" "-I\$(INST_LIB)" "-I\$(PERL_ARCHLIB)" "-I\$(PERL_LIB)" \\ bin/gentrevml --$_ --batch 0 --no-big-files > $fn TOHERE } @io_schemes ), ) ; my $io_test_files = join( ' ', sort keys %io_scheme_revmls ) ; ## Create this so that libscan() will find it. open F, ">lib/VCP/Help.pm" or warn "$!:lib/VCP/Help.pm"; close F; WriteMakefile( 'NAME' => 'VCP', 'VERSION_FROM' => "lib/VCP.pm", 'EXE_FILES' => [ map "bin/$_", @programs ], 'PREREQ_PM' => { 'Digest::MD5' => 0, 'File::Temp' => 0, 'MIME::Base64' => 0, 'Regexp::Shellish' => 0.93, 'Text::Diff' => 0, 'XML::ValidWriter' => 0.38, 'XML::Parser' => 0, ## Below this line are for development only. Above are for VCP features. 'IPC::Run3' => 0, 'Pod::Links' => 0, # In PodToHtml-xxx.tar.gz 'Pod::Text' => 0, 'Pod::HTML_Elements' => 0, 'Pod::Select' => 0, 'Pod::Usage' => 0, 'HTML::Element' => 0, @prereqs, }, 'LIBS' => [''], # e.g., '-lm' 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' 'INC' => '', # e.g., '-I/usr/include/other' clean => { FILES => $io_test_files }, ); if ( -e "lib/VCP/Help.pm" ) { ## This so that nmake lib/VCP/Help.pm will remake it. unlink "lib/VCP/Help.pm" or warn "$!:lib/VCP/Help.pm"; } sub MY::libscan { package MY ; my $self = shift ; my ( $path ) = @_ ; return '' if $path =~ /.*\.log$/ ; return '' if $path =~ /\.(bak|sw[a-z])$/ ; return '' if $path =~ /~/ ; return $self->SUPER::libscan( $path ) ; } sub MY::postamble { package MY ; my $self = shift ; return join( "", "\npure_all :: $io_test_files\n", map( "\n$_ : bin/gentrevml\n$io_scheme_revmls{$_}", sort keys %io_scheme_revmls ), "\n\n", "clean_tmp :\n\trm -rf /tmp/vcp*\n\n", "test_all_p4_versions :\n\t./test_all_p4_versions.sh\n\n", defined $ui_machines ? ( "lib/VCP/UIMachines.pm : ui_machines/vcp_ui.tt2 $ui_machines\n", "\tstml --define package=VCP::UIMachines --template=ui_machines/vcp_ui.tt2 $ui_machines lib/VCP/UIMachines.pm\n", "\t\$(PERL) -Ilib -cw lib/VCP/UIMachines.pm\n", "\n", "ui-with-handlers.png : $ui_machines\n", "\tstml --show-handlers $ui_machines ui.png\n", "\n", "ui-with-handlers.ps : $ui_machines\n", "\tstml --show-handlers $ui_machines ui.ps\n", "\n", "ui.png : $ui_machines\n", "\tstml $ui_machines ui.png\n", "\n", "ui.ps : $ui_machines\n", "\tstml $ui_machines ui.ps\n", "\n", "ui : lib/VCP/UIMachines.pm\n\n", "ui_all : ui ui.png ui.ps\n\n", "pure_all :: ui\n\n", ) : (), "lib/VCP/Help.pm: bin/genhelp $help_files\n", "\t\$(PERL) bin/genhelp $help_files\n\n", "vcp_html/index.html: bin/genhtml $help_files\n", "\t\$(PERL) bin/genhtml $help_files\n\n", "\npure_all :: lib/VCP/Help.pm\n", ) ; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#62 | 5404 | barrie_slaymaker |
- SVN support added - Makefile gives clearer notices about missing optional prereqs. - VCP::Filter::labelmap and VCP::Filter::map: <<skip>> replaces deprecated <<delete>> to be clearer that no revisions are deleted from either repository but some just are skipped and not inserted. - VCP::Filter::map: support added for SVN-like branch labels - VCP::Source: support added for ISO8601 timestamps emitted by SVN. |
||
#61 | 5077 | barrie_slaymaker | - Updates to build system from Autrijus | ||
#60 | 4232 | barrie_slaymaker | - bin/vcp now prints a version info banner | ||
#59 | 4164 | barrie_slaymaker | - dist/vcp-rh8 checked in | ||
#58 | 4154 | barrie_slaymaker | - dist/vcp.exe passes almost all tests | ||
#57 | 4145 | barrie_slaymaker | - Minor cleanup | ||
#56 | 4143 | barrie_slaymaker | - Further adaptation to vcp.exe packaging format | ||
#55 | 4141 | barrie_slaymaker | - Adapt online help and html generation to vcp.exe environment | ||
#54 | 4064 | barrie_slaymaker |
- RevML is no longer offered in the UI - Sources and dests are given an id in the UI - The .vcp file name defaulting now works |
||
#53 | 4012 | barrie_slaymaker | - Remove dependance on pseudohashes (deprecated Perl feature) | ||
#52 | 3974 | barrie_slaymaker | - IPC::Run no longer required | ||
#51 | 3970 | barrie_slaymaker |
- VCP::Source handles rev queing, uses disk to reduce RAM - Lots of other fixes |
||
#50 | 3858 | barrie_slaymaker | - Final tweaks for 0.5 release | ||
#49 | 3671 | barrie_slaymaker |
- Add user interface flow diagrams - User interface flow diagrams now generated without handlers by default, make ui-with-handlers.{png,ps} to see the handlers. |
||
#48 | 3640 | barrie_slaymaker |
- xmllint no longer require to build UI - UI now offers multiple choices where appropriate |
||
#47 | 3496 | barrie_slaymaker | - VSS branching | ||
#46 | 3388 | john_fetkovich | added ui_all | ||
#45 | 3381 | john_fetkovich | fixed MY::libscan to skip .log files | ||
#44 | 3371 | barrie_slaymaker |
Don't build ui.ps, ui.png by default so user with StateML but not GraphViz can still build. |
||
#43 | 3367 | barrie_slaymaker | Detect missing StateML.pm and be happy. | ||
#42 | 3262 | john_fetkovich | add xmllint step on .stml files | ||
#41 | 3250 | john_fetkovich | Added .ps output in addition to .png output to ui state machines | ||
#40 | 3241 | barrie_slaymaker |
Put the stml files in a correct order (VCP.stml first) and a predictable order (the rest sorted by length, name). |
||
#39 | 3227 | barrie_slaymaker | Make it easy to make ui.png | ||
#38 | 3226 | barrie_slaymaker | Syntax check lib/VCP/UIMachines.pm when built | ||
#37 | 3224 | barrie_slaymaker | ui_machines/ scanning and make ui rules | ||
#36 | 3062 | john_fetkovich | Added capability to test all p4 versions | ||
#35 | 2696 | barrie_slaymaker | add a PREREQ_PM on IPC::Run3 | ||
#34 | 2638 | barrie_slaymaker | Require fixed IPC::Run, remove workaround for buggy IPC::Run | ||
#33 | 2314 | barrie_slaymaker | Build, use -no-big-files.revml for test speedups | ||
#32 | 2004 | barrie_slaymaker |
Add clean_tmp target to clean up after debugging with VCPNODELETE=1 |
||
#31 | 1858 | barrie_slaymaker | Bump VERSION | ||
#30 | 1757 | barrie_slaymaker | Bump version number, get vss .revml files to be generated | ||
#29 | 1739 | barrie_slaymaker | Bump version number | ||
#28 | 1728 | barrie_slaymaker | CVS on win32, minor bugfixes | ||
#27 | 1359 | barrie_slaymaker | Revamp the help system, clean up and add POD | ||
#26 | 1176 | barrie_slaymaker | Bump version off of 0.26. | ||
#25 | 1175 | barrie_slaymaker | Implement VCP::Patch, roll 0.26 release. | ||
#24 | 1171 | barrie_slaymaker | Switch to using Text::Diff | ||
#23 | 1069 | barrie_slaymaker | bump to 0.25, hide spurious test output | ||
#22 | 721 | barrie_slaymaker | Add File::Temp to PREREQ_PM, older perls don't come with it. | ||
#21 | 720 | barrie_slaymaker | Fix handling of $r->comment in VCP::Dest::cvs | ||
#20 | 719 | barrie_slaymaker | vcp 0.221 | ||
#19 | 703 | barrie_slaymaker | VCP::Source::p4 now uses VCP::Utils::p4::parse_p4_repo_spec() | ||
#18 | 694 | barrie_slaymaker | cleanup up warning about undef var in VCP::Utils::p4. | ||
#17 | 692 | barrie_slaymaker |
Add VCP::Utils::p4 and use it to get VCP::Dest::p4 to create it's own client view as needed. |
||
#16 | 674 | barrie_slaymaker |
Fix paths passed to p4 labelsync in VCP::Des::P4, reported by david d zuhn <zoo@bravara.com> |
||
#15 | 669 | barrie_slaymaker |
0.1 Wed Jul 4 00:27:35 EDT 2001 Fix VCP::Dest::p4 to take the filespec from the p4:<dest> spec and use it as the rev_root. No --rev-root option at this time, not sure if it's needed. Reported by david d zuhn <zoo@bravara.com>. |
||
#14 | 630 | barrie_slaymaker |
Fix bug in CVS log file parsing that made it think it was always seeing the same file, different revisions over and over again. Reported by Matthew Attaway. |
||
#13 | 627 | barrie_slaymaker | Beef up CVS log file parsing. | ||
#12 | 619 | barrie_slaymaker |
Avoid using p4 print -s, it puts linebreaks in every 4098 characters or so. |
||
#11 | 612 | barrie_slaymaker | Bump rev to 0.07 | ||
#10 | 608 | barrie_slaymaker |
Lots of changes to get vcp to install better, now up to 0.066. Many thanks to Matthew Attaway for testing & suggestions. |
||
#9 | 484 | barrie_slaymaker | |||
#8 | 483 | barrie_slaymaker | Makefile.PL now requires at least XML::AutoWriter v0.36 | ||
#7 | 480 | barrie_slaymaker |
0.06 Wed Dec 20 23:19:15 EST 2000 - bin/vcp: Added --versions, which loads all modules and checks them for a $VERSION and print the results out. This should help with diagnosing out-of-sync modules. - Added $VERSION vars to a few modules :-). Forgot to increment any $VERSION strings. - VCP::Dest::cvs: The directory "deeply" was not being `cvs add`ed on paths like "a/deeply/nested/file", assuming "deeply" had no files in it. - VCP::Dest::revml: fixed a bug that was causing files with a lot of linefeeds to be emitted in base64 instead of deltaed. This means most text files. - Various minor cleanups of diagnostics and error messages, including exposing "Can't locate Foo.pm" when a VCP::Source or VCP::Dest module depends on a module that's not installed, as reported by Jeff Anton. |
||
#6 | 479 | barrie_slaymaker | Needed to actually release 0.05 as 0.05! | ||
#5 | 478 | barrie_slaymaker |
0.05 Mon Dec 18 07:27:53 EST 2000 - Use `p4 labels //...@label` command as per Rober Cowham's suggestion, with the '-s' flag recommended by Christopher Siewald and Amaury.FORGEOTDARC@atsm.fr. Though it's actually something like vcp: running /usr/bin/p4 -u safari -c safari -p localhost:5666 -s files //.../NtLkly //...@compiler_a3 //.../NtLkly //...@compiler_may3 and so //on //for 50 parameters to get the speed up. I use the //.../NtLkly "file" as //a separator between the lists of files in various //revisions. Hope nobody has any files named that :-). What I should do is choose a random label that doesn't occur in the labels list, I guess. - VCP::Source::revml and VCP::Dest::revml are now binary, control code, and "hibit ASCII" (I know, that's an oxymoron) clean. The <comment>, <delta>, and <content> elements now escape anything other than tab, line feed, space, or printable chars (32 <= c <= ASCII 126) using a tag like '<char code="0x09">'. The test suite tests all this. Filenames should also be escaped this way, but I didn't get to that. - The decision whether to do deltas or encode the content in base64 is now based on how many characters would need to be escaped. - We now depend on the users' diff program to have a "-a" option to force it to diff even if the files look binary to it. I need to use Diff.pm and adapt it for use on binary data. - VCP::Dest::cvs now makes sure that no two consecutive revisions of the same file have the same mod_time. VCP::Source::p4 got so fast at pulling revisions from the repositories the test suite sets up that CVS was not noticing that files had changed. - VCP::Plugin now allows you to set a list of acceptable result codes, since we now use p4 in ways that make it return non-zero result codes. - VCP::Revs now croaks if you try to add two entries of the same VCP::Rev (ie matching filename and rev_id). - The <type> tag is now limited to "text" or "binary", and is meant to pass that level of info between foreign repositories. - The <p4_info> on each file now carries the one line p4 description of the file so that p4->p4 transferes can pick out the more detailed info. VCP::Source::p4, VCP::Dest::p4 do this. - VCP::{Source,Dest}::{p4,cvs} now set binaryness on added files properly, I think. For p4->p4, the native p4 type is preserved. For CVS sources, seeing the keyword substitution flag 'o' or 'b' implies binaryness, for p4, seeing a filetype like qr/u?x?binary/ or qr/x?tempobj/ or "resource" implies binaryness (to non-p4 destinations). NOTE: Seeing a 'o' or 'b' in a CVS source only ends up setting the 'b' option on the destination. That should be ok for most uses, but we can make it smarter for cvs->cvs transfers if need be. |
||
#4 | 473 | barrie_slaymaker |
0.04 Tue Dec 12 00:15:57 EST 2000 - Reorg of VCP::Source::p4 - One large filelog command is run instead of many small ones. This takes advantage of the -m option to make sure enough changes are listed. Many extra revisions of most files are probably listed, but listing and ignoring them is quicker than spawning p4 over and over. Wish p4 filelog had a revision range... - it now doesn't suck the entire filelog output in to memory, it parses it line by line as it's emitted from the `p4 filelog` - `p4 print` is now used to print a bunch of files at once, using the header line to separate one file from the next, kind of like splitting a mime-encoded message. There's a very slight chance that it will misjudge the boundary between two files if a file happens to have a line that looks very much like the header line for the next file. This is pretty unlikely and I'll fix it if it crops up. I could batch them more, right now it never puts two revisions of the same filename in the same batch, for no really good reason. Another method might be to batch 25 or 50 revs each time. - it turns out there's a problem spawning multiple p4 commands at the same time against the same p4d (p4d is 99.2, FWIW). Or at least running large `p4 files ...` while there's a large `p4 filelog` still also running. - filelog lines beginning with "... ..." are now ignored. These are notifications of copy, branch, and integrate events that we don't yet do anything with. - deleted cur() and P4_CUR - deleted P4_IS_INCREMENTAL - Made an assertion in VCP::Dest::revml::handle_rev() a little clearer - Added some ok(1) calls to 90p4.t to make it easier to figure out which child process is whining or aborting - Made the message that's printed when a subcommand emits unexpected output say "stderr" instead of "stdout". - Cleaned up documentation for VC::Plugin::work_path(). |
||
#3 | 470 | barrie_slaymaker |
- Cleaned up VCP::Source::p4 a bit. It doesn't whine as much now when it sees what it considers to be old news in the log file. - Added an easy way to monitor the commands being issued to a repository: simply add "::cmd" to the debug spec for that source: vcp -d Source::cvs::cvs vcp -d Dest::p4::p4 - The next step is to use the -m option to p4 filelog to speed things up. |
||
#2 | 468 | barrie_slaymaker |
- VCP::Dest::p4 now does change number aggregation based on the comment field changing or whenever a new revision of a file with unsubmitted changes shows up on the input stream. Since revisions of files are normally sorted in time order, this should work in a number of cases. I'm sure we'll need to generalize it, perhaps with a time thresholding function. - t/90cvs.t now tests cvs->p4 replication. - VCP::Dest::p4 now doesn't try to `p4 submit` when no changes are pending. - VCP::Rev now prevents the same label from being applied twice to a revision. This was occuring because the "r_1"-style label that gets added to a target revision by VCP::Dest::p4 could duplicate a label "r_1" that happened to already be on a revision. - Added t/00rev.t, the beginnings of a test suite for VCP::Rev. - Tweaked bin/gentrevml to comment revisions with their change number instead of using a unique comment for every revision for non-p4 t/test-*-in-0.revml files. This was necessary to test cvs->p4 functionality. |
||
#1 | 467 | barrie_slaymaker | Version 0.01, initial checkin in perforce public depot. |