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

Bug #308511 reported by jezra
2
Affects Status Importance Assigned to Milestone
Breezy
Triaged
Wishlist
Unassigned
bzr Upload plugin
Confirmed
High
Unassigned

Bug Description

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

Tags: ui upload
Revision history for this message
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."

Revision history for this message
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.

Revision history for this message
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)
Changed in bzr-upload:
milestone: 1.0.0 → none
Jelmer Vernooij (jelmer)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.