Closed Bug 1085066 Opened 8 years ago Closed 8 years ago

AttributeError: object has no attribute '_updateremoterefs'


(Developer Services :: Mercurial: firefoxtree, defect)

Not set


(Not tracked)



(Reporter: yasaswyk, Assigned: gps)



(Whiteboard: [kanban:engops:] )


(1 file, 2 obsolete files)

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>
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 28, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 69, in dispatch
    ret = _runcatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 138, in _runcatch
    return _dispatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 819, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 599, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 196, in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/hgext/", line 431, in colorcmd
    return orig(ui_, opts, cmd, cmdfunc)
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 910, in _runcommand
    return checkargs()
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 881, in checkargs
    return cmdfunc()
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 816, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 518, in check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 1299, in clone
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 400, in clone
    destpeer.local().clone(srcpeer, heads=revs, stream=stream)
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 1860, in clone
    return self.pull(remote, heads)
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 1708, in pull
    return exchange.pull (self, remote, heads, force)
  File "/usr/lib/python2.7/dist-packages/mercurial/", line 196, in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/home/yasasawy/.mozbuild/version-control-tools/hgext/firefoxtree/", line 239, in pull
    repo._updateremoterefs(remote, tree)
  File "/usr/lib/python2.7/dist-packages/mercurial/", 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'
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
Attachment #8507638 - Flags: review?(bkero)
Assignee: nobody → gps
Ever confirmed: true
Please test the patch and let me know if this fixes it.
Flags: needinfo?(yasaswyk)
The patch seemed to have worked. It was able to clone the repo without any issues.
Flags: needinfo?(yasaswyk)
Whiteboard: [kanban:engops:]
Attachment #8507638 - Attachment is obsolete: true
Attachment #8507638 - Flags: review?(bkero)
Attached file MozReview Request: bz://1085066/gps (obsolete) —
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+
Closed: 8 years ago
Resolution: --- → FIXED
Whiteboard: [kanban:engops:] → [kanban:engops:]
Attachment #8514563 - Attachment is obsolete: true
Attachment #8618410 - Flags: review+
You need to log in before you can comment on or make changes to this bug.