confusing error message while applying push on a file

Bug #248250 reported by Toni Ruottu
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

User attempts to apply push on a file. The following happens.

$ bzr push /tmp/file
bzr: ERROR: Target directory /tmp/file already exists, but does not have a valid .bzr directory. Supply --use-existing-dir to push there anyway.

User gets confused because the error message is all about directories while he wasn't trying to do anything with any directory. Bazaar should tell the user something that the user can understand. Maybe 'Pushing to a file is not supported.' would do.

Changed in bzr:
assignee: nobody → toni-ruottu
status: New → In Progress
Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

I created a new black box test that reveals the problem.
See attached patch file.

Revision history for this message
James Westby (james-w) wrote :

Hi,

I agree that the message should be better.

I think there is difficulty in determining whether the target
is a file or directory though.

As the request to determine this will cost an extra round trip
it should occur in the error path.

Thanks,

James

Changed in bzr:
importance: Undecided → Low
importance: Low → Medium
Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

I'm unassigning myself as I haven't been looking at this bug for a while. The roots of the bug were too deep for a quick patch.

Changed in bzr:
assignee: toni-ruottu → nobody
Changed in bzr:
status: In Progress → Confirmed
Jelmer Vernooij (jelmer)
tags: added: confusing-ui push
tags: added: easy
Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
tags: added: simple
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.