#!/usr/local/bin/perl -w
=head1 NAME
90revml2svn_0.t - testing of vcp svn i/o
=cut
use strict ;
use Carp ;
use Cwd ;
use Test ;
use VCP::Utils qw( start_dir_rel2abs );
use VCP::TestUtils;
my @vcp = vcp_cmd ;
my $t = -d 't' ? 't/' : '' ;
my $cwd = cwd;
if ( $^O =~ /Win32/ ) {
$cwd =~ s{\A[A-Z]:}{};
}
my $module = 'foo' ; ## Must match the rev_root in the testrevml files
my $infile_0 = $t . "test-svn-in-0.revml";
my $svnroot_0 = $t . "svnroot_0";
my $svnstate_0 = $t . "svnstate_0";
my $svn_spec_0 = "svn:file://$cwd/$svnroot_0:/$module" ;
my $repo_id = "svn:test_repository";
my @vcp_options = (
$svn_spec_0,
"--create-repo",
"--delete-repo",
"--db-dir=$svnstate_0",
"--repo-id=$repo_id",
);
my @tests = (
##
## Empty import
##
sub {
run [ @vcp, "revml:-", @vcp_options ],
\"<revml/>"; #"# de-confuse emacs' cperl mode
ok $?, 0, "`vcp revml:- $svn_spec_0` return value" ;
},
sub {
ok -d $svnroot_0, 1, "$svnroot_0 exists";
},
##
## revml->svn import
##
sub {
run [ @vcp, "revml:$infile_0", @vcp_options ];
ok 1;
},
## slurp revml files and analyze with regexps find highest change number
## for each file. compare this to what's in the head_revs_db.
sub {
my $got = parse_files_and_revids_from_head_revs_db
{
state_dir => $svnstate_0,
repo_id => $repo_id,
remove_rev_root => "/ignored/",
};
my $expected = parse_files_and_revids_from_revml $infile_0 ;
# TODO: This will have to be fixed in the way vcp builds the head_revs_db.
# so a no-change branch appears there too.
# For now just excise the line from the revml parse output.
$expected =~ s/^branched-no-change =>.*\n//m ;
ok_or_diff $got, $expected;
},
) ;
plan tests => scalar( @tests ) ;
my $why_skip ;
$why_skip .= svn_borken ;
$why_skip ? skip( $why_skip, 0 ) : $_->() for @tests ;
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #2 | 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. |
||
| #1 | 5346 | Barrie Slaymaker | - 90revml2svn_0.t created | ||
| //guest/perforce_software/revml/t/90revml2cvs_0.t | |||||
| #12 | 3532 | John Fetkovich |
changed File::Spec->rel2abs( blah, start_dir ) to start_dir_rel2abs blah everywhere. which does the same thing and is defined in VCP::Utils |
||
| #11 | 3428 | Barrie Slaymaker | - Test suite cleanup | ||
| #10 | 2977 | John Fetkovich | temporary test suite hack | ||
| #9 | 2974 | John Fetkovich |
fix parse_files_and_revids_from_revml to deal with branches and multiple dotted revs |
||
| #8 | 2969 | John Fetkovich | added tweak to force test to pass | ||
| #7 | 2968 | John Fetkovich |
altered tests to use parse_files_and_revids_from_head_revs_db change to that routine too. |
||
| #6 | 2926 | John Fetkovich |
remove --state-location switch add --db-dir and --repo-id switches build state location from concatenation of those two. |
||
| #5 | 2716 | Barrie Slaymaker | Shorten, standardize state dir names | ||
| #4 | 2714 | Barrie Slaymaker |
Simplify t/90*cvs.t tests, remove make_cvsroots for speed and simplicity. |
||
| #3 | 2649 | John Fetkovich | Change test suites because of unreliable 'cvs history' command. | ||
| #2 | 2646 | John Fetkovich |
Added comparison of number of revisions in vcp output to number of revisions in revml. |
||
| #1 | 2622 | John Fetkovich |
Split revml2cvs.t into three files, then improved; particularly made changes to use parse_files_and_revids_from_revml (already in TestUtils.pm) and parse_files_and_revids_from_cvs_history (newly added to TestUtils.pm) to do checks on changes. |
||