Subversion Repositories DevTools

Rev

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

Rev 391 Rev 1270
Line 408... Line 408...
408
{
408
{
409
    Message( "Create the workspace" . ($GBE_SANDBOX ? " in a SANDBOX" : ""));
409
    Message( "Create the workspace" . ($GBE_SANDBOX ? " in a SANDBOX" : ""));
410
 
410
 
411
    my $view_tag = $svn_label->Full;
411
    my $view_tag = $svn_label->Full;
412
    #
412
    #
-
 
413
    #   If a branch is required ...
-
 
414
 
-
 
415
    #   If the branch exists, then use it
413
    #   If a branch is required then copy the source to the
416
    #   If the branch does not exist, then create it
414
    #   branch and then checkout the branch
417
    #       Copy the source to the branch
-
 
418
    #       Check it out
415
    #
419
    #
416
    if ( $opt_branch )
420
    if ( $opt_branch )
417
    {
421
    {
-
 
422
        Verbose ("Test branch existence");
418
        #
423
        #
419
        #   Create the name of the branch
424
        #   Create the name of the branch
420
        #   Will be based on the current package
425
        #   Will be based on the current package
421
        #
426
        #
422
        my $branch = $svn_label->BranchName($opt_branch, 'branches' );
427
        my $branch = $svn_label->BranchName($opt_branch, 'branches' );
-
 
428
        my $rv = $svn_label->SvnValidateTarget (
-
 
429
                        'cmd'    => 'SvnRelease',
-
 
430
                        'target' => $branch,
-
 
431
                        'test' => 1,
-
 
432
                        );
-
 
433
 
-
 
434
        if ( $rv )
-
 
435
        {
-
 
436
            #
-
 
437
            #   The named branch exists
-
 
438
            #   Use it in place of the users named version
-
 
439
            #   This mimics the clearcase behaviour
-
 
440
            #   Assumes that it is a project branch
-
 
441
            #
-
 
442
            Warning ("Specified branch \"$opt_branch\" exists",
-
 
443
                     "It will be used as the base for this Workspace",
-
 
444
                     "The workspace will conatin the current HEAD of this branch");
423
 
445
 
-
 
446
            #
-
 
447
            #   Setup the base of the Workspace
-
 
448
            #   It will be based on the branch
-
 
449
            #
-
 
450
            $view_tag = $branch;
-
 
451
        }
-
 
452
        else
-
 
453
        {
-
 
454
            #
-
 
455
            #   Branch does not exist
-
 
456
            #   Create it be copying the base view
-
 
457
            #
424
        $view_tag = $svn_label->SvnCopy (
458
            $view_tag = $svn_label->SvnCopy (
425
                            'old' => $view_tag,
459
                            'old' => $view_tag,
426
                            'new' => $branch,
460
                            'new' => $branch,
427
                            'comment' => 'Created by Jats SvnRelease branch request',
461
                            'comment' => 'Created by Jats SvnRelease branch request',
428
                            'replace' => 0 );
462
                            'replace' => 0 );
429
 
463
 
430
        $view_tag = SvnPath2Url($view_tag);
464
            $view_tag = SvnPath2Url($view_tag);
-
 
465
            
-
 
466
        }
431
    }
467
    }
432
 
468
 
-
 
469
    #
-
 
470
    #   Create the workspace
-
 
471
    #
433
    $svn_label->SvnCo ( $view_tag, $VIEWDIR . $opt_path );
472
    $svn_label->SvnCo ( $view_tag, $VIEWDIR . $opt_path );
434
    Error ("Cannot locate the created Workspace")
473
    Error ("Cannot locate the created Workspace")
435
        unless ( -d $VIEWDIR . $opt_path);
474
        unless ( -d $VIEWDIR . $opt_path);
436
 
475
 
437
    #
476
    #
Line 859... Line 898...
859
    {
898
    {
860
        Verbose "Delete Directory: $VIEWDIR\n";
899
        Verbose "Delete Directory: $VIEWDIR\n";
861
        RmDirTree( $VIEWDIR );
900
        RmDirTree( $VIEWDIR );
862
    }
901
    }
863
 
902
 
864
    $svn_label->SvnCo ( $svn_label->Full, $VIEWDIR, '--Export' );
903
    $svn_label->SvnCo ( $svn_label->Full, $VIEWDIR, '--Export', '--NoPrint' );
865
 
904
 
866
    #
905
    #
867
    #   Count this files in the view
906
    #   Count this files in the view
868
    #   Done so that its clear when we have a empty workspace
907
    #   Done so that its clear when we have a empty workspace
869
    #
908
    #
Line 1000... Line 1039...
1000
If the comamnd is invoked within a development sandbox, then the default
1039
If the comamnd is invoked within a development sandbox, then the default
1001
location will be the root directory of the development sandbox.
1040
location will be the root directory of the development sandbox.
1002
 
1041
 
1003
=item B<-branch=xxx or -mkbranch=xxx>
1042
=item B<-branch=xxx or -mkbranch=xxx>
1004
 
1043
 
1005
This option will create workspace branch that is tagged with the named branch.
1044
This option will create a workspace associated with a branch within the
1006
This is intended to facilitate the maintenance of existing packages and the
1045
repository. This is intended to facilitate the maintenance of existing packages
1007
creation of private development branches.
1046
and the creation of project or development branches in a manner similar to
-
 
1047
ClearCase.
1008
 
1048
 
1009
The named branch must NOT exist within the subversion repository. The script will
1049
If the named branch exists, then the workspace will be based on the branch and
1010
check for its existence.
1050
not on the specified label.
1011
 
1051
 
1012
The tool will copy the specified source version to the branch and then create a
1052
If the named branch does not exist, then this tool will copy the specified
1013
workspace based on the branch.
1053
source version to the branch and then create a workspace based on the branch.
1014
 
1054
 
1015
A branch name of TIMESTAMP will be treated in special manner. The name will be
1055
A branch name of TIMESTAMP will be treated in special manner. The name will be
1016
replaced with a unique name based on the users name and the current date time.
1056
replaced with a unique name based on the users name and the current date time.
1017
 
1057
 
1018
=item B<-tag=text>
1058
=item B<-tag=text>
Line 1137... Line 1177...
1137
=back
1177
=back
1138
 
1178
 
1139
=head1 DESCRIPTION
1179
=head1 DESCRIPTION
1140
 
1180
 
1141
This program is the primary tool for the creation, recreation and release of
1181
This program is the primary tool for the creation, recreation and release of
1142
packages within the B<ERG> build environment, although the program can perform a
1182
packages within the B<VIX> build environment, although the program can perform a
1143
number of very useful operations required during normal development and
1183
number of very useful operations required during normal development and
1144
maintenance.
1184
maintenance.
1145
 
1185
 
1146
This program will build a system containing one or more inter-related build
1186
This program will build a system containing one or more inter-related build
1147
files using the JATS build tools.
1187
files using the JATS build tools.