[merge][0.11] Transform._set_mode stats the wrong file

Aaron Bentley aaron.bentley at utoronto.ca
Thu Sep 21 21:47:18 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFFEvpW0F+nu1YWqI0RAkOxAKCBSRQGtJnl8HwSs16NIhgeZlz7oACfUlFC
RUKAxZfVKjZF94IRLwa46Rk=
=Otea
-----END PGP SIGNATURE-----




More information about the bazaar mailing list