Trying to add files aborts with TypeError. 11:15:07 etc/❯ hg st -u ? xresources/tmuxcolors-dark.conf ? xresources/tmuxcolors-light.conf 11:15:45 etc/❯ LANGUAGE=C hg add . adding xresources/tmuxcolors-dark.conf adding xresources/tmuxcolors-light.conf ** unknown exception encountered, please report by visiting ** http://mercurial.selenic.com/wiki/BugTracker ** Python 2.7.8 (default, Oct 20 2014, 15:05:29) [GCC 4.9.1] ** Mercurial Distributed SCM (version 3.3-rc+39-0c4419faacbc) ** Extensions loaded: Traceback (most recent call last): File "/usr/local/bin/hg", line 43, in <module> mercurial.dispatch.run() File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 28, in run sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255) File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 71, in dispatch ret = _runcatch(req) File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 140, in _runcatch return _dispatch(req) File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 860, in _dispatch cmdpats, cmdoptions) File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 621, in runcommand ret = _runcommand(ui, options, cmd, d) File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 951, in _runcommand return checkargs() File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 922, in checkargs return cmdfunc() File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 857, in <lambda> d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) File "/usr/local/lib/python2.7/dist-packages/mercurial/util.py", line 711, in check return func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/mercurial/commands.py", line 202, in add rejected = cmdutil.add(ui, repo, m, "", False, **opts) File "/usr/local/lib/python2.7/dist-packages/mercurial/cmdutil.py", line 2010, in add bad.extend(sub.add(ui, submatch, prefix, True, **opts)) TypeError: add() got an unexpected keyword argument 'exclude'
On hg version 3.2.4 everything works as expected.
'hg bisect` points on this revision: http://selenic.com/repo/hg/rev/9994f45ba714.
It seems that only repos with subrepos are affected.
Is xresources a subrepo directory in this case?
Note that I can't figure out a reproduction for this. Can you give us some clearer steps? Do you have an alias set for 'hg add' or something that's adding some extra parameters?
(In reply to comment #4) No, it's not. This repo has Git subrepo. Also I've tried repo with Subversion subrepos. I haven't tried Hg subrepos.
(In reply to comment #6) OK, that makes sense. It looks like I forgot to change the signature on the base class, and only hgsubrepo implements its own add method. I'll fix it tonight if nobody beats me to it.
Yup, got it with a git subrepo. Confirmed.
(In reply to comment #5) I have only these aliases in my .hgrc: ------- [alias] slog = log --template '{rev}:{node|short} {author} {date|shortdate} {desc|firstline} ({branch}) [{bookmarks}]\n' show = log --patch --verbose --rev ------- Not sure about 'clearer steps'. I updated Hg to tip version (make clean && make all && sudo make install) and continued to use it as usual. Until I tried to add files to the repo. I removed all Hg related files in /usr/local/lib/python2.7, reinstalled Hg and turned off all extensions, but it didn't help. Before I turned off all extensions, Hg pointed on hgsubversion as a source of error. Hgsubversion installed in my user .local folder. Tomorrow I'll try to reproduce the bug with new repo with hgsubversion removed from PYTHONPATH.
Fixed by http://selenic.com/repo/hg/rev/8f02682ff3b0 Matt Harbison <matt_harbison@yahoo.com> subrepo: don't abort in add when non-hg subrepos are present (issue4513) This change should have been part of 9994f45ba714. (please test the fix)
Works for me now. Thanks.