Subversion Repositories DevTools

Rev

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

Rev 1347 Rev 1356
Line 46... Line 46...
46
my $opt_branch;
46
my $opt_branch;
47
my $opt_list;
47
my $opt_list;
48
my $opt_author;
48
my $opt_author;
49
my $opt_date;
49
my $opt_date;
50
my $opt_complexTag;
50
my $opt_complexTag;
-
 
51
my $opt_noUpdateCheck;
51
 
52
 
52
#
53
#
53
#   Globals
54
#   Globals
54
#
55
#
55
my $session;                                # Subversion Session
56
my $session;                                # Subversion Session
Line 83... Line 84...
83
                'branch'        => \$opt_branch,            # Flag
84
                'branch'        => \$opt_branch,            # Flag
84
                'list'          => \$opt_list,              # Flag
85
                'list'          => \$opt_list,              # Flag
85
                'author=s'      => \$opt_author,            # String
86
                'author=s'      => \$opt_author,            # String
86
                'date=s'        => \$opt_date,              # String
87
                'date=s'        => \$opt_date,              # String
87
                'allowlocalmods!'   => \$opt_complexTag,    # [no]aaaaaa
88
                'allowlocalmods!'   => \$opt_complexTag,    # [no]aaaaaa
-
 
89
                'allowRepoChanges!'   => \$opt_noUpdateCheck, # [no]aaaaaa
-
 
90
 
88
                );
91
                );
89
 
92
 
90
                #
93
                #
91
                #   UPDATE THE DOCUMENTATION AT THE END OF THIS FILE !!!
94
                #   UPDATE THE DOCUMENTATION AT THE END OF THIS FILE !!!
92
                #
95
                #
Line 224... Line 227...
224
           "WorkSpace: $session->{WSURL}" )
227
           "WorkSpace: $session->{WSURL}" )
225
        if ( !$opt_branch && (($session->WsType) eq 'tags') );
228
        if ( !$opt_branch && (($session->WsType) eq 'tags') );
226
 
229
 
227
    #
230
    #
228
    #   The label operation *should* be a server side operation only
231
    #   The label operation *should* be a server side operation only
229
    #   If the user has commited chaages, but not yet updated the local
232
    #   If the user has commited changes, but not yet updated the local
230
    #   workspace, then subversion will do a client side copy
233
    #   workspace, then subversion will do a client side copy
231
    #   This is not good.
234
    #   This is not good.
232
    #       If the 'tags' area is not writable then we get a cryptic message
235
    #       If the 'tags' area is not writable then we get a cryptic message
233
    #       If the 'tags' area is writable then we commit the changes twice
236
    #       If the 'tags' area is writable then we commit the changes twice
234
    #
237
    #
235
    #   Solution - ensure that the Workspace is upto date
238
    #   Solution - ensure that the Workspace is upto date
236
    #              This is done within SvnCopyWs
239
    #              This is done within SvnCopyWs
237
    #
240
    #
238
 
-
 
239
    $session->SvnCopyWs (
241
    $session->SvnCopyWs (
240
                   target => $ws_label,
242
                   target => $ws_label,
241
                   'allowLocalMods' => $opt_complexTag,
243
                   'allowLocalMods' => $opt_complexTag,
-
 
244
                   'noupdatecheck' => $opt_noUpdateCheck,
242
                   'noswitch' => 1,
245
                   'noswitch' => 1,
243
                   'replace' => $opt_replace ? 1 : 0,
246
                   'replace' => $opt_replace ? 1 : 0,
244
                   'comment' => $opt_comment ? $opt_comment : 'Created by Jats Svnlabel',
247
                   'comment' => $opt_comment ? $opt_comment : 'Created by Jats Svnlabel',
245
                   );
248
                   );
246
 
249
 
Line 285... Line 288...
285
    #
288
    #
286
    #   Backtrack label so that we clone the tag source, not the tag
289
    #   Backtrack label so that we clone the tag source, not the tag
287
    #
290
    #
288
    if ( $ws_label_old =~ m~/tags/~ )
291
    if ( $ws_label_old =~ m~/tags/~ )
289
    {
292
    {
290
        $ws_label_old = $session->backTrackSvnLabel( 'tags/' . $label);
293
        $ws_label_old = $session->backTrackSvnLabel( 'tags/' . $label, savedevbranch => 1);
291
        Verbose2 ("Tag back tracked to: $ws_label_old");
294
        Verbose2 ("Tag back tracked to: $ws_label_old");
292
        $ws_label_old = $pkg_root . '/' . $ws_label_old;
295
        $ws_label_old = $pkg_root . '/' . $ws_label_old;
293
    }
296
    }
294
 
297
 
295
    $session->SvnCopy (
298
    $session->SvnCopy (
296
                'old' => $ws_label_old,
299
                'old' => $ws_label_old,
297
                'new' => $ws_label_new,
300
                'new' => $ws_label_new,
298
                'comment' => $opt_comment ? $opt_comment : 'Copied by Jats Svnlabel Clone',
301
                'comment' => $opt_comment ? $opt_comment : 'Copied by Jats Svnlabel Clone',
299
                'replace' => $opt_replace ? 1 : 0,
302
                'replace' => $opt_replace ? 1 : 0,
300
                );
303
                );
301
    
-
 
302
    Message ("Repository Ref: " . $session->RmRef);
304
    Message ("Repository Ref: " . $session->RmRef);
303
    Message ("Vcs Tag       : " . $session->SvnTag);
305
    Message ("Vcs Tag       : " . $session->SvnTag);
304
    updateProperties();
306
    updateProperties();
305
    $opr_done = 1;
307
    $opr_done = 1;
306
}
308
}
Line 489... Line 491...
489
    -workspace=path        - Path to a workspace to label
491
    -workspace=path        - Path to a workspace to label
490
    -packagebase=path      - Repository path to package base
492
    -packagebase=path      - Repository path to package base
491
    -author=name           - Force author of changes
493
    -author=name           - Force author of changes
492
    -date=dateString       - Force date of changes
494
    -date=dateString       - Force date of changes
493
    -allowLocalMods        - Allow complex tagging
495
    -allowLocalMods        - Allow complex tagging
-
 
496
    -allowRepoChanges      - Supress check for an up to date workspace
494
 
497
 
495
=head1 OPTIONS
498
=head1 OPTIONS
496
 
499
 
497
=over 8
500
=over 8
498
 
501
 
Line 610... Line 613...
610
and will form a part of the tag.
613
and will form a part of the tag.
611
 
614
 
612
This mode of operation should NOT be used for normal labeling. It is useful for
615
This mode of operation should NOT be used for normal labeling. It is useful for
613
the preservation of 'Mixed Workspaces'.
616
the preservation of 'Mixed Workspaces'.
614
 
617
 
-
 
618
=item -allowRepoChanges
-
 
619
 
-
 
620
This option modifies the checking that is done when the workspace is labeled.
-
 
621
The default is to 'not' allow changes between the Workspace and the Repository.
-
 
622
Normally the Workspace must be up to date with respect to the head of the
-
 
623
development branch.
-
 
624
 
-
 
625
If Repository Changes are allowed, then the utility will warn about changes, but
-
 
626
the labelling process will continue. This allows Workspaces that have been
-
 
627
pegged to old versions to be tagged.
-
 
628
 
-
 
629
The Repository may still reject the tag if the workspace has been modified in
-
 
630
a manner that would result in a client-side copy. This is intentional.
-
 
631
 
615
=back
632
=back
616
 
633
 
617
=head1 DESCRIPTION
634
=head1 DESCRIPTION
618
 
635
 
619
This program provides a number of useful Subversion labeling operations. These
636
This program provides a number of useful Subversion labeling operations. These