mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2010-03-30 02:58 am

[vcv] Prohibit Conditional Declarations (backend cleanup)

[commit: http://hg.dwscoalition.org/vcv/rev/acde9c2f6f03]

http://bugs.dwscoalition.org/show_bug.cgi?id=2270

Remove postfix conditionals on lines that declare a variable to prevent Twilight Scope.

Patch by [personal profile] kareila.

Files modified:
  • bin/vcv
--------------------------------------------------------------------------------
diff -r e9dfcb3d84fd -r acde9c2f6f03 bin/vcv
--- a/bin/vcv	Mon Oct 26 05:05:44 2009 +0000
+++ b/bin/vcv	Tue Mar 30 02:58:18 2010 +0000
@@ -288,7 +288,7 @@ foreach my $p (@paths)
 
         if (-d $dir && ! $have_updated{$dir}) {
             chdir $dir or die "Can't cd to $dir\n";
-            my $extra = "(to r$REPO_REV{$root}) " if $REPO_REV{$root};
+            my $extra = $REPO_REV{$root} ? "(to r$REPO_REV{$root}) " : "";
             print "Updating CVS dir '$root' $extra...\n";
             if (-d ".svn") {
                 my $svninfo = `svn info`;
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
No Subject Icon Selected
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org