Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
c1b4be6a
Commit
c1b4be6a
authored
Jan 23, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix -commit for new xml package
R=golang-dev, r CC=golang-dev
https://golang.org/cl/5571046
parent
ce2b0c0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
misc/dashboard/builder/main.go
misc/dashboard/builder/main.go
+8
-8
No files found.
misc/dashboard/builder/main.go
View file @
c1b4be6a
...
@@ -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
=
`
<
l
og>
<
L
og>
<
hash>{node|escape}</h
ash>
<
Hash>{node|escape}</H
ash>
<
parent>{parent|escape}</p
arent>
<
Parent>{parent|escape}</P
arent>
<
author>{author|escape}</a
uthor>
<
Author>{author|escape}</A
uthor>
<
date>{date|rfc3339date}</d
ate>
<
Date>{date|rfc3339date}</D
ate>
<
desc>{desc|escape}</d
esc>
<
Desc>{desc|escape}</D
esc>
</
l
og>
</
L
og>
`
`
// 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
+
"</t
op>"
),
&
logStruct
)
err
=
xml
.
Unmarshal
(
strings
.
NewReader
(
"<
Top>"
+
data
+
"</T
op>"
),
&
logStruct
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Printf
(
"unmarshal hg log: %v"
,
err
)
log
.
Printf
(
"unmarshal hg log: %v"
,
err
)
return
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment