Bug 3001 - "hg qnew -i" always throws an exception
Summary: "hg qnew -i" always throws an exception
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-12 08:15 UTC by illusory
Modified: 2012-05-13 04:51 UTC (History)
3 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description illusory 2011-09-12 08:15 UTC
c:\foo>hg init

c:\foo>hg qnew -i
** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 1.9.2)
** Extensions loaded: graphlog, color, extdiff, record, mq
Traceback (most recent call last):
  File "hg", line 38, in <module>
  File "mercurial\dispatch.pyc", line 27, in run
  File "mercurial\dispatch.pyc", line 64, in dispatch
  File "mercurial\dispatch.pyc", line 87, in _runcatch
  File "mercurial\dispatch.pyc", line 688, in _dispatch
  File "mercurial\dispatch.pyc", line 463, in runcommand
  File "mercurial\extensions.pyc", line 182, in wrap
  File "hgext\color.pyc", line 368, in colorcmd
  File "mercurial\dispatch.pyc", line 742, in _runcommand
  File "mercurial\dispatch.pyc", line 696, in checkargs
  File "mercurial\dispatch.pyc", line 685, in <lambda>
  File "mercurial\util.pyc", line 385, in check
  File "mercurial\extensions.pyc", line 137, in wrap
  File "mercurial\util.pyc", line 385, in check
  File "hgext\record.pyc", line 595, in wrapper
TypeError: qrecord() takes at least 3 non-keyword arguments (2 given)

------ OR ------

c:\bar>hg init

c:\bar>echo foo>foo

c:\bar>hg ci -Am foo
adding foo

c:\bar>echo bar>>foo

c:\bar>hg qnew -i
** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 1.9.2)
** Extensions loaded: graphlog, color, extdiff, record, mq
Traceback (most recent call last):
  File "hg", line 38, in <module>
  File "mercurial\dispatch.pyc", line 27, in run
  File "mercurial\dispatch.pyc", line 64, in dispatch
  File "mercurial\dispatch.pyc", line 87, in _runcatch
  File "mercurial\dispatch.pyc", line 688, in _dispatch
  File "mercurial\dispatch.pyc", line 463, in runcommand
  File "mercurial\extensions.pyc", line 182, in wrap
  File "hgext\color.pyc", line 368, in colorcmd
  File "mercurial\dispatch.pyc", line 742, in _runcommand
  File "mercurial\dispatch.pyc", line 696, in checkargs
  File "mercurial\dispatch.pyc", line 685, in <lambda>
  File "mercurial\util.pyc", line 385, in check
  File "mercurial\extensions.pyc", line 137, in wrap
  File "mercurial\util.pyc", line 385, in check
  File "hgext\record.pyc", line 595, in wrapper
TypeError: qrecord() takes at least 3 non-keyword arguments (2 given)
Comment 1 Idan Kamara 2011-09-12 09:04 UTC
Yeah, you're missing the patch name there.

The orig function is the one wrapped with util.checksignature and we're not 
calling it when -i/--interactive is passed, hence the traceback.

I guess we can also call util.checksignature before passing our wrapper to 
extensions.wrapcommand, but maybe we'd like to solve this more generically 
somehow, not sure.
Comment 2 HG Bot 2011-10-01 15:00 UTC
Fixed by http://selenic.com/repo/hg/rev/351a9292e430
Matt Mackall <mpm@selenic.com>
record: use command wrapper properly for qnew/qrefresh (issue3001)

(please test the fix)
Comment 3 Bugzilla 2012-05-12 09:23 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:23 EDT  ---

This bug was previously known as _bug_ 3001 at http://mercurial.selenic.com/bts/issue3001