Subversion Repositories DevTools

Rev

Rev 1270 | Rev 1348 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1270 Rev 1347
Line 424... Line 424...
424
                "verbose:+"     => \$opt_verbose,
424
                "verbose:+"     => \$opt_verbose,
425
                "import=s"      => \$opt_import,
425
                "import=s"      => \$opt_import,
426
                "new"           => \$opt_new,
426
                "new"           => \$opt_new,
427
                "branch=s"      => \$opt_branch,
427
                "branch=s"      => \$opt_branch,
428
                "trunk"         => \$opt_trunk,
428
                "trunk"         => \$opt_trunk,
429
                "tag=s"         => \$opt_tag,
429
                "tags=s"        => \$opt_tag,
430
                "label=s"       => \$opt_label,
430
                "label=s"       => \$opt_label,
431
                "replace"       => \$opt_replace,
431
                "replace"       => \$opt_replace,
432
                'author=s'      => \$opt_author,
432
                'author=s'      => \$opt_author,
433
                'date=s'        => \$opt_date,
433
                'date=s'        => \$opt_date,
434
 
434
 
Line 455... Line 455...
455
    Error ("Nothing imported to be labeled") if ( $count && !$opt_import );
455
    Error ("Nothing imported to be labeled") if ( $count && !$opt_import );
456
    Error ("Import path does not exist: $opt_import") if ( $opt_import && ! -d $opt_import );
456
    Error ("Import path does not exist: $opt_import") if ( $opt_import && ! -d $opt_import );
457
    Error ("Conflicting options: new and replace") if ( $opt_new && $opt_replace );
457
    Error ("Conflicting options: new and replace") if ( $opt_new && $opt_replace );
458
    Error ("Too many command line arguments") if ( exists $ARGV[1] );
458
    Error ("Too many command line arguments") if ( exists $ARGV[1] );
459
 
459
 
460
    ($type, $opt_label) = ('tags', $opt_tag)            if ( $opt_tag);
460
    $type = 'tags/' . $opt_tag          if ( $opt_tag);
461
    ($type, $opt_label) = ('branches', $opt_branch)     if ( $opt_branch );
461
    $type = 'branches/' . $opt_branch   if ( $opt_branch );
462
    ($type, $opt_label) = ('trunk', $opt_label)         if ( $opt_trunk);
462
    $type = 'trunk'                     if ( $opt_trunk);
463
 
463
 
464
    #
464
    #
465
    #   Do all the hard work
465
    #   Do all the hard work
466
    #       Create
466
    #       Create
467
    #       Import
467
    #       Import
Line 477... Line 477...
477
                      );
477
                      );
478
    #
478
    #
479
    # Report RmPath as using a pegged version of a new package is a bit silly
479
    # Report RmPath as using a pegged version of a new package is a bit silly
480
    #
480
    #
481
    Message ("Repository Ref: " . $uref->RmPath);
481
    Message ("Repository Ref: " . $uref->RmPath);
-
 
482
    Message ("Vcs Tag       : " . $uref->SvnTag);
482
    if ( $uref->{REVNO} )
483
    if ( $uref->{REVNO} )
483
    {
484
    {
484
        $uref->setRepoProperty('svn:author', $opt_author) if (defined ($opt_author));
485
        $uref->setRepoProperty('svn:author', $opt_author) if (defined ($opt_author));
485
        $uref->setRepoProperty('svn:date', $opt_date) if (defined ($opt_date));
486
        $uref->setRepoProperty('svn:date', $opt_date) if (defined ($opt_date));
486
    }
487
    }
Line 859... Line 860...
859
                       'noswitch' => 1,
860
                       'noswitch' => 1,
860
                       'replace' => $opt_replace,
861
                       'replace' => $opt_replace,
861
                       'comment' => "$pkgPath: Tagged by Jats Svn Import",
862
                       'comment' => "$pkgPath: Tagged by Jats Svn Import",
862
                       );
863
                       );
863
        Message ("Repository Ref: " . $svn->RmRef);
864
        Message ("Repository Ref: " . $svn->RmRef);
-
 
865
        Message ("Vcs Tag       : " . $svn->SvnTag);
864
        $svn->setRepoProperty('svn:author', $opt_author) if (defined ($opt_author));
866
        $svn->setRepoProperty('svn:author', $opt_author) if (defined ($opt_author));
865
        $svn->setRepoProperty('svn:date', $opt_date) if (defined ($opt_date));
867
        $svn->setRepoProperty('svn:date', $opt_date) if (defined ($opt_date));
866
    }
868
    }
867
 
869
 
868
    #
870
    #
Line 881... Line 883...
881
    {
883
    {
882
        my $data = JatsProperties::New();
884
        my $data = JatsProperties::New();
883
 
885
 
884
        $data->setProperty('Command'        , 'ImportPackage');
886
        $data->setProperty('Command'        , 'ImportPackage');
885
        $data->setProperty('Label'          , $opt_label);
887
        $data->setProperty('Label'          , $opt_label);
886
        $data->setProperty('subversion.tag' , $svn->RmRef);
888
        $data->setProperty('subversion.url' , $svn->RmRef);
-
 
889
        $data->setProperty('subversion.tag' , $svn->SvnTag);
887
 
890
 
888
        $data->Dump('InfoFile') if ($opt_verbose);
891
        $data->Dump('InfoFile') if ($opt_verbose);
889
        $data->store( $opt_datafile );
892
        $data->store( $opt_datafile );
890
    }
893
    }
891
 
894