Subversion Repositories DevTools

Rev

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

Rev 1344 Rev 1347
Line 112... Line 112...
112
Error ("No labels provided") if ( $#ARGV < 0 && !$opt_list );
112
Error ("No labels provided") if ( $#ARGV < 0 && !$opt_list );
113
Error ("Too many labels provided") if ( $#ARGV > 0);
113
Error ("Too many labels provided") if ( $#ARGV > 0);
114
Error ("Conflicting options. Clone and Label") if ( $opt_clone && $opt_label );
114
Error ("Conflicting options. Clone and Label") if ( $opt_clone && $opt_label );
115
Error ("Conflicting options. Rename and Label") if ( $opt_rename && $opt_label );
115
Error ("Conflicting options. Rename and Label") if ( $opt_rename && $opt_label );
116
$label = $ARGV[0];
116
$label = $ARGV[0];
117
$label =~ s~^SVN::~~;
117
$label =~ s~^SVN::~~ if $label;
118
 
118
 
119
#
119
#
120
#   Locate package and workspace roots
120
#   Locate package and workspace roots
121
#
121
#
122
LocateRoots ();
122
LocateRoots ();
Line 181... Line 181...
181
{
181
{
182
    #
182
    #
183
    #   Create old and new paths for the full label
183
    #   Create old and new paths for the full label
184
    #
184
    #
185
    my $ws_label_old = make_src_label ($pkg_root, $label);
185
    my $ws_label_old = make_src_label ($pkg_root, $label);
-
 
186
    my $label_new = SvnIsaSimpleLabel($opt_rename);
186
    my $ws_label_new = make_label ($pkg_root ,SvnIsaSimpleLabel($opt_rename));
187
    my $ws_label_new = make_label ($pkg_root , $label_new);
187
 
188
 
188
    $session->SvnRename (
189
    $session->SvnRename (
189
                'old' => $ws_label_old,
190
                'old' => $ws_label_old,
190
                'new' => $ws_label_new,
191
                'new' => $ws_label_new,
191
                'comment' => $opt_comment ? $opt_comment : 'Renamed by Jats Svnlabel',
192
                'comment' => $opt_comment ? $opt_comment : 'Renamed by Jats Svnlabel',
192
                'replace' => $opt_replace ? 1 : 0,
193
                'replace' => $opt_replace ? 1 : 0,
193
                );
194
                );
194
    
195
    
195
    Message ("Repository Ref: " . $session->RmRef);
196
    Message ("Repository Ref: " . $session->RmRef);
-
 
197
    Message ("Vcs Tag       : " . $session->SvnTag);
196
    updateProperties();
198
    updateProperties();
197
    $opr_done = 1;
199
    $opr_done = 1;
198
}
200
}
199
 
201
 
200
################################################################################
202
################################################################################
Line 205... Line 207...
205
if ( $opt_label )
207
if ( $opt_label )
206
{
208
{
207
    #
209
    #
208
    #   Can now create a nice pathname for the label
210
    #   Can now create a nice pathname for the label
209
    #
211
    #
-
 
212
    $label = SvnIsaSimpleLabel ($label);
210
    my $ws_label = make_label( $pkg_root, SvnIsaSimpleLabel ($label));
213
    my $ws_label = make_label( $pkg_root, $label );
211
 
214
 
212
    #
215
    #
213
    #   Don't let the user create a tag from a workspace that is
216
    #   Don't let the user create a tag from a workspace that is
214
    #   also created from a tag.
217
    #   also created from a tag.
215
    #
218
    #
Line 240... Line 243...
240
                   'replace' => $opt_replace ? 1 : 0,
243
                   'replace' => $opt_replace ? 1 : 0,
241
                   'comment' => $opt_comment ? $opt_comment : 'Created by Jats Svnlabel',
244
                   'comment' => $opt_comment ? $opt_comment : 'Created by Jats Svnlabel',
242
                   );
245
                   );
243
 
246
 
244
    Message ("Repository Ref: " . $session->RmRef);
247
    Message ("Repository Ref: " . $session->RmRef);
-
 
248
    Message ("Vcs Tag       : " . $session->SvnTag);
245
    updateProperties();
249
    updateProperties();
246
    $opr_done = 1;
250
    $opr_done = 1;
247
}
251
}
248
 
252
 
249
################################################################################
253
################################################################################
Line 274... Line 278...
274
{
278
{
275
    #
279
    #
276
    #   Create old and new paths for the full label
280
    #   Create old and new paths for the full label
277
    #
281
    #
278
    my $ws_label_old = make_src_label ($pkg_root, $label);
282
    my $ws_label_old = make_src_label ($pkg_root, $label);
-
 
283
    my $new_label = SvnIsaSimpleLabel($opt_clone);
279
    my $ws_label_new = make_label ($pkg_root ,SvnIsaSimpleLabel($opt_clone));
284
    my $ws_label_new = make_label ($pkg_root , $new_label);
280
    #
285
    #
281
    #   Backtrack label so that we clone the tag source, not the tag
286
    #   Backtrack label so that we clone the tag source, not the tag
282
    #
287
    #
283
    if ( $ws_label_old =~ m~/tags/~ )
288
    if ( $ws_label_old =~ m~/tags/~ )
284
    {
289
    {
Line 293... Line 298...
293
                'comment' => $opt_comment ? $opt_comment : 'Copied by Jats Svnlabel Clone',
298
                'comment' => $opt_comment ? $opt_comment : 'Copied by Jats Svnlabel Clone',
294
                'replace' => $opt_replace ? 1 : 0,
299
                'replace' => $opt_replace ? 1 : 0,
295
                );
300
                );
296
    
301
    
297
    Message ("Repository Ref: " . $session->RmRef);
302
    Message ("Repository Ref: " . $session->RmRef);
-
 
303
    Message ("Vcs Tag       : " . $session->SvnTag);
298
    updateProperties();
304
    updateProperties();
299
    $opr_done = 1;
305
    $opr_done = 1;
300
}
306
}
301
 
307
 
302
 
308