aaron> vila wrote:
>> I encountered the same bug coming from a different path: I was trying to
>> use a builtins.cmd_commit object without providing a 'fixes' parameter.
>>
>> Also Jan's fix is correct, I'd like to mention that the bug IMHO is in
>> the default value for a ListOption ('fixes' is the only option of that
>> type in bzr code base).
>>
>> --- bzrlib/builtins.py 2007-09-11 00:27:26 +0000
>> +++ bzrlib/builtins.py 2007-09-13 16:58:05 +0000
>> @@ -2251,7 +2257,7 @@
>>
>> def run(self, message=None, file=None, verbose=False, selected_list=None,
>> - unchanged=False, strict=False, local=False, fixes=None,
>> + unchanged=False, strict=False, local=False, fixes=[],
>> author=None, show_diff=False):
aaron> An empty list should never be supplied as a default
aaron> value, because list is a mutable type. We don't want
aaron> to open the door to the possibility that this
aaron> particular instance of the list will be changed.
You realize that the cmd_commit.run() method, run during a 'bzr
commit' command line *always* receives a fixes=[] parameter, do
you ?
>>>>> "aaron" == Aaron Bentley writes:
aaron> vila wrote:
>> I encountered the same bug coming from a different path: I was trying to
>> use a builtins.cmd_commit object without providing a 'fixes' parameter.
>>
>> Also Jan's fix is correct, I'd like to mention that the bug IMHO is in
>> the default value for a ListOption ('fixes' is the only option of that
>> type in bzr code base).
>>
>> --- bzrlib/builtins.py 2007-09-11 00:27:26 +0000
>> +++ bzrlib/builtins.py 2007-09-13 16:58:05 +0000
>> @@ -2251,7 +2257,7 @@
>>
>> def run(self, message=None, file=None, verbose=False, selected_list=None,
>> - unchanged=False, strict=False, local=False, fixes=None,
>> + unchanged=False, strict=False, local=False, fixes=[],
>> author=None, show_diff=False):
aaron> An empty list should never be supplied as a default
aaron> value, because list is a mutable type. We don't want
aaron> to open the door to the possibility that this
aaron> particular instance of the list will be changed.
You realize that the cmd_commit.run() method, run during a 'bzr
commit' command line *always* receives a fixes=[] parameter, do
you ?
The door *is* open.