[BUG] wrong args for exception

Robert Widhopf-Fenk hack at robf.de
Sun Jun 25 23:03:55 BST 2006


'bzr commit -m "a"' on a tree without added files.

bzr: ERROR: exceptions.TypeError: __init__() takes exactly 2 arguments (3 given)

Traceback (most recent call last):
  File "/home/fenk/download/bzr.dev/bzrlib/commands.py", line 692, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/fenk/download/bzr.dev/bzrlib/commands.py", line 655, in run_bzr
    ret = run(*run_argv)
  File "/home/fenk/download/bzr.dev/bzrlib/commands.py", line 281, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/fenk/download/bzr.dev/bzrlib/builtins.py", line 1706, in run
    ["use --unchanged to commit anyhow"])
TypeError: __init__() takes exactly 2 arguments (3 given)

bzr 0.9.0dev0 on python 2.4.1.final.0 (linux2)
arguments: ['/home/fenk/download/bzr.dev/bzr', 'commit', '-m', 'a']

** please send this report to bazaar-ng at lists.ubuntu.com

-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- bzrlib/builtins.py	2006-06-22 18:37:26 +0000
+++ bzrlib/builtins.py	2006-06-25 22:00:52 +0000
@@ -1702,8 +1702,8 @@
         except PointlessCommit:
             # FIXME: This should really happen before the file is read in;
             # perhaps prepare the commit; get the message; then actually commit
-            raise BzrCommandError("no changes to commit",
-                                  ["use --unchanged to commit anyhow"])
+            raise BzrCommandError("No changes to commit. "
+                                  "Use --unchanged to commit anyhow.")
         except ConflictsInTree:
             raise BzrCommandError("Conflicts detected in working tree.  "
                 'Use "bzr conflicts" to list, "bzr resolve FILE" to resolve.')



More information about the bazaar mailing list