Subversion Repositories DevTools

Rev

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

Rev 2048 Rev 2053
Line 1016... Line 1016...
1016
                'new' => join ('/', $ws_url, $uref->{DEVBRANCH} ),
1016
                'new' => join ('/', $ws_url, $uref->{DEVBRANCH} ),
1017
                'comment' => $opt_comment ? $opt_comment : 'Created by Jats svn branch',
1017
                'comment' => $opt_comment ? $opt_comment : 'Created by Jats svn branch',
1018
                'replace' => 0,
1018
                'replace' => 0,
1019
                );
1019
                );
1020
 
1020
 
-
 
1021
 
1021
    if ( $opt_switch )
1022
    if ( $opt_switch )
1022
    {
1023
    {
1023
        Verbose ("Switching to new branch: $opt_branch");
1024
        Verbose ("Switching to new branch: $opt_branch");
1024
        $branch_tag = SvnPath2Url($branch_tag);
1025
        $branch_tag = SvnPath2Url($branch_tag);
1025
        $uref->SvnSwitch ($branch_tag,
-
 
1026
                          $opt_path,
1026
        chdir ($ws_root) || Error ("Cannot cd to: " .$ws_root);
1027
                          '--Print' );
1027
        $uref->SvnSwitch ($branch_tag, $opt_path, '--Print', '--KeepWs' );
1028
    }
1028
    }
1029
    else
1029
    else
1030
    {
1030
    {
1031
        Warning ("Using existing workspace, not the created branch");
1031
        Warning ("Using existing workspace, not the created branch");
1032
    }
1032
    }
Line 1102... Line 1102...
1102
 
1102
 
1103
    #
1103
    #
1104
    #   Do all the hard work
1104
    #   Do all the hard work
1105
    #
1105
    #
1106
    my $uref = NewSessionByWS($opt_path, 0, 1);
1106
    my $uref = NewSessionByWS($opt_path, 0, 1);
-
 
1107
    my $ws_root = $uref->SvnLocateWsRoot(1);
1107
    my $ws_url = $uref->Full();
1108
    my $ws_url = $uref->Full();
1108
    my $branch_tag = join ('/', $ws_url, $opt_branch);
1109
    my $branch_tag = join ('/', $ws_url, $opt_branch);
1109
 
1110
 
1110
    #
1111
    #
1111
    #   Validate the branch
1112
    #   Validate the branch
Line 1114... Line 1115...
1114
                        'cmd'    => 'svn switch',
1115
                        'cmd'    => 'svn switch',
1115
                        'target' => $branch_tag,
1116
                        'target' => $branch_tag,
1116
                        'require' => 1,
1117
                        'require' => 1,
1117
                        );
1118
                        );
1118
 
1119
 
-
 
1120
    #
-
 
1121
    #   Must Change directory before we switch
-
 
1122
    #   Otherwise we will import chnages into the wrong place
-
 
1123
    #
-
 
1124
    chdir ($ws_root) || Error ("Cannot cd to: " . $ws_root);
1119
    $uref->SvnSwitch ($branch_tag, $opt_path, '--Print' );
1125
    $uref->SvnSwitch ($branch_tag, $opt_path, '--Print', '--KeepWs' );
1120
    $opr_done = 1;
1126
    $opr_done = 1;
1121
}
1127
}
1122
 
1128
 
1123
#-------------------------------------------------------------------------------
1129
#-------------------------------------------------------------------------------
1124
# Function        : ShowBranches
1130
# Function        : ShowBranches