[BUG][PATCH] fileid_involved fails to unescape xml characters
John Arbash Meinel
john at arbash-meinel.com
Thu Jan 19 22:24:18 GMT 2006
Robert Collins wrote:
> On Thu, 2006-01-19 at 15:29 -0600, John Arbash Meinel wrote:
>
>
>>=== modified file 'bzrlib/tests/stub_sftp.py'
>>--- bzrlib/tests/stub_sftp.py
>>+++ bzrlib/tests/stub_sftp.py
>>@@ -105,7 +105,7 @@
>> try:
>> if hasattr(os, 'O_BINARY'):
>> flags |= os.O_BINARY
>>- if (attr is not None) and hasattr(attr, 'st_mode'):
>>+ if (attr is not None) and getattr(attr, 'st_mode', None):
>
>
> In my previous email I meant:
> if getattr(attr, 'st_mode', None):
> literally: getattr(None, 'foo', 'bar') -> 'bar'
>
>
>> fd = os.open(path, flags, attr.st_mode)
>> else:
>> fd = os.open(path, flags)
>>@@ -151,7 +151,9 @@
>> def mkdir(self, path, attr):
>> path = self._realpath(path)
>> try:
>>- if attr is not None and hasattr(attr, 'st_mode'):
>>+ # Using getattr() in case st_mode is None or 0
>>+ # both evaluate to False
>>+ if attr is not None and getattr(attr, 'st_mode', None):
>
>
> and here.
>
>
> +1 from me with that changed, and an assert + comment in
> fileid_involved() to ensure that the branch format is in (5, 6) -
> because new formats may change the format of inventories - and I really
> dont want to know what will happen with mixed-format weaves at that
> point if we dont have the converters eyes drawn to this code path.
>
> Rob
Done as of revno=1524
With a double +1, I'll merge it into jam-integration as well.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060119/4e8e727a/attachment.pgp
More information about the bazaar
mailing list