diff options
author | Sven Eden <yamakuzure@gmx.net> | 2018-05-15 17:49:48 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-05-16 07:05:05 +0200 |
commit | 8a1c279b7d47e3c6a9b95301569b811223ada750 (patch) | |
tree | 5b4720d20f632eef000ffe4b12823cd2610b43ef /pwx | |
parent | aa198ccbddd87297301bde8b1ba7580f23094981 (diff) |
check_tree.pl: While unpreparing shell: comment comment lines and do
not add '# ' prefixes to mask blocks in xml patch hunks.
Diffstat (limited to 'pwx')
-rwxr-xr-x | pwx/check_tree.pl | 5 |
1 files changed, 4 insertions, 1 deletions
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 |