Closed Bug 1470489 Opened 7 years ago Closed 7 years ago

Make pushlog and pushlog-legacy Mercurial 4.6 compatible

Categories

(Developer Services :: Mercurial: Pushlog, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheehan, Assigned: sheehan)

References

Details

Attachments

(5 files)

No description provided.
Similar to a few previous commits, this commit specifies an error log file for each `hg serve` instance and prints the contents of that file in the test output. This way any internal server errors can be read in the test results.
This commit enables Mercurial 4.6 compatibility for the pushlog-legacy extension. Most of the changes come from using the new `parsedrequest` object and its attributes. `mercurial.obsstore.precursors` was also renamed to `mercurial.obsstore.predecessors`.
Printing the error log of an `hg serve` process within the test is useful for debugging when things like "500 Internal" errors arise.
Comment on attachment 8987168 [details] pushlog-legacy: specify error log file and print contents in test (Bug 1470489) r?gps Gregory Szorc [:gps] has approved the revision. https://phabricator.services.mozilla.com/D1774
Attachment #8987168 - Flags: review+
Comment on attachment 8987169 [details] pushlog-legacy: make compatible with Mercurial 4.6 (Bug 1470489) r?gps Gregory Szorc [:gps] has approved the revision. https://phabricator.services.mozilla.com/D1775
Attachment #8987169 - Flags: review+
Comment on attachment 8987170 [details] pushlog: print error.log contents in tests (Bug 1470489) r?gps Gregory Szorc [:gps] has approved the revision. https://phabricator.services.mozilla.com/D1776
Attachment #8987170 - Flags: review+
After the changes to pushlog-legacy, the pushlog is compatible with Mercurial 4.6 without making any changes. There were some existing "# TRACKING hg46" comments which seem to have covered all the breaking changes.
Comment on attachment 8987173 [details] pushlog: mark as 4.6 compatible (Bug 1470489) r?gps Gregory Szorc [:gps] has approved the revision. https://phabricator.services.mozilla.com/D1778
Attachment #8987173 - Flags: review+
Pushed by gszorc@mozilla.com: https://hg.mozilla.org/hgcustom/version-control-tools/rev/d2093d1f0f25 pushlog-legacy: specify error log file and print contents in test r=gps
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Pushed by gszorc@mozilla.com: https://hg.mozilla.org/hgcustom/version-control-tools/rev/7c71a5f2ca7d pushlog-legacy: make compatible with Mercurial 4.6 r=gps
Pushed by gszorc@mozilla.com: https://hg.mozilla.org/hgcustom/version-control-tools/rev/0dd33d60b16a pushlog: print error.log contents in tests r=gps
It turns out the conditional test output added in previous commits for this bug was being generated due to the absence of a WSGI config in the `hg serve` instances. This config usually sets a `paths` config section, where local filesystem paths can be mapped to a web url under which the repo should be served. For example on hg.mo, we would map "/repo/hg/mozilla/" to "/", so that "/repo/hg/mozilla/mozilla-unified" would appear as "https://hg.mozilla.org/mozilla-unified" as a web facing url. This commit adds a `wsgiconfig` function to generate a config file which can be passed to the `hg serve` instance via the `--web-conf` option. As a result of this change, all urls referencing the serve instance without the local repo name have had the repo name appended (ie "https://localhost:$HGPORT" is now "https://localhost:$HGPORT/reponame"). After making this change, I noticed that the base URL on 4.6.2 no longer ended with a '/', which caused links to revisions and other resources to 404. This commit also fixes this by appending '/' to the variable that is later seeded into the `url` template keyword when running on 4.6+.
Comment on attachment 8993749 [details] pushlog: append '/' to `url` pushlog template keyword in 4.6+ (Bug 1470489) r?gps Gregory Szorc [:gps] has approved the revision. https://phabricator.services.mozilla.com/D2270
Attachment #8993749 - Flags: review+
Pushed by gszorc@mozilla.com: https://hg.mozilla.org/hgcustom/version-control-tools/rev/4274c7f6a43d pushlog: append '/' to `url` pushlog template keyword in 4.6+ r=gps
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: