Code review comment for lp:~parthm/bzr/262450

Revision history for this message
Parth Malwankar (parthm) wrote :

> this fails with
>
> ^^^^[log from
> bzrlib.tests.per_transport.TransportTests.test_copy_tree(FTPTestServer)]
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/pqm/bzr-pqm-workdir/home/2.0/bzrlib/tests/per_transport.py", line
> 1442, in test_copy_tree
> transport.copy_tree('from', 'to')
> File "/home/pqm/bzr-pqm-workdir/home/2.0/bzrlib/transport/__init__.py", line
> 1063, in copy_tree
> source.copy_tree_to_transport(target)
> File "/home/pqm/bzr-pqm-workdir/home/2.0/bzrlib/transport/__init__.py", line
> 1077, in copy_tree_to_transport
> to_transport.mkdir(dir)
> File "/home/pqm/bzr-pqm-workdir/home/2.0/bzrlib/transport/ftp/__init__.py",
> line 362, in mkdir
> unknown_exc=errors.FileExists)
> File "/home/pqm/bzr-pqm-workdir/home/2.0/bzrlib/transport/ftp/__init__.py",
> line 200, in _translate_perm_error
> raise unknown_exc(path, extra=extra)
> FileExists: File exists: '/to/dir': 550 error creating directory: Permission
> denied
>
>
> Parth, let me know if you want help with it.

Fixed.
copy_tree updated to consider only rwx bits during copy i.e. target.mkdir('.', stat.st_mode & 0777)

« Back to merge proposal