From 8a1c279b7d47e3c6a9b95301569b811223ada750 Mon Sep 17 00:00:00 2001 From: Sven Eden Date: Tue, 15 May 2018 17:49:48 +0200 Subject: [PATCH] check_tree.pl: While unpreparing shell: comment comment lines and do not add '# ' prefixes to mask blocks in xml patch hunks. --- pwx/check_tree.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pwx/check_tree.pl b/pwx/check_tree.pl index e3778cf8c..5a261e227 100755 --- a/pwx/check_tree.pl +++ b/pwx/check_tree.pl @@ -20,6 +20,7 @@ # 0.8.8 2018-05-08 sed, PrydeWorX Use Git::Wrapper to checkout the wanted commit in the upstream tree. # 0.8.9 2018-05-09 sed, PrydeWorX Add new option --create to create non-existing files. Needs --file. # Add new option --stay to to not reset back from --commit. +# 0.9.0 2018-05-15 sed, PrydeWorX Do not prefix mask block content in XML file patch hunks with a '# '. # ======================== # === Little TODO list === # ======================== @@ -995,8 +996,10 @@ sub check_masks { } # If this is a .pwx file, prefix all lines in non-else mask blocks with '# ' + # unless they are xml files. # -------------------------------------------------------------------------- $hFile{pwxfile} and $in_mask_block and (!$in_else_block) + and ( !( $hFile{target} =~ m/\.xml$/ ) ) and substr($$line, 1, 0) = "# "; } ## End of looping lines @@ -1847,7 +1850,7 @@ sub unprepare_shell { $is_block = 0; $is_else = 0; } elsif ($is_block && !$is_else - && ("# " ne substr($line, 0, 2)) + && ("# #" ne substr($line, 0, 3)) && (" * " ne substr($line, 0, 4)) ) { $hFile{source} =~ m/\.sym\.pwx$/ and $line = " * " . $line -- 2.30.2