Changeset 1897


Ignore:
Timestamp:
Sep 30, 2014, 10:07:59 AM (5 years ago)
Author:
bruno
Message:
  • Fix a previous patch on git support for compliance checks which were incorrect. Now works at least with git+svn, and should work the same way as the original patch was intentded to work for native git.
File:
1 edited

Legend:

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

    r1893 r1897  
    298298    } else {
    299299        # Pure git
    300         # First we may deal with a separat git repo under $dir
     300        # First we may deal with a separate git repo under $dir
    301301        if ( -d "$dir/.git" ) {
    302302            open(GIT,"LANGUAGE=C $vcscmd --git-dir=$dir/.git remote -v 2> /dev/null |") || return("");
     
    658658}
    659659
    660 
    661660if ((defined $pdir) && (%pdir) && (defined $pdir{$ENV{'PBPROJ'}})) {
    662661    # That's always the environment variable that will be used
     
    686685    # Either we have a version in the uri, and it should be the same
    687686    # as the one in the envar. Or we should add the version to the uri
    688     # # But noot if it's git as it manages version branches internally
     687    # # But not if it's git as it manages version branches internally
    689688    if ((basename($uri) ne basename($ENV{$envar})) && ($scheme !~ /^git/)) {
    690689        $uri .= "/".basename($ENV{$envar})
     
    705704        # remove schema from `git+file:` and `git+dir:` urls
    706705        # TODO: handle query-parameters
    707         $url =~ s/^git\+(file|dir)://;
     706        $uri =~ s/^git\+(file|dir)://;
    708707        # Expand potential env variable in it -- this is required due to the consistency check
    709         $url =~ s/(\$ENV.+\})/$1/eeg;
     708        $uri =~ s/(\$ENV.+\})/$1/eeg;
    710709    } elsif ($scheme2 =~ /^hg/) {
    711710        # This VCS manages branches internally not with different tree structures
    712711        # Assuming it's correct for now.
    713     } elsif ($cmsurl ne $uri) {
     712        return;
     713    }
     714
     715    if ($cmsurl ne $uri) {
    714716        # The local content doesn't correpond to the repository
    715717        pb_log(0,"ERROR: Inconsistency detected:\n");
Note: See TracChangeset for help on using the changeset viewer.