Closed Bug 1389417 Opened 7 years ago Closed 7 years ago

"mach bootstrap" fails with Mercurial 4.3.1 with "AttributeError: 'firefoxtreesrepo' object has no attribute 'opener'"

Categories

(Firefox Build System :: General, defect)

56 Branch
defect
Not set
normal

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: whimboo, Assigned: gps)

References

Details

Attachments

(1 file)

I upgraded Mercurial locally to version 4.3.1 and now I'm getting the following error when running "mach bootstrap":

> Traceback (most recent call last):
>   File "/usr/local/bin/hg", line 45, in <module>
>     mercurial.dispatch.run()
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 81, in run
>     status = (dispatch(req) or 0) & 255
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 162, in dispatch
>     ret = _runcatch(req)
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 302, in _runcatch
>     return _callcatch(ui, _runcatchfunc)
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 310, in _callcatch
>     return scmutil.callcatch(ui, func)
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/scmutil.py", line 150, in callcatch
>     return func()
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 292, in _runcatchfunc
>     return _dispatch(req)
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/dispatch.py", line 858, in _dispatch
>     presetupfuncs=req.prereposetups)
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/hg.py", line 168, in repository
>     peer = _peerorrepo(ui, path, create, presetupfuncs=presetupfuncs)
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/extensions.py", line 322, in closure
>     return func(*(args + a), **kw)
>   File "/data/Users/henrik/.mozbuild/version-control-tools/hgext/firefoxtree/__init__.py", line 154, in peerorrepo
>     return orig(ui, path, *args, **kwargs)
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/hg.py", line 160, in _peerorrepo
>     hook(ui, obj)
>   File "/data/Users/henrik/.mozbuild/version-control-tools/hgext/firefoxtree/__init__.py", line 633, in reposetup
>     if not isfirefoxrepo(repo):
>   File "/data/Users/henrik/.mozbuild/version-control-tools/hgext/firefoxtree/__init__.py", line 149, in isfirefoxrepo
>     return repo.opener.exists('IS_FIREFOX_REPO')
> AttributeError: 'firefoxtreesrepo' object has no attribute 'opener'

The version-control-tools repository is up-to-date.
Flags: needinfo?(gps)
And I missed the following output:

CalledProcessError: Command '['/usr/local/bin/hg', 'update', '-r', '@']' returned non-zero exit status 1

  File "/Volumes/data/code/gecko/python/mozboot/mozboot/mach_commands.py", line 32, in bootstrap
    bootstrapper.bootstrap()
  File "/Volumes/data/code/gecko/python/mozboot/mozboot/bootstrap.py", line 285, in bootstrap
    configure_mercurial(self.instance.which('hg'), state_dir)
  File "/Volumes/data/code/gecko/python/mozboot/mozboot/bootstrap.py", line 343, in configure_mercurial
    vct_dir = update_vct(hg, root_state_dir)
  File "/Volumes/data/code/gecko/python/mozboot/mozboot/bootstrap.py", line 336, in update_vct
    vct_dir, '@')
  File "/Volumes/data/code/gecko/python/mozboot/mozboot/bootstrap.py", line 386, in update_mercurial_repo
    subprocess.check_call([hg, 'update', '-r', revision], cwd=dest)
  File "/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 186, in check_call
    raise CalledProcessError(retcode, cmd)
So I had to comment out "firefoxtreeesrepo" in my .hgrc, and after running bootstrap again with enabling the extension it seems to work fine now.
We filter out custom extensions when running `hg pull` on the version-control-tools repo to avoid this problem. However, we don't do it for `hg update`. Derp.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Depends on: 1277406
Flags: needinfo?(gps)
Comment on attachment 8896344 [details]
Bug 1389417 - Disable problematic extensions when running `hg update`;

https://reviewboard.mozilla.org/r/167614/#review172828

Sorry, but I'm not a valid reviewer for that code. I also cannot see how it works given that I used the workaround to unblock me.
Attachment #8896344 - Flags: review?(hskupin)
Attachment #8896344 - Flags: review?(ted)
Comment on attachment 8896344 [details]
Bug 1389417 - Disable problematic extensions when running `hg update`;

https://reviewboard.mozilla.org/r/167614/#review174280
Attachment #8896344 - Flags: review?(ted) → review+
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a456024b6cf8
Disable problematic extensions when running `hg update`; r=ted
https://hg.mozilla.org/mozilla-central/rev/a456024b6cf8
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: