uploading to a directory that does not exist should create the directory

Bug #308511 reported by jezra on 2008-12-16
Affects Status Importance Assigned to Milestone
bzr Upload plugin

Bug Description

bzr upload ftp://<email address hidden>/www/bazaar/test_code
fails if the bazaar directory does not exist

EmmaJane (emmajane) wrote :

At a minimum the error message should be made more useful. Currently it reads as follows:

$ bzr upload sftp://<email address hidden>/~/path/to/directory
No uploaded revision id found, switching to full upload
Uploading myfile.info
bzr: ERROR: No such file: 'path/to/directory/myfile.info.tmp.1236970319.404656887.1458.1866393847': [Errno 2] No such file

It would be more useful if this error message was something like, "Target directory not found. Please create the parent directory before uploading your files."

Jelmer Vernooij (jelmer) wrote :

+1, the error message is quite confusing.

Perhaps a --create-prefix option can be supported, similar to what "bzr push" supports.

I'd rather not see "bzr upload" automatically creating the directory, since that can have unexpected side-effects, e.g. if you make a typo in the URL.

Vincent Ladeuil (vila) wrote :

I agree with Jelmer and emmaJane:
- the error message should be clearer,
- we shouldn't create without being explicitly told to do so,
- --create-prefix is the way to go.

Changed in bzr-upload:
importance: Undecided → High
milestone: none → 1.0
status: New → Confirmed
Vincent Ladeuil (vila) on 2010-12-10
Changed in bzr-upload:
milestone: 1.0.0 → none
Jelmer Vernooij (jelmer) on 2018-08-04
tags: added: ui upload
Changed in brz:
status: New → Triaged
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers