Subversion Repositories DevTools

Rev

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

Rev 2026 Rev 2429
Line 174... Line 174...
174
#
174
#
175
#   Create subversion options
175
#   Create subversion options
176
#       Set author
176
#       Set author
177
#       Set insertion date
177
#       Set insertion date
178
#           Expecting Clearcase format: 2011-08-30T13:49:21+08
178
#           Expecting Clearcase format: 2011-08-30T13:49:21+08
-
 
179
#                                       2002-03-05T09:13:50Z
179
#           Need 'YYYY-MM-DDTHH:MM:SS.MMMMMMZ'
180
#           Need 'YYYY-MM-DDTHH:MM:SS.MMMMMMZ'
180
#
181
#
181
my @svnOpts;
182
my @svnOpts;
182
push (@svnOpts, '-author', $opt_author )if $opt_author;
183
push (@svnOpts, '-author', $opt_author )if $opt_author;
183
if ( $opt_date )
184
if ( $opt_date )
184
{
185
{
185
        $opt_date =~ s~ ~T~;
186
        $opt_date =~ s~ ~T~;
186
        $opt_date =~ s~\+.*~~;
187
        $opt_date =~ s~\+.*~~;
-
 
188
        $opt_date =~ s~Z+.*~~;
187
        $opt_date .= '.0000000Z';
189
        $opt_date .= '.0000000Z';
188
        push @svnOpts, '-date', $opt_date;
190
        push @svnOpts, '-date', $opt_date;
189
    }
191
    }
190
 
192
 
191
 
193
 
Line 198... Line 200...
198
#JatsTool ( 'jats_ccrelease', "-label=$opt_label" , '-extract', '-root=.' , '-noprefix', "-path=$opt_path", '-delete');
200
#JatsTool ( 'jats_ccrelease', "-label=$opt_label" , '-extract', '-root=.' , '-noprefix', "-path=$opt_path", '-delete');
199
 
201
 
200
SystemConfig ('ExitOnError' => 0);
202
SystemConfig ('ExitOnError' => 0);
201
JatsTool ( 'jats_svn', 'create',  "$opt_repo/$opt_package", @svnOpts );
203
JatsTool ( 'jats_svn', 'create',  "$opt_repo/$opt_package", @svnOpts );
202
JatsTool ( 'jats_ccrelease', "-label=$opt_label" , '-extractfiles', '-root=.' , '-noprefix', "-path=$opt_path");
204
JatsTool ( 'jats_ccrelease', "-label=$opt_label" , '-extractfiles', '-root=.' , '-noprefix', "-path=$opt_path");
-
 
205
convertUTF8 ("$opt_label$opt_path");
-
 
206
 
-
 
207
if ( -d  "$opt_label$opt_path")
-
 
208
{
203
JatsTool ( 'jats_svn', 'import', '-reuse' ,"-package=$opt_repo/$opt_package", "-dir=$opt_label$opt_path", "-label=$opt_label", @svnOpts );
209
    my $rv = JatsTool ( 'jats_svn', 'import', '-reuse' ,"-package=$opt_repo/$opt_package", "-dir=$opt_label$opt_path", "-label=$opt_label", @svnOpts );
-
 
210
    Error ("svn_pump: Error detected during import" ) if ( $rv );
-
 
211
}
204
JatsTool ( 'jats_ccrelease', "-label=$opt_label" , '-extractfiles', '-root=.' , '-noprefix', "-path=$opt_path", '-delete');
212
JatsTool ( 'jats_ccrelease', "-label=$opt_label" , '-extractfiles', '-root=.' , '-noprefix', "-path=$opt_path", '-delete');
205
 
213
 
206
 
214
 
-
 
215
#-------------------------------------------------------------------------------
-
 
216
# Function        : convertUTF8
-
 
217
#
-
 
218
# Description     : Convert filenames to UTF8
-
 
219
#
-
 
220
# Inputs          : $path       - Source path
-
 
221
#
-
 
222
# Returns         : 
-
 
223
#
-
 
224
sub convertUTF8
-
 
225
{
-
 
226
    my ($path) = @_;
-
 
227
 
-
 
228
    if ( -d $path )
-
 
229
    {
-
 
230
        my $rv = system ( '/home/dpurdie/svn/tools/convmv-1.15/convmv',
-
 
231
                 '-fiso-8859-1',
-
 
232
                 '-tutf8',
-
 
233
                 '-r',
-
 
234
                 '--notest',
-
 
235
                 $path );
-
 
236
        Warning ("convmv conversion error") if ( $rv );
-
 
237
    }
-
 
238
    else
-
 
239
    {
-
 
240
        Warning ("convertUTF8: Path not found: $path");
-
 
241
    }
-
 
242
}
207
 
243
 
208
#-------------------------------------------------------------------------------
244
#-------------------------------------------------------------------------------
209
# Function        : GetData
245
# Function        : GetData
210
#
246
#
211
# Description     :
247
# Description     :