FTP transport: put: fails during push operation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I try to push my branch to site via ftp. I got permanent error like this:
TransportError: 553-Can't open that file: No such file or directory
553 Rename/move failure: No such file or directory
When I look into .bzr.log I see that this error occurs when bzr try to
push revision-store:
add store entry '<email address hidden>'
FTP has not:
/<email address hidden>
FTP has not:
/<email address hidden>
FTP put:
/<email address hidden>
[ 5244] Sun 04:02:27.217 ERROR: 553-Can't open that file: No such file
or directory
553 Rename/move failure: No such file or directory
Traceback (most recent call last):
...
John Meinel commentary (from mail list):
I think the bug is that FTPTransport is not properly raising a
NoSuchFile exception when a file doesn't exist. (as you can see, you are
getting a generic TransportError.
The reason is this bit of code in the TextStore.put()
def _try_put(self, fn, f):
try:
except NoSuchFile:
if not self._prefixed:
raise
try:
except FileExists:
pass
Basically, we only create the directory if we fail to put a file there.
That way we don't have to attempt to create the directory *every* time
we put a file, only if it fails.
The big problem is that the FTP transport is not properly tested,
because we don't have an FTP server we can easily test with.
I believe code to fix this is in my branch: https:/ /launchpad. net/people/ dsilvers/ +branch/ bzr/dsilvers- devel
However Martin is still deciding whether or not to integrate it.