[merge][0.11] Transform._set_mode stats the wrong file
John Arbash Meinel
john at arbash-meinel.com
Fri Sep 22 00:22:12 BST 2006
Aaron Bentley wrote:
> John Arbash Meinel wrote:
>>> + def test_preserve_mode(self):
>>> + """File mode is preserved when replacing content"""
>>> + if sys.platform == 'win32':
>>> + raise TestSkipped('chmod has no effect on win32')
>>> + transform, root = self.get_transform()
>>> + transform.new_file('file1', root, 'contents', 'file1-id', True)
>>> + transform.apply()
>>> + self.assertTrue(self.wt.is_executable('file1-id'))
>>> + transform, root = self.get_transform()
>>> + file1_id = transform.trans_id_tree_file_id('file1-id')
>>> + transform.delete_contents(file1_id)
>>> + transform.create_file('contents2', file1_id)
>>> + transform.apply()
>>> + self.assertTrue(self.wt.is_executable('file1-id'))
>>> +
>>>
>>> Does this test fail when the patch is not present?
>
> Yes, it does fail.
>
>>> The problem with 'executable' is I tried a few tests using that, but they always passed
>>> because executability was handled by a different section.
>
> TT doesn't play around with the execute bit unless you explicitly set
> it, either with set_executability or with new_file.
>
> Aaron
Well, for now I'll merge it with both tests, but if anyone objects I'll
take a test out.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060921/64ce8433/attachment.pgp
More information about the bazaar
mailing list