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)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Swatinem, Assigned: Swatinem)

References

Details

Attachments

(2 files, 3 obsolete files)

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.)
Attached patch patch (obsolete) — Splinter Review
This was pretty straightforward.
Assignee: nobody → arpad.borsos
Status: NEW → ASSIGNED
Attachment #463276 - Flags: review?(ted.mielczarek)
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.
Blocks: 498055
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)
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 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+
Attachment #463302 - Attachment description: patch with files → patch with files [pushed: comment 7]
Attached patch tbpl patch (obsolete) — Splinter Review
works now
Attachment #463310 - Attachment is obsolete: true
Attachment #467349 - Flags: review?(mstange)
Attachment #463310 - Flags: review?(mstange)
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?
Attached patch tbpl patchSplinter Review
(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 on attachment 467367 [details] [diff] [review] tbpl patch Awesome.
Attachment #467367 - Flags: review?(mstange) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
This includes branch information too! \o/ I _think_ this lets us fix bug 466931
BTW it looks like this caused bug 588995 and possibly tickled a Minefield bug 589017 (the latter is not yet confirmed)
(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).
Blocks: 526159
Blocks: 564045
Blocks: 564349
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: