diff options
| author | fuzzyray <fuzzyray@gentoo.org> | 2007-05-11 05:18:09 +0000 |
|---|---|---|
| committer | fuzzyray <fuzzyray@gentoo.org> | 2007-05-11 05:18:09 +0000 |
| commit | 17a76b27b9e4f46b6bc5490a201a1e875bd66437 (patch) | |
| tree | 7568a91ccd852594815ed6263d018cd9865531ad /trunk/src | |
| parent | 8ffc8fb413e0184185f21688242f6b0103dc7d4f (diff) | |
| download | gentoolkit-17a76b27b9e4f46b6bc5490a201a1e875bd66437.tar.gz | |
Add patch from genstef to fix issues from Bug 176337
svn path=/; revision=400
Diffstat (limited to 'trunk/src')
| -rw-r--r-- | trunk/src/echangelog/echangelog | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/trunk/src/echangelog/echangelog b/trunk/src/echangelog/echangelog index 604b77f..3e86860 100644 --- a/trunk/src/echangelog/echangelog +++ b/trunk/src/echangelog/echangelog @@ -46,7 +46,7 @@ if ( -d "CVS" ) { $vcs = "cvs"; } elsif ( -d '.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"; close GIT; } else { @@ -305,7 +305,7 @@ unless (@files) { print STDERR "**\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 "** modified. Did you forget to cvs add?\n"; + print STDERR "** modified. Did you forget to $vcs add?\n"; print STDERR "**\n"; @files = sort sortfunc @trivial; @files = qw/ChangeLog/ unless @files; # last resort to put something in the list @@ -435,7 +435,17 @@ rename 'ChangeLog.new', 'ChangeLog' or die "Can't rename ChangeLog.new: $!\n"; # Okay, now we have a starter ChangeLog to work with. # 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? -system("$vcs{$vcs}{add} ChangeLog 2>&1 >> /dev/null") +# Add the new ChangeLog to vcs before continuing. +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 |
