Fix echangelog to properly identify added ebuilds. (Bug #176337)
authorfuzzyray <fuzzyray@gentoo.org>
Fri, 7 Nov 2008 22:11:19 +0000 (22:11 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Fri, 7 Nov 2008 22:11:19 +0000 (22:11 -0000)
svn path=/; revision=518

trunk/src/echangelog/echangelog

index 3a5ac5ba39c30be16d07850e99c40a8fd1bd924b..81d6e108e79cd0f036eb151d14fe8401f5d5c4b9 100644 (file)
@@ -333,6 +333,18 @@ if (@ebuilds) {
 }
 close C;
 
+# Subversion diff doesn't identify new versions. So use the status command
+if (($vcs eq "svn") and (@ebuilds)) {
+       open C, $vcs{$vcs}{status}." @ebuilds 2>&1 |" or die "Can't run: ".$vcs{$vcs}{status}."$!\n";
+       $_ = <C>;
+       while (defined $_) {
+               if (/^A\s*(\s{1}[^\s]*)\.ebuild/) {
+                       push @new_versions, $1;
+               }
+               $_ = <C>;
+       }
+}
+
 # When a package move occurs, the versions appear to be new even though they are
 # not.  Trim them from @new_versions in that case.
 @new_versions = grep { $text !~ /^\*\Q$_\E\s/m } @new_versions;