Closed Bug 1850262 Opened 2 years ago Closed 1 year ago

Mercurial 6.6 is incompatible with some extensions

Categories

(Developer Services :: Mercurial: configwizard, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gzyfqh, Assigned: sheehan)

References

(Blocks 1 open bug)

Details

Attachments

(10 files)

3.63 KB, text/plain
Details
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Steps to reproduce:

On Ubuntu 22.04

  1. Use hg pull central && hg update to pull the latest code

  2. run ./mach bootstrap and select 2(irefox for Desktop)

  3. Would you like to run a configuration wizard to ensure Mercurial is
    optimally configured? (This will also ensure 'version-control-tools' is up-to-date) (Yn): y

  4. Trackback appears

Also, try to execute. /mach clobber and execute again. /mach bootstrap, Traceback still appears

Actual results:

** Unknown exception encountered with possibly-broken third-party extension "clang-format" (version N/A)
** which supports versions 5.3 of Mercurial.
** Please disable "clang-format" and try your action again.
** If that fixes the bug please report it to https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox%20Build%20System&component=Lint%20and%20Formatting
** Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
** absorb, clang-format, configwizard, evolve 11.0.2, firefoxtree, fsmonitor, histedit, js-format, push-to-try, rebase, show
Traceback (most recent call last):
File "/home/ho/.local/bin/hg", line 59, in <module>
dispatch.run()
File "/home/ho/.local/lib/python3.10/site-packages/mercurial/dispatch.py", line 143, in run
status = dispatch(req)
File "/home/ho/.local/lib/python3.10/site-packages/mercurial/dispatch.py", line 232, in dispatch
status = _rundispatch(req)
File "/home/ho/.local/lib/python3.10/site-packages/mercurial/dispatch.py", line 276, in _rundispatch
ret = _runcatch(req) or 0
File "/home/ho/.local/lib/python3.10/site-packages/mercurial/dispatch.py", line 457, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "/home/ho/.local/lib/python3.10/site-packages/mercurial/dispatch.py", line 467, in _callcatch
return scmutil.callcatch(ui, func)
File "/home/ho/.local/lib/python3.10/site-packages/mercurial/scmutil.py", line 153, in callcatch
return func()
File "/home/ho/.local/lib/python3.10/site-packages/mercurial/dispatch.py", line 447, in _runcatchfunc
return _dispatch(req)
File "/home/ho/.local/lib/python3.10/site-packages/mercurial/dispatch.py", line 1272, in _dispatch
return runcommand(
File "/home/ho/.local/lib/python3.10/site-packages/mercurial/dispatch.py", line 905, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/home/ho/.local/lib/python3.10/site-packages/mercurial/dispatch.py", line 1284, in _runcommand
return cmdfunc()
File "/home/ho/.local/lib/python3.10/site-packages/mercurial/dispatch.py", line 1270, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "/home/ho/.local/lib/python3.10/site-packages/mercurial/util.py", line 1881, in check
return func(*args, **kwargs)
File "/home/ho/.mozbuild/version-control-tools/hgext/configwizard/init.py", line 484, in configwizard
update_evolve(ui)
File "/home/ho/.mozbuild/version-control-tools/hgext/configwizard/init.py", line 978, in update_evolve
hgpull(ui, local_evolve_repo, REMOTE_EVOLVE_PATH, branch=(b"stable",))
File "/home/ho/.local/lib/python3.10/site-packages/mercurial/commands.py", line 5471, in pull
other = hg.peer(repo, opts, path, remotehidden=opts[b'remote_hidden'])
KeyError: b'remote_hidden'

Your system should be ready to build Firefox for Desktop!

Expected results:

. /mach bootstrap running normally

Executing ./mach vcs-setup also cannot solve the problem

Component: Bootstrap Configuration → Mercurial: configwizard
Product: Firefox Build System → Developer Services

Seeing this too on MacOS.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file vcs-setup log
I think there's a general problem with the version-control-tools extensions and Mercurial 6.6 (maybe earlier sub-versions as well). I was seeing issues like this which were causing pulls to fail. I disabled all my extensions, and then tried running `./mach vcs-setup`, but that failed because configwizard isn't working either. Connor, could someone take a look please? I think this might get more common as developers upgrade.
Blocks: mach-busted
Flags: needinfo?(sheehan)
Summary: Unknown exception encountered with possibly-broken third-party extension "clang-format" (version N/A) → Unknown exception encountered with possibly-broken third-party extensions "clang-format" (version N/A) & config-wizard

I'll have fixes up for this later today.

Assignee: nobody → sheehan
Flags: needinfo?(sheehan)

Okay so I have fixed the issues with configwizard and firefoxtree. However once those issues are fixed, Mercurial 6.6 breaks the fsmonitor extension. There is a fix in the core repo that hasn't made it into a release yet. I'm chatting with upstream about the timeline for a dot release.

For now I think we need to recommend developers stay on Mercurial 6.5.

Summary: Unknown exception encountered with possibly-broken third-party extensions "clang-format" (version N/A) & config-wizard → Mercurial 6.6 is incompatible with some extensions
Duplicate of this bug: 1866602

safehasattr requires str instead of bytes in newer Mercurials.

The pager code is a compatibility shim for old
versions of Mercurial where pager support was enabled
as an extension. We have long since been on Mercurials
where pager support is builtin.

Depends on D195267

The color setup step handled adding or removing the
color extension from users hgrc files after support
for colors was moved from an extension into core Mercurial.
We have long been using Mercurials with built in colors
support, so remove this step and the associated test.

Depends on D195268

Using str has been supported since at least Mercurial 6.1,
which is the minimum supported version. We are now seeing a
deprecation warning for using bytes in this function with
a warning about removing in Mercurial 6.7+, so switch all
usages over to str now.

Depends on D195269

The change from unstable to orphan required some compatibility
logic to detect and automatically upgrade on older versions of
Mercurial. As of now everyone should be using the newest version
of the revset, so remove the logic around the old keyword.

Depends on D195270

Evolve support started with Mercurial 4.3. Everyone should be on
a version of hg that supports evolve by now, so remove this compatibility
warning message.

Depends on D195271

Cloning from the old URL works, but a message about the
real URL being at another location is printed in the output.
Update to the new URL for the evolve repo.

Depends on D195272

Mercurial 6.6 added a --remote-hidden flag to hg pull.
Add this flag to the hg.pull call as a keyword argument
to avoid a KeyError in Mercurial.

Depends on D195273

shutil.which complains about using bytes as it attempts
to concatenate the bytes value to a str path under the
hood. Change the variants of Python we are looking for from
bytes to str and then encode the desired variant before
returning.

Depends on D195274

Pushed by cosheehan@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/e021d86202fd
configwizard: use str in safehasattr instead of bytes r=zeid
https://hg.mozilla.org/hgcustom/version-control-tools/rev/86c9234e63fe
configwizard: remove pager setup step and tests r=zeid
https://hg.mozilla.org/hgcustom/version-control-tools/rev/13c8452d9dff
configwizard: remove color setup step r=zeid
https://hg.mozilla.org/hgcustom/version-control-tools/rev/6222cdf80016
hgext: use str in wrapfunction and unwrapfunction r=zeid
https://hg.mozilla.org/hgcustom/version-control-tools/rev/31d43969255e
configwizard: remove compatibility shim for old wip alias r=zeid
https://hg.mozilla.org/hgcustom/version-control-tools/rev/6cdbd7a8c666
configwizard: remove evolve compatibility check for older Mercurials r=zeid
https://hg.mozilla.org/hgcustom/version-control-tools/rev/1c04726eb1c9
configwizard: update evolve repo URL r=zeid
https://hg.mozilla.org/hgcustom/version-control-tools/rev/166962a71d72
configwizard: add remote_hidden kwarg to hg.pull call r=zeid
https://hg.mozilla.org/hgcustom/version-control-tools/rev/06a349ba2b4e
format-ext: use str in shutil.which r=zeid

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: