Changeset 1536


Ignore:
Timestamp:
05/13/12 11:41:55 (13 months ago)
Author:
bruno
Message:
  • Improve git support for pb_vcs_get_uri (Eric Anderson) as for the previous patches
File:
1 edited

Legend:

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

    r1535 r1536  
    266266    chomp($res); 
    267267} elsif ($scheme =~ /^git/) { 
    268     open(GITRC,".git/gitrc/") || return(""); 
     268    open(GIT,"git --git-dir=$dir/.git remote -v |") || return(""); 
    269269    while (<GITRC>) { 
    270         ($void,$res) = split(/^default.*=/) if (/^default.*=/); 
     270        next unless (/^origin\s+(\S+) \(push\)$/); 
     271        return $1; 
    271272    } 
    272273    close(GITRC); 
    273     chomp($res); 
     274    warn "Unable to find origin remote for $dir"; 
     275    return ""; 
    274276} elsif ($scheme =~ /^cvs/) { 
    275277    # This path is always the root path of CVS, but we may be below 
Note: See TracChangeset for help on using the changeset viewer.