mirror of https://github.com/golang/go.git
dashboard: fix -commit for new xml package
R=golang-dev, r CC=golang-dev https://golang.org/cl/5571046
This commit is contained in:
parent
ce2b0c0bcb
commit
c1b4be6a4d
|
|
@ -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) {
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue