Subversion Repositories DevTools

Rev

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

Rev 375 Rev 379
Line 148... Line 148...
148
if ( $opt_list )
148
if ( $opt_list )
149
{
149
{
150
    my $pList = $session->ListLabels (make_label ($pkg_root, '') );
150
    my $pList = $session->ListLabels (make_label ($pkg_root, '') );
151
 
151
 
152
    #
152
    #
153
    #   REmove trailing / on all directory names
153
    #   Remove trailing / on all directory names
154
    #
154
    #
155
    chop @{$pList};
155
    chop @{$pList};
156
 
156
 
157
    my $type = $opt_branch ? 'branch' : 'tag';
157
    my $type = $opt_branch ? 'branch' : 'tag';
158
    Information ( "Package: " . $session->Path,
158
    Information ( "Package: " . $session->Path,
Line 209... Line 209...
209
    #   Can't stop them - but can make it difficult.
209
    #   Can't stop them - but can make it difficult.
210
    #
210
    #
211
    Error ("Cannot tag a Workspace based on a 'tag'",
211
    Error ("Cannot tag a Workspace based on a 'tag'",
212
           "You should be working in a branch",
212
           "You should be working in a branch",
213
           "WorkSpace: $session->{WSURL}" )
213
           "WorkSpace: $session->{WSURL}" )
214
        if ( ($session->WsType) eq 'tags' );
214
        if ( !$opt_branch && (($session->WsType) eq 'tags') );
215
 
215
 
216
    $session->SvnCopyWs (
216
    $session->SvnCopyWs (
217
                   target => $ws_label,
217
                   target => $ws_label,
218
                   'noswitch' => 1,
218
                   'noswitch' => 1,
219
                   'replace' => $opt_replace ? 1 : 0,
219
                   'replace' => $opt_replace ? 1 : 0,
Line 291... Line 291...
291
#-------------------------------------------------------------------------------
291
#-------------------------------------------------------------------------------
292
# Function        : make_src_label
292
# Function        : make_src_label
293
#
293
#
294
# Description     : Create a source label ( tag or branch )
294
# Description     : Create a source label ( tag or branch )
295
#
295
#
-
 
296
#                   Calculateion may be bypassed in the global $src_label
-
 
297
#                   is specified.
-
 
298
#
296
# Inputs          : $base
299
# Inputs          : $base
297
#                   $name
300
#                   $name           - May contain hint
-
 
301
#                                     Prefixed with 'tags/' or 'branches/'
298
#
302
#
299
# Returns         : Full label
303
# Returns         : Full label
300
#
304
#
301
sub make_src_label
305
sub make_src_label
302
{
306
{
303
    return $src_label if ( $src_label );
307
    return $src_label if ( $src_label );
304
 
308
 
305
    my ($base, $name) = @_;
309
    my ($base, $name) = @_;
-
 
310
    my $result = $name;
-
 
311
    unless ( $name =~ m~(^branches/)|(^tags)~ )
-
 
312
    {
306
    my $join = $opt_branch ? '/branches/' : '/tags/';
313
        $result = ($opt_branch ? 'branches/' : 'tags/' ) . $name;
-
 
314
    }
307
    return $base . $join . $name;
315
    return $base . '/' . $result;
308
}
316
}
309
 
317
 
310
 
318
 
311
#-------------------------------------------------------------------------------
319
#-------------------------------------------------------------------------------
312
# Function        : LocateRoots
320
# Function        : LocateRoots