View | Details | Raw Unified
Collapse All | Expand All

(-) /files/echangelog (-7 / +19 lines)
 Lines 47-53    Link Here 
}
}
# Figure out what has changed around here
# Figure out what has changed around here
if (-e "CVS/Entries") {
open C, 'cvs -fn up 2>&1 |' or die "Can't run cvs -fn up: $!\n";
open C, 'cvs -fn up 2>&1 |' or die "Can't run cvs -fn up: $!\n";
} elsif (-e ".svn/entries") {
open C, 'svn st 2>&1 |' or die "Can't run svn st: $!\n";
}
while (<C>) {
while (<C>) {
    if (/^C (\S+)/) {
    if (/^C (\S+)/) {
        push @conflicts, $1; 
        push @conflicts, $1; 
 Lines 56-62    Link Here 
        push @unknown, $1;
        push @unknown, $1;
        $actions{$1} = '+';
        $actions{$1} = '+';
        next;
        next;
    } elsif (/^([ARM]) (\S+)/) {
    } elsif (/^([ARM]) *(\S+)/) {
        push @files, $2;
        push @files, $2;
        ($actions{$2} = $1) =~ tr/ARM/+-/d;
        ($actions{$2} = $1) =~ tr/ARM/+-/d;
    }
    }
 Lines 84-90    Link Here 
# out above)
# out above)
if (@unknown) {
if (@unknown) {
    print STDERR <<EOT;
    print STDERR <<EOT;
Cvs reports the following unknown files.  Please use "cvs add" before
Cvs reports the following unknown files.  Please use "cvs/svn add" before
running echangelog, or remove the files in question.
running echangelog, or remove the files in question.
EOT
EOT
    print STDERR map "? $_\n", @unknown;
    print STDERR map "? $_\n", @unknown;
 Lines 180-189    Link Here 
@ebuilds = grep /\.ebuild$/, @files;
@ebuilds = grep /\.ebuild$/, @files;
@files = grep !/\.ebuild$/, @files;
@files = grep !/\.ebuild$/, @files;
if (@ebuilds) {
if (@ebuilds) {
    if (-e "CVS/Entries") {
    open C, "cvs -f diff -U0 @ebuilds 2>&1 |" or die "Can't run cvs diff: $!\n";
    open C, "cvs -f diff -U0 @ebuilds 2>&1 |" or die "Can't run cvs diff: $!\n";
    } elsif (-e ".svn/entries") {
    open C, 'svn --force diff @ebuilds 2>&1 |' or die "Can't run svn diff: $!\n";
    }
    $_ = <C>;
    $_ = <C>;
    while (defined $_) {
    while (defined $_) {
        if (/^cvs diff: (([^\/]*?)\.ebuild) was removed/) { 
        if (/^cvs\/svn diff: (([^\/]*?)\.ebuild) was removed/) { 
            push @files, $1;
            push @files, $1;
        }
        }
        elsif (/^Index: (([^\/]*?)\.ebuild)\s*$/) { 
        elsif (/^Index: (([^\/]*?)\.ebuild)\s*$/) { 
 Lines 207-217    Link Here 
            # and we have the next line in $_ for processing
            # and we have the next line in $_ for processing
            next;
            next;
        }
        }
        elsif (/^cvs.*?: (([^\/]*?)\.ebuild) is a new entry/) { 
        elsif (/^cvs\/svn.*?: (([^\/]*?)\.ebuild) is a new entry/) { 
            push @files, $1;
            push @files, $1;
            push @new_versions, $2;  # new ebuild, will create a new entry
            push @new_versions, $2;  # new ebuild, will create a new entry
        }
        }
        # other cvs output is ignored
        # other cvs/svn output is ignored
        $_ = <C>;
        $_ = <C>;
    }
    }
}
}
 Lines 230-236    Link Here 
    print STDERR "**\n";
    print STDERR "**\n";
    print STDERR "** NOTE: No non-trivial changed files found.  Normally echangelog\n";
    print STDERR "** NOTE: No non-trivial changed files found.  Normally echangelog\n";
    print STDERR "** should be run after all affected files have been added and/or\n";
    print STDERR "** should be run after all affected files have been added and/or\n";
    print STDERR "** modified.  Did you forget to cvs add?\n";
    print STDERR "** modified.  Did you forget to cvs/svn add?\n";
    print STDERR "**\n";
    print STDERR "**\n";
    @files = sort sortfunc @trivial;
    @files = sort sortfunc @trivial;
    @files = qw/ChangeLog/ unless @files;  # last resort to put something in the list
    @files = qw/ChangeLog/ unless @files;  # last resort to put something in the list
 Lines 362-368    Link Here 
# The text will be added just like with any other ChangeLog below.  
# The text will be added just like with any other ChangeLog below.  
# Add the new ChangeLog to cvs before continuing.
# Add the new ChangeLog to cvs before continuing.
if (open F, "CVS/Entries") {
if (open F, "CVS/Entries") {
    system("cvs -f add ChangeLog") unless (scalar grep /^\/ChangeLog\//, <F>);
    system("cvs -f add ChangeLcg") unless (scalar grep /^\/ChangeLog\//, <F>);
} elsif (open F, ".svn/entries") {
    system("svn --force add ChangeLog") unless (scalar grep /^\/ChangeLog\//, <F>);
}
}
# vim:sw=4 ts=8 expandtab
# vim:sw=4 ts=8 expandtab