Subversion Repositories DevTools

Rev

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

Rev 1270 Rev 1328
Line 218... Line 218...
218
    Error ("Cannot tag a Workspace based on a 'tag'",
218
    Error ("Cannot tag a Workspace based on a 'tag'",
219
           "You should be working in a branch",
219
           "You should be working in a branch",
220
           "WorkSpace: $session->{WSURL}" )
220
           "WorkSpace: $session->{WSURL}" )
221
        if ( !$opt_branch && (($session->WsType) eq 'tags') );
221
        if ( !$opt_branch && (($session->WsType) eq 'tags') );
222
 
222
 
-
 
223
    #
-
 
224
    #   The label operation *should* be a server side operation only
-
 
225
    #   If the user has commited chaages, but not yet updated the local
-
 
226
    #   workspace, then subversion will do a client side copy
-
 
227
    #   This is not good.
-
 
228
    #       If the 'tags' area is not writable then we get a cryptic message
-
 
229
    #       If the 'tags' area is writable then we commit the changes twice
-
 
230
    #
-
 
231
    #   Solution - ensure that the Workspace is upto date
-
 
232
    #              This is done within SvnCopyWs
-
 
233
    #
-
 
234
 
223
    $session->SvnCopyWs (
235
    $session->SvnCopyWs (
224
                   target => $ws_label,
236
                   target => $ws_label,
225
                   'allowLocalMods' => $opt_complexTag,
237
                   'allowLocalMods' => $opt_complexTag,
226
                   'noswitch' => 1,
238
                   'noswitch' => 1,
227
                   'replace' => $opt_replace ? 1 : 0,
239
                   'replace' => $opt_replace ? 1 : 0,
Line 301... Line 313...
301
#-------------------------------------------------------------------------------
313
#-------------------------------------------------------------------------------
302
# Function        : make_src_label
314
# Function        : make_src_label
303
#
315
#
304
# Description     : Create a source label ( tag or branch )
316
# Description     : Create a source label ( tag or branch )
305
#
317
#
306
#                   Calculateion may be bypassed in the global $src_label
318
#                   Calculation may be bypassed in the global $src_label
307
#                   is specified.
319
#                   is specified.
308
#
320
#
309
# Inputs          : $base
321
# Inputs          : $base
310
#                   $name           - May contain hint
322
#                   $name           - May contain hint
311
#                                     Prefixed with 'tags/' or 'branches/'
323
#                                     Prefixed with 'tags/' or 'branches/'
Line 313... Line 325...
313
# Returns         : Full label
325
# Returns         : Full label
314
#
326
#
315
sub make_src_label
327
sub make_src_label
316
{
328
{
317
    return $src_label if ( $src_label );
329
    return $src_label if ( $src_label );
318
 
-
 
319
    my ($base, $name) = @_;
330
    my ($base, $name) = @_;
320
    my $result = $name;
331
    my $result = $name;
321
    unless ( $name =~ m~(^branches/)|(^tags)~ )
332
    unless ( $name =~ m~(^branches/)|(^tags)|(^trunk\@)~ )
322
    {
333
    {
323
        $result = ($opt_branch ? 'branches/' : 'tags/' ) . $name;
334
        $result = ($opt_branch ? 'branches/' : 'tags/' ) . $name;
324
    }
335
    }
325
    return $base . '/' . $result;
336
    return $base . '/' . $result;
326
}
337
}