Changeset 2349


Ignore:
Timestamp:
Jan 14, 2019, 5:07:22 PM (8 months ago)
Author:
bruno
Message:

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

Location:
devel/pb-modules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/etc/pb.yml

    r2337 r2349  
    833833  deb: ftp://ftp.project-builder.org/$pbos->{'name'}/$pbos->{'version'}/pb.sources.list
    834834
     835# default remote git repo name
     836pbgitremote:
     837  default: origin
     838
    835839# Number of process in // for pb
    836840#pbparallel:
  • devel/pb-modules/etc/pb.yml.pod

    r2324 r2349  
    530530 Conffile: home
    531531 Example: pbdefdir default = $ENV{'HOME'}/local/pb/projects
     532
     533=item B<pbgitremote>
     534
     535 Nature: Optional
     536 Key: project (as defined in the -p option or PBPROJ environment variable)
     537 Value: Remote name of the git repository used. The default is origin
     538 Conffile: home
     539 Example: pbgitremote python-redfish = upstream
    532540
    533541=item B<pbgpgcheck>
  • 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.