Give user better feedback than "NotBranchError", and suggestion for recovery.

Bug #86402 reported by Andrew Bennetts
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Invalid
Medium
Unassigned

Bug Description

If a hosted branch could not be mirrored, the branch page will display an error supposedly explaining why. For hosted branches, this is almost always a "Not a branch". However, as described in https://lists.ubuntu.com/mailman/private/launchpad/2007-February/013833.html there are multiple causes of the "Not a branch" error that users see.

We should automate the diagnosis of these causes, and suggest an appropriate remedy to the user. If no recognised cause is determined, obviously reporting a the original NotBranchError is an acceptable fallback.

For example, we could detect and report "$LOCATION is an empty directory. Remedy: Using bzr 0.15 or newer, do 'bzr push --use-existing-dir $LOCATION'."

("--use-existing-dir" is a new option in the upcoming bzr 0.15 release)

Another example: "$LOCATION contains a repository (.bzr/repository) but no branch (.bzr/branch). Remedy: Using bzr 0.15 or newer, do 'bzr push $LOCATION' again."

(again, I specify a bzr version because bzr 0.15 will be better at resuming interrupted pushes than earlier versions)

Both of these diagnoses are fairly easy to automate, and the other commonly occuring problems probably are too.

Related to bug #48064. Bug #86420 is also related.

Tags: lp-code
Andrew Bennetts (spiv)
description: updated
Revision history for this message
David Allouche (ddaa) wrote :

Nice to have -> Medium importance.

Changed in launchpad-bazaar:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
Robert Collins (lifeless) wrote :

This will probably be invalid in a few weeks as jelmer's migration of this component to the branch importer proceeds.

Revision history for this message
Robert Collins (lifeless) wrote :

In fact, its obsolete now, we only have the two-stage thing for imports.

Changed in launchpad:
status: Triaged → Invalid
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.