Changeset 2267


Ignore:
Timestamp:
Aug 30, 2017, 5:07:48 PM (3 months ago)
Author:
bruno
Message:

the function to update v0 conf into v1 is now used in VCS.pm to allow
to add files generated into VCS without poluting Conf. with it
(hierarchy issues)

Location:
devel
Files:
5 edited

Legend:

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

    r2266 r2267  
    1919use ProjectBuilder::Base;
    2020use ProjectBuilder::Version;
    21 use ProjectBuilder::VCS;
    2221
    2322# Inherit from the "Exporter" module which handles exporting functions.
     
    594593close(ORIG);
    595594close(DEST);
    596 # Adding this new file to VCS (not removing the previous one)
    597 my ($pburl) = pb_conf_get("pburl");
    598 my ($scheme, $account, $host, $port, $path) = pb_get_uri($pburl->{$ENV{'PBPROJ'}});
    599 pb_vcs_add_if_not_in($scheme,$dest);
    600595return();
    601596}
  • devel/pb-modules/lib/ProjectBuilder/Env.pm

    r2260 r2267  
    210210            pb_conf_add("$p->{$ENV{'PBPROJ'}}/.pbrc.yml");
    211211        } elsif (-f "$p->{$ENV{'PBPROJ'}}/.pbrc") {
    212             pb_conf_update_v0("$p->{$ENV{'PBPROJ'}}/.pbrc","$p->{$ENV{'PBPROJ'}}/.pbrc.yml");
     212            pb_vcs_conf_update_v0("$p->{$ENV{'PBPROJ'}}/.pbrc","$p->{$ENV{'PBPROJ'}}/.pbrc.yml");
    213213            pb_conf_add("$p->{$ENV{'PBPROJ'}}/.pbrc.yml");
    214214            my ($pburl) = pb_conf_get("pburl");
     
    387387        pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml") if (-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml");
    388388    } elsif (-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb") {
    389         pb_conf_update_v0("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb","$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml");
     389        pb_vcs_conf_update_v0("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb","$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml");
    390390        pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml") if (-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml");
    391391    }
  • devel/pb-modules/lib/ProjectBuilder/VCS.pm

    r2265 r2267  
    3636 
    3737our @ISA = qw(Exporter);
    38 our @EXPORT = qw(pb_vcs_export pb_vcs_get_uri pb_vcs_copy pb_vcs_checkout pb_vcs_up pb_vcs_checkin pb_vcs_isdiff pb_vcs_add pb_vcs_add_if_not_in pb_vcs_cmd pb_vcs_compliant);
     38our @EXPORT = qw(pb_vcs_export pb_vcs_get_uri pb_vcs_copy pb_vcs_checkout pb_vcs_up pb_vcs_checkin pb_vcs_isdiff pb_vcs_add pb_vcs_add_if_not_in pb_vcs_cmd pb_vcs_compliant pb_vcs_conf_update_v0);
    3939($VERSION,$REVISION) = pb_version_init();
    4040
     
    738738}
    739739
    740 
     740=item B<pb_vcs_conf_update_v0>
     741
     742This function transform the old configuration v0 file as first param into a new v1 one as second param  by calling a COnf.pm function and then adds the resulting file into VCS
     743
     744=cut
     745
     746
     747sub pb_vcs_conf_update_v0 {
     748
     749my $orig = shift;
     750my $dest = shift;
     751
     752pb_conf_update_v0($orig,$dest);
     753# Adding this new file to VCS (not removing the previous one)
     754my ($pburl) = pb_conf_get("pburl");
     755my ($scheme, $account, $host, $port, $path) = pb_get_uri($pburl->{$ENV{'PBPROJ'}});
     756pb_vcs_add_if_not_in($scheme,$dest);
     757
     758}
    741759=back
    742760
  • devel/pb/bin/pb

    r2262 r2267  
    10951095        $fyml =~ s/\.pb/.yml/;
    10961096        $fyml =~ s/\.pbrc/.pbrc.yml/;
    1097         pb_conf_update_v0($f,$fyml);
     1097        pb_vcs_conf_update_v0($f,$fyml);
    10981098    }
    10991099} elsif ($action =~ /^getconf$/) {
  • devel/pb/lib/ProjectBuilder/Filter.pm

    r2266 r2267  
    9595        my $fyml = $f;
    9696        $fyml =~ s/\.pbf/.yml/;
    97         pb_conf_update_v0($f,$fyml);
     97        pb_vcs_conf_update_v0($f,$fyml);
    9898        push(@ffiles, $fyml);
    9999    }
Note: See TracChangeset for help on using the changeset viewer.