App-KGB

 view release on metacpan or  search on metacpan

lib/App/KGB/Client/CVS.pm  view on Meta::CPAN


    unless ($first_dir_in_commit) {
        close(MERGE);
        return undef;
    }

    return if fork();   # parent process exits

    #warn "$$ waiting\n";
    # wait for the merge file to settle
    while( time() - (stat(MERGE))[9] < 3 ) {
        sleep(1);
    }

    close(MERGE);
    open(MERGE, $merge_file) or die "Error reopening $merge_file: $!\n";
    unlink $merge_file or warn "Error removing $merge_file: $!\n";

    @changes = ();

    while ( defined( my $line = <MERGE> ) ) {

lib/App/KGB/Client/Git.pm  view on Meta::CPAN

                    "^$old" );
                push @commits,
                    $self->format_message(
                    $self->squash_msg_template,
                    branch       => $branch,
                    commit_id    => substr( $new, 0, 7 ),
                    author_login => $ENV{USER},
                    author_name  => $self->_get_full_user_name,
                    log          => sprintf(
                        '%d commits pushed, %s',
                        scalar(@commit_lines), $self->format_git_stat($stat),
                    ),
                    );
                warn "# $commits[-1]" if 0;
                $branch_has_commits{$branch} = 1;
            }
        }
        else {
            my @refs;
            for (@lines) {
                my ( $ref, @parents ) = split(/\s+/);

lib/App/KGB/Client/Git.pm  view on Meta::CPAN

                warn "$b branched at $branch_point" if 0 and $branch_point;
            }

            if ( $self->squash_threshold
                and scalar(@br_commits) > $self->squash_threshold )
            {
                my $log = sprintf( 'New branch with %d commits pushed',
                    scalar(@br_commits) );
                if ($branch_point) {
                    $log .= ', '
                        . $self->format_git_stat(
                        $self->_git->command(
                            'diff', '--shortstat', "$branch_point..$b"
                        )
                        );
                    $log .= " since ";
                    $log .= "$ref_branch{$branch_point}/"
                        if $ref_branch{$branch_point};
                    $log .= substr( $branch_point, 0, 7 );
                }
                push @commits,

script/kgb-add-project  view on Meta::CPAN

foreach ( @{ $yaml->{channels} } ) {
    Bless($_)->keys(
        [ sort { $a ne 'name' } keys %$_ ]
    );
}

my $outfh = \*STDOUT;
my ( $uid, $gid, $mode );

if ($save) {
    $uid  = ( stat($file) )[4];
    $gid  = ( stat($file) )[5];
    $mode = ( stat($file) )[2] & 07777;
    if ( $dir and -d $dir ) {
        $file = File::Spec->catdir($dir, "$prj.conf");
    }
    umask(~$mode & 0777);
    open( $outfh, '>', $file );
}

print $outfh YAML::Dump($yaml);

if ($save) {

script/kgb-bot  view on Meta::CPAN

    if ( -d $src ) {
        -r _ or die "'$src' is not readable\n";
        -x _ or die "'$src' is not usable (missing execute permission)\n";
        for ( sort <$src/*.conf> ) {
            my $c = parse_conf_file($_);

            eval { merge_conf_hash( $conf, $c ); 1 } or die "Error loading $_: $@";
        }
    }
    elsif ( -e $src ) {
        die "$src is world-readable\n" if ( stat($src) )[2] & 04;

        $conf = YAML::LoadFile($src)
            or die "Error loading config from $src\n";
    }
    else {
        die "'$src' does not exist\n";
    }

    if ( exists $conf->{include} ) {
        my $inc = $conf->{include};



( run in 1.412 second using v1.01-cache-2.11-cpan-49f99fa48dc )