http transport should tell user if host is unknown rather than saying "not a branch"

Bug #41436 reported by Michael Ellerman
4
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Vincent Ladeuil

Bug Description

When pulling (and presumably doing other operations) over http, the non-existance of a host is reported as "not a branch", this can be rather confusing, eg:

concordia ~/test$ bzr pull http://bazzar-vcs.org/bzr/bzr.dev.as.knit
bzr: ERROR: Not a branch: http://bazzar-vcs.org/bzr/bzr.dev.as.knit/

The message sends me off to check that I got the path right, which I did, I then pull my hair out for five minutes before realising I've actually got the host name wrong!

Revision history for this message
John A Meinel (jameinel) wrote :

We now get ConnectionError, which is better, though the error is still slightly confusing.

Leaving this bug open, because I think we can do better, but decreasing its priority.

This is the current errors:
% bzr branch http://nohost/foo/bar
bzr: ERROR: Connection error: curl connection error (Success) on http://nohost/foo/bar/.bzr/branch-format
% bzr branch http+urllib://nohost/foo/bar
bzr: ERROR: Connection error: Error retrieving http+urllib://nohost/foo/bar/.bzr/branch-format: <urlopen error (-2, 'Name or service not known')> <urlopen error (-2, 'Name or service not known')>

Changed in bzr:
importance: Medium → Low
status: Unconfirmed → Confirmed
Revision history for this message
Vincent Ladeuil (vila) wrote :

Will fix that ASAP.

Changed in bzr:
assignee: nobody → v-ladeuil
Revision history for this message
John A Meinel (jameinel) wrote :

The exception is a little bit ugly right now, but it does indeed say "Couldn't resolve host".

Considering this fixed, though vila may have futher improvements to make.

Changed in bzr:
status: Confirmed → Fix Released
Revision history for this message
Vincent Ladeuil (vila) wrote :

This is what bzr.urllib.keepalive gives:

bzr branch http+urllib://nohost/foo/bar
bzr: ERROR: Connection error: Couldn't resolve host 'nohost' (-2, 'Name or service not known')
vila:~/tmp :( $ bzr branch http+pycurl://nohost/foo/bar
bzr: ERROR: Connection error: curl connection error (Couldn't resolve host 'nohost')
on http://nohost/foo/bar/.bzr/branch-format
vila:~/tmp :( $

I don't see the point of repeating the url requested as it appears just one line above, but still mentionning the original error may help in obscure cases.

Is it satisfying enough ?

Revision history for this message
John A Meinel (jameinel) wrote :

I think it is good to repeat the url. For one thing it is an explicit path (.bzr/branch-format) in case that is important in debugging things.

Also, it help in case we ever had something like aliases, so people do:

bzr branch foo/bar

Which is secretly aliased to http://foox/bar

I'm happy with it.

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.