exceptions.TypeError: commit() takes at least 2 non-keyword arguments (1 given) on bzr commit

Bug #692902 reported by Pasquale Soccio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Hg Plugin
Fix Released
Low
Jelmer Vernooij
Debian
Invalid
Undecided
Unassigned

Bug Description

A bzr exception ( the first so far) attempting to commit a single file (see the log below). A commit without passing the file name is still possible. Thinking due the filename containing an hyphen, I have also done the same with another file, but without problem.

mar 2010-12-21 09:40:36 +0100
0.320 bazaar version: 2.3b3
0.324 bzr arguments: [u'commit', u'freeradius/users-local.conf', u'-mAdding user Marco Verde to freeradius.']
0.516 looking for plugins in /root/.bazaar/plugins
0.521 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
1.128 encoding stdout as sys.stdout encoding 'UTF-8'
1.147 bzr-hg: using Mercurial 1.6.4
1.950 Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 917, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1117, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 691, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 710, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 3241, in run
    exclude=tree.safe_relpath_files(exclude))
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 194, in write_locked
    result = unbound(self, *args, **kwargs)
TypeError: commit() takes at least 2 non-keyword arguments (1 given)

1.960 couldn't find apport bug-reporting library: No module named apport
2.011 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
2.012 return code 4

mar 2010-12-21 09:40:47 +0100
0.254 bazaar version: 2.3b3
0.254 bzr arguments: [u'commit', u'-mAdding user Marco Verde to freeradius.']
0.369 looking for plugins in /root/.bazaar/plugins
0.374 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.764 encoding stdout as sys.stdout encoding 'UTF-8'
0.838 opening working tree '/etc'
0.948 preparing to commit
[ 8354] 2010-12-21 09:40:48.944 INFO: Committing to: /etc/
0.984 Selecting files for commit with filter None
[ 8354] 2010-12-21 09:40:49.328 INFO: modified freeradius/users-local.conf
[ 8354] 2010-12-21 09:40:49.890 INFO: Committed revision 35.
1.929 Committed revid <email address hidden> as revno 35.
2.494 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
2.494 return code 0

mar 2010-12-21 09:50:44 +0100
0.206 bazaar version: 2.3b3
0.207 bzr arguments: [u'status']
0.337 looking for plugins in /root/.bazaar/plugins
0.342 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.925 encoding stdout as sys.stdout encoding 'UTF-8'
1.037 opening working tree '/etc'
1.057 check paths: None
2.311 encoding stdout as sys.stdout encoding 'UTF-8'
2.329 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
2.329 return code 0

mar 2010-12-21 09:51:14 +0100
0.181 bazaar version: 2.3b3
0.181 bzr arguments: [u'commit', u'syslog-ng/custom-syslog-ng-templates.conf', u'-mFile cleanup']
0.305 looking for plugins in /root/.bazaar/plugins
0.310 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.692 encoding stdout as sys.stdout encoding 'UTF-8'
0.702 bzr-hg: using Mercurial 1.6.4
0.771 opening working tree '/etc'
0.844 preparing to commit
[ 9921] 2010-12-21 09:51:15.501 INFO: Committing to: /etc/
0.898 Selecting files for commit with filter [u'syslog-ng/custom-syslog-ng-templates.conf']
[ 9921] 2010-12-21 09:51:15.662 INFO: modified syslog-ng/custom-syslog-ng-templates.conf
[ 9921] 2010-12-21 09:51:15.893 INFO: Committed revision 36.
1.290 Committed revid <email address hidden> as revno 36.
1.811 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
1.811 return code 0

Related branches

Revision history for this message
Andrew Bennetts (spiv) wrote :

The hyphen in the filename is almost certainly a red herring; it's never been a problem before.

It looks like a bug in the bzr-hg plugin to me; its implementation of Tree.commit has a slightly wrong signature. It has 'message' as a required positional argument, but it should be an optional keyword argument.

affects: bzr → bzr-hg
Jelmer Vernooij (jelmer)
Changed in bzr-hg:
status: New → Fix Committed
importance: Undecided → Low
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
tags: added: verified
Jelmer Vernooij (jelmer)
tags: removed: verified
Jelmer Vernooij (jelmer)
Changed in bzr-hg:
milestone: none → 0.2
Jelmer Vernooij (jelmer)
Changed in bzr-hg:
status: Fix Committed → Fix Released
milestone: 0.2 → 0.1.1
Changed in debian:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.