Closed
Bug 584836
Opened 15 years ago
Closed 15 years ago
hg should generate a tbpl consumable json pushlog
Categories
(Tree Management Graveyard :: TBPL, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Swatinem, Assigned: Swatinem)
References
Details
Attachments
(2 files, 3 obsolete files)
|
12.59 KB,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
|
9.01 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
view-source:http://hg.mozilla.org/mozilla-central/json-pushes is a really good start, all it needs is the changeset details from view-source:http://hg.mozilla.org/mozilla-central/json-info?node=fb2120e5e3a2cc07db3253d94ac1a41861e89c81
Comment 1•15 years ago
|
||
As I mentioned in IRC, we want to keep the default json-pushes with the current data, but you could add a query parameter, like ?full=1 that adds the changeset info. (The current json-pushes is very fast as it doesn't have to consult the Hg repo, just the sqlite db.)
| Assignee | ||
Comment 2•15 years ago
|
||
This was pretty straightforward.
Assignee: nobody → arpad.borsos
Status: NEW → ASSIGNED
Attachment #463276 -
Flags: review?(ted.mielczarek)
Comment 3•15 years ago
|
||
Comment on attachment 463276 [details] [diff] [review]
patch
The releng folks would need the files, too, for bug 498055.
Not sure that I'm fond of having the changesets change sematics, but I don't have a recommendation that'd be backwards compat, either.
| Assignee | ||
Comment 4•15 years ago
|
||
Fair enough. Usually the number of changed files is quite manageable, I don't really know how the json size will look like for mega-merges like jm-fatvals.
Attachment #463276 -
Attachment is obsolete: true
Attachment #463302 -
Flags: review?(ted.mielczarek)
Attachment #463276 -
Flags: review?(ted.mielczarek)
| Assignee | ||
Comment 5•15 years ago
|
||
This is completely untested as long as the pushlog changes aren't deployed yet, but it should work, hopefully.
This also gets rid of pipePushlog.php, yay.
Attachment #463310 -
Flags: review?(mstange)
Comment 6•15 years ago
|
||
Comment on attachment 463302 [details] [diff] [review]
patch with files [pushed: comment 7]
I agree with Pike that it's unfortunate that /json-pushes and /json-pushes?full=1 aren't producing compatible output. I guess it's not terrible, though, because you can always check typeof(push["changesets"][i]) == "string" to handle both cases.
After you land this you'll need to file a Server Ops bug to get IT to update the production copy on hg.mozilla.org. (CC :aravind)
Attachment #463302 -
Flags: review?(ted.mielczarek) → review+
| Assignee | ||
Comment 7•15 years ago
|
||
Comment on attachment 463302 [details] [diff] [review]
patch with files [pushed: comment 7]
Pushed as: http://hg.mozilla.org/hgcustom/pushlog/rev/eb0b62294161
Filed IT Bug as bug 585882.
Attachment #463302 -
Attachment description: patch with files → patch with files [pushed: comment 7]
| Assignee | ||
Comment 8•15 years ago
|
||
works now
Attachment #463310 -
Attachment is obsolete: true
Attachment #467349 -
Flags: review?(mstange)
Attachment #463310 -
Flags: review?(mstange)
Comment 9•15 years ago
|
||
diff --git a/js/PushlogHTMLParser.js b/js/PushlogJSONParser.js
+ for(var i in data) {
Please leave a space between for/if/... and the opening bracket.
+ // I really don't want to mess around with moving tags
What are moving tags and why do they present a challenge?
+ var tags = $(tags).map(function(tag) {
I think this needs to be $(patch.tags).
+ // the json datasource returns the pushes in ASC order, the patches as well
Make this
// Revert the order because we want most recent pushes / patches to
// come first.
+ patches.unshift({rev: patch.node.substr(0,12), author: /([^<]+) /.exec(patch.author)[1],
Can you put the author extraction in its own line (and variable) and briefly explain the regex (e.g. "cut off before the email address", if that's correct)?
- return Config.baseURL + "php/pipePushlog.php?url=" + repoName + "/pushloghtml%3Fstartdate=" + startDate + "%26enddate=" + endDate;
+ return "http://hg.mozilla.org/" + repoName + "/json-pushes?full=1&startdate=" + startDate + "&enddate=" + endDate;
Do you know why we were using %3F and %26 before?
| Assignee | ||
Comment 10•15 years ago
|
||
(In reply to comment #9)
> + // I really don't want to mess around with moving tags
> What are moving tags and why do they present a challenge?
The tip tag is always on the most recent changeset. Its not a problem when we refresh the whole page but would be one when we only refresh the changing pushes.
> - return Config.baseURL + "php/pipePushlog.php?url=" + repoName +
> "/pushloghtml%3Fstartdate=" + startDate + "%26enddate=" + endDate;
> + return "http://hg.mozilla.org/" + repoName +
> "/json-pushes?full=1&startdate=" + startDate + "&enddate=" + endDate;
>
> Do you know why we were using %3F and %26 before?
urlescape so the php script gets them as ? and &
Other nits fixed
Attachment #467349 -
Attachment is obsolete: true
Attachment #467367 -
Flags: review?(mstange)
Attachment #467349 -
Flags: review?(mstange)
Comment 11•15 years ago
|
||
Comment on attachment 467367 [details] [diff] [review]
tbpl patch
Awesome.
Attachment #467367 -
Flags: review?(mstange) → review+
| Assignee | ||
Comment 12•15 years ago
|
||
http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/50320b7c2e16
With another fix to escape html in push descriptions.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 13•15 years ago
|
||
This includes branch information too! \o/
I _think_ this lets us fix bug 466931
Comment 14•15 years ago
|
||
BTW it looks like this caused bug 588995 and possibly tickled a Minefield bug 589017 (the latter is not yet confirmed)
Comment 15•15 years ago
|
||
(In reply to comment #14)
> BTW it looks like this caused bug 588995 and possibly tickled a Minefield bug
> 589017 (the latter is not yet confirmed)
Bug 589017 is actually a TBPL bug (which appears to work in Chrome because of a suspected bug in Chrome's JSON parser).
Comment 16•11 years ago
|
||
Updated•11 years ago
|
Product: Webtools → Tree Management
Updated•10 years ago
|
Product: Tree Management → Tree Management Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•