Commit c1b4be6a authored by Russ Cox's avatar Russ Cox

dashboard: fix -commit for new xml package

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5571046
parent ce2b0c0b
...@@ -533,13 +533,13 @@ var logByHash = map[string]*HgLog{} ...@@ -533,13 +533,13 @@ var logByHash = map[string]*HgLog{}
// xmlLogTemplate is a template to pass to Mercurial to make // xmlLogTemplate is a template to pass to Mercurial to make
// hg log print the log in valid XML for parsing with xml.Unmarshal. // hg log print the log in valid XML for parsing with xml.Unmarshal.
const xmlLogTemplate = ` const xmlLogTemplate = `
<log> <Log>
<hash>{node|escape}</hash> <Hash>{node|escape}</Hash>
<parent>{parent|escape}</parent> <Parent>{parent|escape}</Parent>
<author>{author|escape}</author> <Author>{author|escape}</Author>
<date>{date|rfc3339date}</date> <Date>{date|rfc3339date}</Date>
<desc>{desc|escape}</desc> <Desc>{desc|escape}</Desc>
</log> </Log>
` `
// commitPoll pulls any new revisions from the hg server // commitPoll pulls any new revisions from the hg server
...@@ -587,7 +587,7 @@ func commitPoll(key, pkg string) { ...@@ -587,7 +587,7 @@ func commitPoll(key, pkg string) {
var logStruct struct { var logStruct struct {
Log []HgLog Log []HgLog
} }
err = xml.Unmarshal(strings.NewReader("<top>"+data+"</top>"), &logStruct) err = xml.Unmarshal(strings.NewReader("<Top>"+data+"</Top>"), &logStruct)
if err != nil { if err != nil {
log.Printf("unmarshal hg log: %v", err) log.Printf("unmarshal hg log: %v", err)
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment