Closed
Bug 1469673
Opened 7 years ago
Closed 7 years ago
Make hgmo extension compatible with Mercurial 4.6
Categories
(Developer Services :: Mercurial: hg.mozilla.org, enhancement)
Developer Services
Mercurial: hg.mozilla.org
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sheehan, Assigned: sheehan)
References
Details
Attachments
(4 files)
No description provided.
Comment 1•7 years ago
|
||
When running `hg serve ...`, there is a flag to send error output
to a file. When tests fail, they sometimes display output which
informs you there is an error, but is not useful in actually
fixing the problem (ie 500 Internal with no actual stack trace).
This commit ensures every call to `hg serve` includes an error
output file, and prints the contents of that file as output in
the test. With this patch in place any errors encountered by
the Mercurial server will be included in the test output.
Comment 2•7 years ago
|
||
This 4.6 compatibility change was overlooked in a previous commit
as the command is not actually tested in the firefoxreleases tests.
Instead the hgmo extension indirectly tests this command since the
firefoxreleases extension wraps the changesetentry function, and the
hgmo extension uses the firefoxreleases extension.
Comment 3•7 years ago
|
||
This commit ports the hgmo extension to be compatible with Mercurial
4.6. The main API changes are a change to the webcommand functionality.
Previously webcommand functions had the form `def wc(web, req, tmpl):`
with web being a requestcontext, req being a specific request and tmpl
being a templater object. The new API aggregates the req and tmpl
objects into the web object as web.req, and tmpl being generated
from a function.
WSGI responses are no longer automatically sent when the webcommand
functions return - instead the programmer must manually initiate a
response with the sendresponse method after specifying the body and
other fields.
The `repo[x]` syntax is being deprecated in future releases, in
anticipation of this we switch to using `scmutil.revsingle` in a few
places.
To determine if we are on a 4.6+ release we check for the `sendtemplate`
method on the requestcontext object whenever possible, and look for
`scmutil.revsingle` when this is unavailable.
Comment 4•7 years ago
|
||
Comment on attachment 8986885 [details]
hgmo: cat error log files in tests (Bug 1469673) r?gps
Gregory Szorc [:gps] has approved the revision.
https://phabricator.services.mozilla.com/D1754
Attachment #8986885 -
Flags: review+
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/4764d9c6f01f
hgmo: cat error log files in tests r=gps
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Comment 6•7 years ago
|
||
Comment on attachment 8986886 [details]
firefoxreleases: port webcommand to be Mercurial 4.6 compatible (Bug 1469673) r?gps
Gregory Szorc [:gps] has approved the revision.
https://phabricator.services.mozilla.com/D1755
Attachment #8986886 -
Flags: review+
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/6fc9f7431a52
firefoxreleases: port webcommand to be Mercurial 4.6 compatible r=gps
Comment 8•7 years ago
|
||
Comment on attachment 8986887 [details]
hgmo: enable compatibility with Mercurial 4.6 (Bug 1469673) r?gps
Gregory Szorc [:gps] has approved the revision.
https://phabricator.services.mozilla.com/D1756
Attachment #8986887 -
Flags: review+
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/46dac5109444
hgmo: enable compatibility with Mercurial 4.6 r=gps
Assignee | ||
Comment 11•7 years ago
|
||
After upgrading the Mercurial version running in the hgmo virtual
environments themselves, several missed API changes were detected.
The value returned from Mercurial's `wireproto.clonebundles` is
now a `bytesresponse` object, and the same data must be parsed
from the `data` attribute. `mercurial.wireproto` no longer exists,
and is therefore wrapped in an `import_module` call where necessary.
Parsing of request headers has moved to a different attribute, and
the need to append "HTTP" to the front of the desired header,
as well as the requirement to change any header "-" to "_" is
gone.
Comment 12•7 years ago
|
||
Comment on attachment 8996118 [details]
hgmo: add more Mercurial 4.6 compatibility changes (Bug 1469673) r?gps
Gregory Szorc [:gps] has approved the revision.
https://phabricator.services.mozilla.com/D2529
Attachment #8996118 -
Flags: review+
Comment 13•7 years ago
|
||
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/77cd613fd335
hgmo: add more Mercurial 4.6 compatibility changes r=gps
You need to log in
before you can comment on or make changes to this bug.
Description
•