Closed Bug 1389417 Opened 3 years ago Closed 3 years ago

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


(Firefox Build System :: General, defect)

56 Branch
Not set


(firefox57 fixed)

Tracking Status
firefox57 --- fixed


(Reporter: whimboo, Assigned: gps)




(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>
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/", line 81, in run
>     status = (dispatch(req) or 0) & 255
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/", line 162, in dispatch
>     ret = _runcatch(req)
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/", line 302, in _runcatch
>     return _callcatch(ui, _runcatchfunc)
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/", line 310, in _callcatch
>     return scmutil.callcatch(ui, func)
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/", line 150, in callcatch
>     return func()
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/", line 292, in _runcatchfunc
>     return _dispatch(req)
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/", line 858, in _dispatch
>     presetupfuncs=req.prereposetups)
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/", 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/", line 322, in closure
>     return func(*(args + a), **kw)
>   File "/data/Users/henrik/.mozbuild/version-control-tools/hgext/firefoxtree/", line 154, in peerorrepo
>     return orig(ui, path, *args, **kwargs)
>   File "/usr/local/Cellar/mercurial/4.3.1/lib/python2.7/site-packages/mercurial/", line 160, in _peerorrepo
>     hook(ui, obj)
>   File "/data/Users/henrik/.mozbuild/version-control-tools/hgext/firefoxtree/", line 633, in reposetup
>     if not isfirefoxrepo(repo):
>   File "/data/Users/henrik/.mozbuild/version-control-tools/hgext/firefoxtree/", 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/", line 32, in bootstrap
  File "/Volumes/data/code/gecko/python/mozboot/mozboot/", line 285, in bootstrap
    configure_mercurial(self.instance.which('hg'), state_dir)
  File "/Volumes/data/code/gecko/python/mozboot/mozboot/", line 343, in configure_mercurial
    vct_dir = update_vct(hg, root_state_dir)
  File "/Volumes/data/code/gecko/python/mozboot/mozboot/", line 336, in update_vct
    vct_dir, '@')
  File "/Volumes/data/code/gecko/python/mozboot/mozboot/", 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/", 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
Depends on: 1277406
Flags: needinfo?(gps)
Comment on attachment 8896344 [details]
Bug 1389417 - Disable problematic extensions when running `hg update`;

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`;
Attachment #8896344 - Flags: review?(ted) → review+
Pushed by
Disable problematic extensions when running `hg update`; r=ted
Closed: 3 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.