Changeset 452 in ProjectBuilder for devel/pb/lib/ProjectBuilder/CMS.pm
- Timestamp:
- May 27, 2008, 1:46:52 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/lib/ProjectBuilder/CMS.pm
r448 r452 29 29 30 30 our @ISA = qw(Exporter); 31 our @EXPORT = qw(pb_cms_init pb_cms_export pb_cms_get_uri pb_cms_copy pb_cms_checkout pb_cms_up pb_cms_checkin pb_cms_isdiff pb_cms_get_pkg pb_cms_compliant pb_cms_log );31 our @EXPORT = qw(pb_cms_init pb_cms_export pb_cms_get_uri pb_cms_copy pb_cms_checkout pb_cms_up pb_cms_checkin pb_cms_isdiff pb_cms_get_pkg pb_cms_compliant pb_cms_log pb_cms_add); 32 32 33 33 =pod … … 336 336 The first parameter is the schema of the CMS systems (svn, cvs, svn+ssh, ...) 337 337 The second parameter is the directory to update from. 338 The third parameter indicates if we are in a new version creation (undef) or in a new project creation (1) 338 339 339 340 =cut … … 342 343 my $scheme = shift; 343 344 my $dir = shift; 345 my $pbinit = shift || undef; 344 346 345 347 my $ver = basename($dir); 346 if ($scheme =~ /^svn/) { 347 pb_system("svn ci -m \"updated to $ver\" $dir","Checking in $dir"); 348 my $msg = "updated to $ver"; 349 $msg = "Project $ENV{PBPROJ} creation" if (defined $pbinit); 350 351 if ($scheme =~ /^svn/) { 352 pb_system("svn ci -m \"$msg\" $dir","Checking in $dir"); 348 353 } elsif ($scheme eq "flat") { 349 354 } elsif ($scheme =~ /^cvs/) { 350 pb_system("cvs ci -m \" updated to $ver\" $dir","Checking in $dir");355 pb_system("cvs ci -m \"$msg\" $dir","Checking in $dir"); 351 356 } else { 352 357 die "cms $scheme unknown"; 353 358 } 354 359 pb_cms_up($scheme,$dir); 360 } 361 362 =item B<pb_cms_add> 363 364 This function adds to a CMS content from a local directory. 365 The first parameter is the schema of the CMS systems (svn, cvs, svn+ssh, ...) 366 The second parameter is the directory/file to add. 367 368 =cut 369 370 sub pb_cms_add { 371 my $scheme = shift; 372 my $f = shift; 373 374 if ($scheme =~ /^svn/) { 375 pb_system("svn add $f","Adding $f to SVN"); 376 } elsif ($scheme eq "flat") { 377 } elsif ($scheme =~ /^cvs/) { 378 pb_system("cvs add $f","Adding $f to CVS"); 379 } else { 380 die "cms $scheme unknown"; 381 } 382 pb_cms_up($scheme,$f); 355 383 } 356 384
Note:
See TracChangeset
for help on using the changeset viewer.