Closed Bug 1485874 Opened 6 years ago Closed 6 years ago

Make hgmo extension compatible with Mercurial 4.7

Categories

(Developer Services :: Mercurial: hg.mozilla.org, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheehan, Assigned: sheehan)

References

Details

Attachments

(9 files)

95.51 KB, text/plain
Details
46 bytes, text/x-phabricator-request
gps
: review+
Details | Review
46 bytes, text/x-phabricator-request
gps
: review+
Details | Review
46 bytes, text/x-phabricator-request
gps
: review+
Details | Review
46 bytes, text/x-phabricator-request
gps
: review+
Details | Review
46 bytes, text/x-phabricator-request
gps
: review+
Details | Review
46 bytes, text/x-phabricator-request
gps
: review+
Details | Review
46 bytes, text/x-phabricator-request
gps
: review+
Details | Review
46 bytes, text/x-phabricator-request
Details | Review
The tests are failing under Mercurial 4.7. Looks like lots of work to do here. I've attached the logs separately as they are quite long.
I expect most issues with hgmo will be around templating in hgweb. Essentially, all data structures fed into the templating layer should be using wrapper types instead of e.g. straight lists.
I decided to just wrap the end list instead of making this a
generator as the command is legacy and it was faster.
We use the `repo[x]` syntax in several places throughout the
hgmo extension. Using that syntax for certain use cases is
no longer supported. The recommended methods to use are found
in the `scmutil` module.
Leftover from removing pre-4.6 compatibility code.
This commit adds an `automationrelevance` template to the `json`
template, allowing us to send the output of the `automationrelevance`
webcommand through the template layer instead of streaming
JSON directly. Due to this change, output from the raw
HTTP endpoint is no longer nicely indented. We now send the
response to a body file and then use `json.tool` to format
the output.
This lets us pass them to the template layer as a `mappinggenerator`
and brings us closer to 4.7 compatibility.
The `repoinfo` HTML template needs the `archives` field to be
set to properly render the navbar on the page, yet we aren't
sending anything to the templater to display. Under Mercurial
4.7 this causes a 500 to be thrown, so let's send this now.
After applying the series, we are compatible with Mercurial
4.7 on this extension.
Assignee: nobody → sheehan
Status: NEW → ASSIGNED
Comment on attachment 9011646 [details]
hgmo: wrap `csets` field as a `templateutil.mappinglist` (Bug 1485874) r?gps

Gregory Szorc [:gps] has approved the revision.
Attachment #9011646 - Flags: review+
Comment on attachment 9011647 [details]
hgmo: get context using `scmutil` functions (Bug 1485874) r?gps

Gregory Szorc [:gps] has approved the revision.
Attachment #9011647 - Flags: review+
Comment on attachment 9011648 [details]
hgmo: remove unused variable (Bug 1485874) r?gps

Gregory Szorc [:gps] has approved the revision.
Attachment #9011648 - Flags: review+
Comment on attachment 9011649 [details]
hgmo: add `automationrelevance` JSON template (Bug 1485874) r?gps

Gregory Szorc [:gps] has approved the revision.
Attachment #9011649 - Flags: review+
Comment on attachment 9011650 [details]
hgmo: create bugs, reviewers, backouts fields with generators (Bug 1485874) r?gps

Gregory Szorc [:gps] has approved the revision.
Attachment #9011650 - Flags: review+
Comment on attachment 9011651 [details]
hgmo: send archives info to template layer in `repoinfo` webcommand (Bug 1485874) r?gps

Gregory Szorc [:gps] has approved the revision.
Attachment #9011651 - Flags: review+
Comment on attachment 9011652 [details]
hgmo: mark as compatible with Mercurial 4.7 (Bug 1485874) r?gps

Gregory Szorc [:gps] has approved the revision.
Attachment #9011652 - Flags: review+
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/01e4a82aa147
hgmo: wrap `csets` field as a `templateutil.mappinglist` r=gps
https://hg.mozilla.org/hgcustom/version-control-tools/rev/a772b50b7dd4
hgmo: get context using `scmutil` functions r=gps
https://hg.mozilla.org/hgcustom/version-control-tools/rev/9ebceb9a4da1
hgmo: remove unused variable r=gps
https://hg.mozilla.org/hgcustom/version-control-tools/rev/51c6ff20afac
hgmo: add `automationrelevance` JSON template r=gps
https://hg.mozilla.org/hgcustom/version-control-tools/rev/090cffc7f71c
hgmo: create bugs, reviewers, backouts fields with generators r=gps
https://hg.mozilla.org/hgcustom/version-control-tools/rev/8a320b3c78e7
hgmo: send archives info to template layer in `repoinfo` webcommand r=gps
https://hg.mozilla.org/hgcustom/version-control-tools/rev/7ca5514f709c
hgmo: mark as compatible with Mercurial 4.7 r=gps
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Keywords: leave-open
Resolution: --- → FIXED
Overlooked this when making the hgmo extension compatible
with Mercurial 4.7.
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/f607eb3657e1
hgtemplates: add automationrelevance template to `json.patch` r=gps
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: