Changeset 1492 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder/VCS.pm


Ignore:
Timestamp:
Apr 30, 2012, 2:48:37 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • pb_vcs_add and pb_vcs_up now support a list of dirs/files as second parameter
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/VCS.pm

    r1469 r1492  
    388388This function updates a local directory with the VCS content.
    389389The first parameter is the schema of the VCS systems (svn, cvs, svn+ssh, ...)
    390 The second parameter is the directory to update.
     390The second parameter is the list of directory to update.
    391391
    392392=cut
     
    394394sub pb_vcs_up {
    395395my $scheme = shift;
    396 my $dir = shift;
     396my @dir = shift;
    397397my $vcscmd = pb_vcs_cmd($scheme);
    398398
    399399if (($scheme =~ /^svn/) || ($scheme =~ /^cvs/) || ($scheme =~ /^svk/)) {
    400     pb_system("$vcscmd up $dir","Updating $dir ");
     400    pb_system("$vcscmd up ".join(' ',@dir),"Updating ".join(' ',@dir));
    401401} elsif (($scheme eq "flat") || ($scheme eq "ftp") || ($scheme eq "http"))   {
    402402} else {
     
    433433This function adds to a VCS content from a local directory.
    434434The first parameter is the schema of the VCS systems (svn, cvs, svn+ssh, ...)
    435 The second parameter is the directory/file to add.
     435The second parameter is a list of directory/file to add.
    436436
    437437=cut
     
    439439sub pb_vcs_add {
    440440my $scheme = shift;
    441 my $f = shift;
     441my @f = shift;
    442442my $vcscmd = pb_vcs_cmd($scheme);
    443443
    444444if (($scheme =~ /^svn/) || ($scheme =~ /^cvs/) || ($scheme =~ /^svk/)) {
    445     pb_system("$vcscmd add $f","Adding $f to VCS ");
     445    pb_system("$vcscmd add ".join(' ',@f),"Adding ".join(' ',@f)." to VCS ");
    446446} elsif (($scheme eq "flat") || ($scheme eq "ftp") || ($scheme eq "http"))   {
    447447} else {
    448448    die "cms $scheme unknown";
    449449}
    450 pb_vcs_up($scheme,$f);
     450pb_vcs_up($scheme,@f);
    451451}
    452452
Note: See TracChangeset for help on using the changeset viewer.