reviewboard mercurial extension breaks "hg tag"



2 years ago
2 years ago


(Reporter: dbaron, Assigned: gps)



MozReview Requests

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


(1 attachment)



2 years ago
I was using the "hg tag" in a repository (unrelated to mozilla-central), and it raised an exception because of the reviewboard extension.  (It succeeded in modifying .hgtags, but failed to commit that change.)

Disabling the reviewboard extension made the problem go away.

$ hg version
Mercurial Distributed SCM (version 3.6.2)

$ hg tag release-0.1.5
** Unknown exception encountered with possibly-broken third-party extension qfixdrift
** which supports versions unknown of Mercurial.
** Please disable qfixdrift and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.10 (default, Oct 14 2015, 16:09:02) [GCC 5.2.1 20151010]
** Mercurial Distributed SCM (version 3.6.2)
** Extensions loaded: strip, mq, convert, transplant, rebase, extdiff, qfixdrift, graphlog, bzexport, reviewboard, progress, hggit, histedit, bzpost, bundleclone, qimportbz
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 43, in <module>
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 54, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 116, in dispatch
    ret = _runcatch(req)
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 187, in _runcatch
    return _dispatch(req)
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 920, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 679, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 1051, in _runcommand
    return checkargs()
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 1011, in checkargs
    return cmdfunc()
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 917, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 801, in check
    return func(*args, **kwargs)
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 183, in closure
    return func(*(args + a), **kw)
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 801, in check
    return func(*args, **kwargs)
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/hgext/", line 3525, in mqcommand
    return orig(ui, repo, *args, **kwargs)
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 801, in check
    return func(*args, **kwargs)
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 6497, in tag
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 647, in tag
    self._tag(names, node, message, local, user, date, editor=editor)
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 64, in wrapper
    return orig(repo.unfiltered(), *args, **kwargs)
  File "/usr/local/mercurial-3.6.2/lib/python2.7/site-packages/mercurial/", line 612, in _tag
  File "/home/dbaron/.mozbuild/version-control-tools/hgext/reviewboard/", line 1093, in commit
    if 'commitid' not in extra and
TypeError: argument of type 'NoneType' is not iterable

originally observed with:

~/.mozbuild/version-control-tools/hgext/reviewboard $ hg parent
changeset:   3217:eaa98dd31dc3

but also reproduces with:

~/.mozbuild/version-control-tools/hgext/reviewboard $ hg parent
changeset:   3621:c1fa09f2886d

Comment 1

2 years ago
This feels like the same issue we had with firefoxtrees in bug 1234396. Somehow the monkeypatched repo class gets lost as part of repo filtering. I'm starting to suspect an upstream regression...

Comment 2

2 years ago
fwiw - I just hit this too

Comment 3

2 years ago
This is due to a change in Mercurial 3.6 ( Fix should be trivial.
Assignee: nobody → gps

Comment 4

2 years ago
Created attachment 8712030 [details]
MozReview Request: reviewboard: handle kwargs more robustly (bug 1235213); r?dminor

Mercurial 3.6 changed the "extra" keyword argument from an empty
tuple to None. It's quite possible the mutability of that default
argument was leading to our previous code not erroring.

Setting the argument to an empty dict in all false-y cases makes the
issue go away.

Review commit:
See other reviews:
Attachment #8712030 - Flags: review?(dminor)

Comment 5

2 years ago
Comment on attachment 8712030 [details]
MozReview Request: reviewboard: handle kwargs more robustly (bug 1235213); r?dminor

Attachment #8712030 - Flags: review?(dminor) → review+

Comment 6

2 years ago
Last Resolved: 2 years ago
Resolution: --- → FIXED
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.