From bbc9fd69806238e93bf9b1280bcd83d6a45e4dec Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Tue, 9 Apr 2013 17:19:07 -0500 Subject: [PATCH] bin/svn-wrapper: Misc fixes * Update the revision-line reg-ex to support the "(no author)" case. * Update the AWK usage to set 'FS' at run-time rather than using "awk -F...". It's more encapsulated this way and more easily extensible down the road. --- bin/svn-wrapper | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/svn-wrapper b/bin/svn-wrapper index 931a511..f46c149 100755 --- a/bin/svn-wrapper +++ b/bin/svn-wrapper @@ -75,9 +75,12 @@ function strip(str) { sub(/[ \t]+$/, "", str); return str; } -/^r[0-9]+ \| [A-Za-z]+/ { +/^r[0-9]+ \| [A-Za-z(]+/ { in_rev=1; - revnum=strip($1); author=strip($2); date=substr(strip($3), 0, 26); + FS="|"; + $0=$0 ""; + revnum=strip($1); author=strip($2); date=strip(substr($3, 0, 26)); + FS=" "; getline; if ($0 == "Changed paths:") { while ($0 != "") { @@ -113,7 +116,7 @@ case $1 in ;; ll) shift - exec svn log --stop-on-copy "$@" | awk -F"|" "${awk_svn_log_ll}" | $PAGER + exec svn log --stop-on-copy "$@" | awk "${awk_svn_log_ll}" | $PAGER ;; log) exec svn "$@" | $PAGER -- 2.45.2