[MERGE] code cleanups for bzrdir.py

Ian Clatworthy ian.clatworthy at internode.on.net
Wed Sep 19 00:28:01 BST 2007


Alexander Belchenko wrote:
> Ian Clatworthy ?8H5B:
> 
> # Begin patch
>> === modified file 'bzrlib/bzrdir.py'
>> --- bzrlib/bzrdir.py	2007-09-17 12:46:56 +0000
>> +++ bzrlib/bzrdir.py	2007-09-18 07:14:35 +0000
>> @@ -1445,7 +1455,8 @@
>>          klass._default_format = format
> 
>>      def __str__(self):
>> -        return self.get_format_string()[:-1]
>> +        # Trim the newline
>> +        return self.get_format_string().rstrip()
> 
> 
> ^-- .rstrip() w/o arguments trim all whitespaces as well as newline,
> i.e. space, tab. Is it intended behavior?

That was my intention, yes. I can't think of a reason why anyone would
want to differentiate format names on the basis of trailing whitespace.
Or have the extra whitespace included in output.

Ian C.



More information about the bazaar mailing list