Changeset 1535


Ignore:
Timestamp:
May 13, 2012, 11:39:07 AM (7 years ago)
Author:
bruno
Message:
  • Add git support in pb_vcs_up, pb_vcs_checkin and pb_vcs_add
Location:
devel
Files:
2 edited

Legend:

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

    r1493 r1535  
    1414
    1515use strict 'vars';
     16use Carp 'confess';
    1617use Data::Dumper;
    1718use English;
     
    397398my $vcscmd = pb_vcs_cmd($scheme);
    398399
    399 if (($scheme =~ /^svn/) || ($scheme =~ /^cvs/) || ($scheme =~ /^svk/)) {
     400if (($scheme =~ /^((svn)|(cvs)|(svk))/o) {
    400401    pb_system("$vcscmd up ".join(' ',@dir),"Updating ".join(' ',@dir));
     402} elsif ($scheme =~ /^((hg)|(git))/o) {
     403    pb_system("(cd $dir && $vcscmd pull)", "Updating $dir ");
    401404} elsif (($scheme eq "flat") || ($scheme eq "ftp") || ($scheme eq "http"))   {
    402405} else {
     
    420423my $vcscmd = pb_vcs_cmd($scheme);
    421424
    422 if (($scheme =~ /^svn/) || ($scheme =~ /^cvs/) || ($scheme =~ /^svk/)) {
    423     pb_system("cd $dir ; $vcscmd ci -m \"$msg\" .","Checking in $dir ");
     425if (($scheme =~ /^((svn)|(cvs)|(svk))/o) {
     426    pb_system("cd $dir && $vcscmd ci -m \"$msg\" .","Checking in $dir ");
     427} elsif ($scheme =~ /^git/) {
     428    pb_system("cd $dir && $vcscmd commit -a -m \"$msg\"", "Checking in $dir ");
    424429} elsif (($scheme eq "flat") || ($scheme eq "ftp") || ($scheme eq "http"))   {
    425430} else {
     
    442447my $vcscmd = pb_vcs_cmd($scheme);
    443448
    444 if (($scheme =~ /^svn/) || ($scheme =~ /^cvs/) || ($scheme =~ /^svk/)) {
     449if ($scheme =~ /^((hg)|(git)|(svn)|(svk)|(cvs))/o) {
    445450    pb_system("$vcscmd add ".join(' ',@f),"Adding ".join(' ',@f)." to VCS ");
    446451} elsif (($scheme eq "flat") || ($scheme eq "ftp") || ($scheme eq "http"))   {
     
    465470my $l = undef;
    466471
    467 if (($scheme =~ /^svn/) || ($scheme =~ /^cvs/) || ($scheme =~ /^svk/)) {
     472if (($scheme =~ /^((svn)|(cvs)|(svk))/o) {
    468473    open(PIPE,"$vcscmd diff $dir |") || die "Unable to get $vcscmd diff from $dir";
    469474    $l = 0;
  • devel/pb/lib/ProjectBuilder/CMS.pm

    r1495 r1535  
    1313
    1414use strict 'vars';
     15use Carp 'confess';
    1516use Data::Dumper;
    1617use English;
Note: See TracChangeset for help on using the changeset viewer.