[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH: clean up verbose logging in diff proc
From: |
Ben Elliston |
Subject: |
PATCH: clean up verbose logging in diff proc |
Date: |
Sat, 20 Feb 2016 19:04:27 +1100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
The diff proc was calling verbose and then send_log, presumably from
before verbose got the -log option in 1995. This collapses those into
single calls to verbose -log. The newlines appended to the strings
are not necessary and lead to unnecessary whitespace in the log file.
Committed to trunk.
Cheers, Ben
2016-02-20 Ben Elliston <address@hidden>
* lib/utils.exp (diff): Replace calls to verbose followed by
send_log with a single call to verbose -log. Remove additional
newlines from the log messages.
diff --git a/lib/utils.exp b/lib/utils.exp
index fccb7e6..314fc2f 100644
--- a/lib/utils.exp
+++ b/lib/utils.exp
@@ -256,7 +256,7 @@ proc diff { file_1 file_2 } {
return 0
}
- verbose "# Diff'ing: ${file_1} ${file_2}\n" 1
+ verbose "# Diff'ing: ${file_1} ${file_2}" 1
set list_a ""
while { [gets ${file_a} line] != ${eof} } {
@@ -281,17 +281,10 @@ proc diff { file_1 file_2 } {
set line_a [lindex ${list_a} ${i}]
set line_b [lindex ${list_b} ${i}]
- # verbose "\t${file_1}: ${i}: ${line_a}\n" 3
- # verbose "\t${file_2}: ${i}: ${line_b}\n" 3
if {[string compare ${line_a} ${line_b}]} {
- verbose "line #${i}\n" 2
- verbose "\< ${line_a}\n" 2
- verbose "\> ${line_b}\n" 2
-
- send_log "line #${i}\n"
- send_log "\< ${line_a}\n"
- send_log "\> ${line_b}\n"
-
+ verbose -log "line #${i}" 2
+ verbose -log "\< ${line_a}" 2
+ verbose -log "\> ${line_b}" 2
set differences -1
}
}
signature.asc
Description: Digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- PATCH: clean up verbose logging in diff proc,
Ben Elliston <=