Fix hg view if author's name contains unmatched quotes. (issue248)
authorThomas Arendsen Hein <thomas@intevation.de>
Wed, 17 May 2006 14:46:12 +0200
changeset 2297 936b615eb44e
parent 2296 6e8e3dd7976e
child 2298 4be9a79b49b1
child 2299 dacf718e1d48
Fix hg view if author's name contains unmatched quotes. (issue248) This was caused by the often seen Tcl list vs. string programming error.
contrib/hgk
--- a/contrib/hgk	Tue May 16 14:17:45 2006 -0700
+++ b/contrib/hgk	Wed May 17 14:46:12 2006 +0200
@@ -196,6 +196,7 @@
     }
     foreach line [split $contents "\n"] {
 	if {$inhdr} {
+	    set line [split $line]
 	    if {$line == {}} {
 		set inhdr 0
 	    } else {
@@ -203,11 +204,11 @@
 		if {$tag == "author"} {
 		    set x [expr {[llength $line] - 2}]
 		    set audate [lindex $line $x]
-		    set auname [lrange $line 1 [expr {$x - 1}]]
+		    set auname [join [lrange $line 1 [expr {$x - 1}]]]
 		} elseif {$tag == "committer"} {
 		    set x [expr {[llength $line] - 2}]
 		    set comdate [lindex $line $x]
-		    set comname [lrange $line 1 [expr {$x - 1}]]
+		    set comname [join [lrange $line 1 [expr {$x - 1}]]]
 		}
 	    }
 	} else {