subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1569243 - /subversion/trunk/tools/dist/backport.pl
Date Tue, 18 Feb 2014 09:26:04 GMT
Author: danielsh
Date: Tue Feb 18 09:26:03 2014
New Revision: 1569243

URL: http://svn.apache.org/r1569243
Log:
backport.pl: renormalize: Permit whitespace lines inside entries.

Suggested by: breser

* tools/dist/backport.pl
  (renormalize_STATUS): As above.
    While here, extend commentary.

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=1569243&r1=1569242&r2=1569243&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Tue Feb 18 09:26:03 2014
@@ -596,13 +596,24 @@ sub check_local_mods_to_STATUS {
 
 sub renormalize_STATUS {
   my $vimscript = <<'EOVIM';
-:"" Strip trailing whitespace.
-:%s/\s*$//
+:"" Strip trailing whitespace before entries and section headers, but not
+:"" inside entries (e.g., multi-paragraph Notes: fields).
+:""
+:"" Since an entry is always followed by another entry, section header, or EOF,
+:"" there is no need to separately strip trailing whitespace from lines following
+:"" entries.
+:%s/\v\s+\n(\s*\n)*\ze(\s*[*]|\w)/\r\r/g
+
 :"" Ensure there is exactly one blank line around each entry and header.
+:""
+:"" First, inject a new empty line above and below each entry and header; then,
+:"" squeeze runs of empty lines together.
 :0/^=/,$ g/^ *[*]/normal! O
 :g/^=/normal! o
 :g/^=/-normal! O
+:
 :%s/\n\n\n\+/\r\r/g
+
 :"" Save.
 :wq
 EOVIM



Mime
View raw message