View | Details | Raw Unified
Collapse All | Expand All

(-) /usr/bin/echangelog.orig (-4 / +14 lines)
 Lines 46-52    Link Here 
   $vcs = "cvs";
   $vcs = "cvs";
} elsif ( -d '.svn' ) {
} elsif ( -d '.svn' ) {
    $vcs = "svn";
    $vcs = "svn";
} elsif ( open GIT, "git rev-parse --git-dir |" ) {
} elsif ( -d '/usr/bin/git' and open GIT, "git rev-parse --git-dir |" ) {
    $vcs = "git";
    $vcs = "git";
    close GIT;
    close GIT;
} else {
} else {
 Lines 305-311    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 $vcs 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 435-441    Link Here 
# Okay, now we have a starter ChangeLog to work with.
# Okay, now we have a starter ChangeLog to work with.
# 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 vcs, maybe it already is added, but who cares right?
# Add the new ChangeLog to vcs before continuing.
system("$vcs{$vcs}{add} ChangeLog 2>&1 >> /dev/null")
if ($vcs eq "cvs") {
    if (open F, "CVS/Entries") {
        system("cvs -f add ChangeLog") unless (scalar grep /^\/ChangeLog\//, <F>);
    }
} elsif ($vcs eq "svn") {
    if (open F, ".svn/entries") {
        system("svn add ChangeLog") unless (scalar grep /^ChangeLog$/, <F>);
    }
} else {
    system("$vcs{$vcs}{add} ChangeLog 2>&1 >> /dev/null");
}
# vim:sw=4 ts=8 expandtab
# vim:sw=4 ts=8 expandtab