AttributeError: object has no attribute '_updateremoterefs'

RESOLVED FIXED

Status

Developer Services
Mercurial: firefoxtree
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: caber, Assigned: gps)

Tracking

Details

(Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/62] )

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36

Steps to reproduce:

Delete the mozilla-central folder after running ./mach mercurial-setup
If you try to clone mozilla-central again, you will get an unknown exception.


Actual results:

You will get the following error:

** Unknown exception encountered with possibly-broken third-party extension bzexport
** which supports versions unknown of Mercurial.
** Please disable bzexport and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2]
** Mercurial Distributed SCM (version 3.0.1)
** Extensions loaded: progress, color, rebase, histedit, bzexport, reviewboard, bzpost, firefoxtree, strip, mq, mqext, qimportbz
Traceback (most recent call last):
  File "/usr/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 28, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 69, in dispatch
    ret = _runcatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 138, in _runcatch
    return _dispatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 819, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 599, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 196, in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/hgext/color.py", line 431, in colorcmd
    return orig(ui_, opts, cmd, cmdfunc)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 910, in _runcommand
    return checkargs()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 881, in checkargs
    return cmdfunc()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 816, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 518, in check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 1299, in clone
    branch=opts.get('branch'))
  File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 400, in clone
    destpeer.local().clone(srcpeer, heads=revs, stream=stream)
  File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line 1860, in clone
    return self.pull(remote, heads)
  File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line 1708, in pull
    return exchange.pull (self, remote, heads, force)
  File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 196, in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/home/yasasawy/.mozbuild/version-control-tools/hgext/firefoxtree/__init__.py", line 239, in pull
    repo._updateremoterefs(remote, tree)
  File "/usr/lib/python2.7/dist-packages/mercurial/repoview.py", line 217, in __getattr__
    return getattr(self._unfilteredrepo, attr)
AttributeError: 'mqrepo' object has no attribute '_updateremoterefs'


Expected results:

It should've just cloned the repo.
Component: Untriaged → Mercurial: bzexport
Product: Firefox → Developer Services
Stack trace indicates firefoxtree bug. You should disable it for right now as a workaround.
Component: Mercurial: bzexport → Mercurial: firefoxtree
Summary: hg clone failing because of .hgrc file → AttributeError: object has no attribute '_updateremoterefs'
Created attachment 8507638 [details] [diff] [review]
firefoxtree: prevent unknown reference to _updateremoterefs ()

A user reported that the extension was attempting to access an unknown
attribute on a repo instance. The backtrace indicated filtered
repositories may be involved.

The extra localrepository class for Firefox repositories provided
only a single method, which didn't need to be on a class. To match the
recent move of pull() into a module-level function, we move the
remaining class method into a module-level function and remove the
custom class. There should now be no issue accessing this function on an
unknown type.

Unfortunately, no test for the underlying issue is included. However,
the solution does treat the symptoms. There may be a bug still
lingering, likely around calling the firefoxtree code when it shouldn't
be.
Attachment #8507638 - Flags: review?(bkero)
Assignee: nobody → gps
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Please test the patch and let me know if this fixes it.
Flags: needinfo?(yasaswyk)
(Reporter)

Comment 4

3 years ago
The patch seemed to have worked. It was able to clone the repo without any issues.
Flags: needinfo?(yasaswyk)

Updated

3 years ago
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/62]
Duplicate of this bug: 1091844
Attachment #8507638 - Attachment is obsolete: true
Attachment #8507638 - Flags: review?(bkero)
Created attachment 8514563 [details]
MozReview Request: bz://1085066/gps
Attachment #8514563 - Flags: review?(mh+mozilla)
/r/129 - firefoxtree: prevent unknown reference to _updateremoterefs (bug 1085066)

Pull down this commit:

hg pull review -r c8758a10221fb82c36b8120b54b090385b0ba506
Attachment #8514563 - Flags: review?(mh+mozilla) → review+
https://reviewboard.mozilla.org/r/127/#review43

Ship It!
https://hg.mozilla.org/hgcustom/version-control-tools/rev/4a7444b8e597
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/62] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/62]
Duplicate of this bug: 1157399
Comment on attachment 8514563 [details]
MozReview Request: bz://1085066/gps
Attachment #8514563 - Attachment is obsolete: true
Attachment #8618410 - Flags: review+
Created attachment 8618410 [details]
MozReview Request: firefoxtree: prevent unknown reference to _updateremoterefs (bug 1085066)
You need to log in before you can comment on or make changes to this bug.