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


Ignore:
Timestamp:
Jan 14, 2019, 5:07:22 PM (5 years ago)
Author:
Bruno Cornec
Message:

Fix #174 by adding the conf param pbgitremote with its doc

File:
1 edited

Legend:

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

    r2348 r2349  
    421421            chdir($cwd) || return("");
    422422        }
     423        my ($pborigin) = pb_conf_get("pbgitremote");
    423424        while (<GIT>) {
    424             next unless (/^origin\s+(\S+) \(push\)$/);
    425             return $1;
     425            next unless (/^$pborigin->{$ENV{'PBPROJ'}}\s+(\S+) \(push\)$/);
     426            $res = $1;
     427            if (($res =~ /@/) && ($res !~ /:\/\//)) {
     428                # we have an ssh connection, return it
     429                $res = "ssh://$res";
     430            }
     431            return $res;
    426432        }
    427433        close(GIT);
    428         warn "Unable to find a remote git origin under $dir nor $ENV{'PBPROJDIR'}";
     434        warn "Unable to find a remote git $pborigin->{$ENV{'PBPROJ'}} under $dir nor $ENV{'PBPROJDIR'}";
    429435        return "";
    430436    }
Note: See TracChangeset for help on using the changeset viewer.