subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1849189 - /subversion/trunk/tools/dist/backport.pl
Date Tue, 18 Dec 2018 16:11:58 GMT
Author: danielsh
Date: Tue Dec 18 16:11:58 2018
New Revision: 1849189

URL: http://svn.apache.org/viewvc?rev=1849189&view=rev
Log:
backport.pl interactive mode: Colorize section headers and entry headers.

The whole script is deprecated and should be rewritten in Python, and this
functionality is only used interactively and only by us, so don't bother going
through termcap/terminfo; just stowaway the xterm escape codes right in there.

* tools/dist/backport.pl
  (handle_entry, backport_main): Use bold yellow and bold green for headers.

Modified:
    subversion/trunk/tools/dist/backport.pl

Modified: subversion/trunk/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/backport.pl?rev=1849189&r1=1849188&r2=1849189&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Tue Dec 18 16:11:58 2018
@@ -1027,7 +1027,7 @@ sub handle_entry {
     # the "next PROMPT;" is; there's a "last;" at the end of the loop body.
     PROMPT: while (1) {
     say "";
-    say "\n>>> $entry{header_start}:";
+    say "\n\e\x5b32m>>> $entry{header_start}:\e\x5b0m";
     say join ", ", map { "r$_" } @{$entry{revisions}} if @{$entry{revisions}};
     say "$BRANCHES/$entry{branch}" if $entry{branch};
     say "--accept=$entry{accept}" if $entry{accept};
@@ -1196,7 +1196,7 @@ sub backport_main {
     given ($lines[0]) {
       # Section header
       when (/^[A-Z].*:$/i) {
-        say "\n\n=== $lines[0]" unless $YES;
+        say "\n\n\e\x5b33m\e\x5b1m=== $lines[0]\e\x5b0m" unless $YES;
         $in_approved = $lines[0] =~ /^Approved changes/;
       }
       # Comment



Mime
View raw message