Closed Bug 1362547 Opened 7 years ago Closed 7 years ago

When using mercurial 4.2, mercurial-setup should not enable color and pager extensions

Categories

(Developer Services :: Mercurial: configwizard, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Alex_Gaynor, Assigned: gps)

References

Details

Attachments

(4 files)

They're on by default now, hurrah! They can be omitted from the |extensions| section of |.hgrc| now!
Yes they can!

Thanks for filing the bug: I was meaning to give mercurial-setup a refresh for the 4.2 world.
Blocks: hg42
Assignee: nobody → gps
Status: NEW → ASSIGNED
Comment on attachment 8902022 [details]
configwizard: bump non-legacy version to 4.3.2 (bug 1362547);

https://reviewboard.mozilla.org/r/173420/#review179062
Attachment #8902022 - Flags: review?(agaynor) → review+
Comment on attachment 8902023 [details]
configwizard: extract color checking to own function (bug 1362547);

https://reviewboard.mozilla.org/r/173422/#review179064
Attachment #8902023 - Flags: review?(agaynor) → review+
Comment on attachment 8902024 [details]
configwizard: delete color extension on Mercurial 4.2+ (bug 1362547);

https://reviewboard.mozilla.org/r/173424/#review179066

::: hgext/configwizard/__init__.py:582
(Diff revision 1)
> +        ext = cw.c.get('extensions')
> +        if 'color' in ext:

I think this should either be `ext = cw.c["extensions"]` or `ext = cw.c.get("extensions", {})`. Right now if `"extensions"` isn't in `cw.c` the next line will fail with a `TypeError`. (Unless `cw.c` does something special and I didn't realize it).
Attachment #8902024 - Flags: review?(agaynor) → review+
Comment on attachment 8902025 [details]
configwizard: remove pager configs on Mercurial 4.2+ (bug 1362547);

https://reviewboard.mozilla.org/r/173426/#review179068

::: hgext/configwizard/__init__.py:802
(Diff revision 1)
> -    if ui.hasconfig('extensions', 'pager') or 'pager' in cw.c.get('extensions', {}):
> +    if not pager_builtin and (ui.hasconfig('extensions', 'pager') or
> +                              'pager' in cw.c.get('extensions', {})):

Is this right? The condition seems backwards, shouldn't it be `if pager_builtin or ui.hasconfig ...`?
Comment on attachment 8902024 [details]
configwizard: delete color extension on Mercurial 4.2+ (bug 1362547);

https://reviewboard.mozilla.org/r/173424/#review179066

> I think this should either be `ext = cw.c["extensions"]` or `ext = cw.c.get("extensions", {})`. Right now if `"extensions"` isn't in `cw.c` the next line will fail with a `TypeError`. (Unless `cw.c` does something special and I didn't realize it).

Good catch. Will fix in flight.
Comment on attachment 8902025 [details]
configwizard: remove pager configs on Mercurial 4.2+ (bug 1362547);

https://reviewboard.mozilla.org/r/173426/#review179068

> Is this right? The condition seems backwards, shouldn't it be `if pager_builtin or ui.hasconfig ...`?

There is some subtle wonkiness going on. I'll update the inline comment.
Attachment #8902025 - Flags: review?(agaynor) → review?(glob)
Comment on attachment 8902025 [details]
configwizard: remove pager configs on Mercurial 4.2+ (bug 1362547);

https://reviewboard.mozilla.org/r/173426/#review211658

lgtm

::: hgext/configwizard/__init__.py:738
(Diff revision 2)
>          _promptnativeextension(ui, cw, 'fsmonitor', FSMONITOR_INFO)
>      else:
>          ui.write(FSMONITOR_NOT_AVAILABLE)
>  
>  
> -def _checkwip(ui, cw):
> +def _checkwip(ui, cw, hg_version):

hg_version isn't used by _checkwip
Attachment #8902025 - Flags: review?(glob) → review+
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/9a51304b9e57
configwizard: bump non-legacy version to 4.3.2 ; r=Alex_Gaynor
https://hg.mozilla.org/hgcustom/version-control-tools/rev/6f3f7bfca11c
configwizard: extract color checking to own function ; r=Alex_Gaynor
https://hg.mozilla.org/hgcustom/version-control-tools/rev/86eb6bc4e237
configwizard: delete color extension on Mercurial 4.2+ ; r=Alex_Gaynor
https://hg.mozilla.org/hgcustom/version-control-tools/rev/9d3c379e339a
configwizard: remove pager configs on Mercurial 4.2+ ; r=glob
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Attachment #8902025 - Flags: review?(agaynor)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: