90revml2svn_1.t #2

  • //
  • guest/
  • perforce_software/
  • revml/
  • t/
  • 90revml2svn_1.t
  • View
  • Commits
  • Open Download .zip Download (1 KB)
#!/usr/local/bin/perl -w

=head1 NAME

revml2svn.t - testing of vcp svn i/o

=cut

use strict ;

use Carp ;
use Cwd ;
use File::Path qw( rmtree );
use Test ;
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 $infile_1 = $t . "test-svn-in-1.revml";

my $svnroot_1  = "${t}svnroot_1";
my $svnstate_1 = "${t}svnstate_1";

my $svn_spec_1 = "svn:file://$cwd/$svnroot_1:/$module" ;

my @tests = (

sub {
   my $svnroot_0  = "${t}svnroot_0";
   my $svnstate_0 = "${t}svnstate_0";
   rmtree [ grep -e, $svnroot_1, $svnstate_1 ];
   copy_dir_tree $svnroot_0, $svnroot_1;
   copy_dir_tree $svnstate_0, $svnstate_1;
   my $out;
   run [ @vcp, "revml:$infile_1", $svn_spec_1,
      "--db-dir=$svnstate_1", "--repo-id=svn:test_repository" ], \undef, \$out;

   ok 1;
},

) ;

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 5351 Barrie Slaymaker - Added second svn test
//guest/perforce_software/revml/t/90revml2cvs_1.t
#7 3428 Barrie Slaymaker - Test suite cleanup
#6 2926 John Fetkovich remove --state-location switch
       add --db-dir and --repo-id switches
       build state location from concatenation of those two.
#5 2902 Barrie Slaymaker Minor reduction to a single test sub.
#4 2716 Barrie Slaymaker Shorten, standardize state dir names
#3 2714 Barrie Slaymaker Simplify t/90*cvs.t tests, remove make_cvsroots for speed and
       simplicity.
#2 2649 John Fetkovich Change test suites because of unreliable 'cvs history' command.
#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.