Closed Bug 1392183 Opened 7 years ago Closed 7 years ago

migrate advertise-upgrade hook to check

Categories

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

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

Details

Attachments

(2 files, 1 obsolete file)

      No description provided.
Comment on attachment 8899496 [details]
hooks: fix devel-warn for specifying a default value for a registered config item (bug 1392183)

https://reviewboard.mozilla.org/r/170772/#review176056

::: pylib/mozhg/mozhg/util.py:53
(Diff revision 1)
>      if not repo_root.endswith('/'):
>          repo_root += '/'
>  
>      d = {
>          'firefox': is_firefox_repo(repo),
> -        'publishing': repo.ui.configbool('phases', 'publish', True),
> +        'publishing': repo.ui.configbool('phases', 'publish'),

Per IRC conversation, this is unsafe for Mercurial less than 4.3. It is best to make the developer warning output in the .t test optional by adding a ``(?)`` at the end of the line. We can drop that and make this code change once we require 4.3+.
Attachment #8899496 - Flags: review?(gps) → review-
Comment on attachment 8899497 [details]
hooks: add support for changegroup hooks (bug 1392183)

https://reviewboard.mozilla.org/r/170774/#review176058

Seems reasonable. We may want some hooks to run during pull or strip. So that code may need to get refactored eventually. But it was an existing problem and not worth dealing with until it poses a problem.
Attachment #8899497 - Flags: review?(gps) → review+
Comment on attachment 8899498 [details]
hooks: migrate advertise-upgrade hook to ChangeGroupCheck (bug 1392183)

https://reviewboard.mozilla.org/r/170776/#review176060

This looks great aside from the installing an ancient Mercurial bit.

::: testing/vcttesting/environment.py:107
(Diff revision 1)
>      """Install supported Mercurial versions in a central location."""
> -    VERSIONS = [
> +
> +    # Version 3.4.2 is not supported, but is used for tests that require old,
> +    # unsupported clients.
> +    VERSIONS = (
> +        '3.4.2',

Eww. I'm pretty sure you can get the desired test coverage on modern Mercurial installs by using ``--config devel.legacy.exchange=bundle1``. I'm not sure which version introduced that though. You can guard with an ``#if hgXX+`` if it doesn't work in 3.8.4. (Although, we should be removing 3.8 and 3.9 per our deprecation policy.)
Attachment #8899498 - Flags: review?(gps) → review-
Attachment #8899496 - Attachment is obsolete: true
Comment on attachment 8899498 [details]
hooks: migrate advertise-upgrade hook to ChangeGroupCheck (bug 1392183)

https://reviewboard.mozilla.org/r/170776/#review176626

Huzzah!
Attachment #8899498 - Flags: review?(gps) → review+
Pushed by bjones@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/3980028c5f19
hooks: add support for changegroup hooks r=gps
https://hg.mozilla.org/hgcustom/version-control-tools/rev/9cf56a1f7744
hooks: migrate advertise-upgrade hook to ChangeGroupCheck r=gps
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/f254a80cbc80
ansible/hg-ssh: remove advertise upgrade hook from global hgrc
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: