I see the cause. This bug can be provoked with the combination of:
- bzr serve trying to use an IPv6 address (which may happen your system has IPv6 support installed, even if you don't have any working IPv6 interfaces)
- having a server_started hook installed
Specifically, with an IPv6 socket getsockname() returns a 4-element tuple like ('::', 4155, 0, 0), instead of a 2-element one like ('0.0.0.0', 4155). But the get_url() function assumes that it always going to be a 2-element tuple.
I see the cause. This bug can be provoked with the combination of:
- bzr serve trying to use an IPv6 address (which may happen your system has IPv6 support installed, even if you don't have any working IPv6 interfaces)
- having a server_started hook installed
Specifically, with an IPv6 socket getsockname() returns a 4-element tuple like ('::', 4155, 0, 0), instead of a 2-element one like ('0.0.0.0', 4155). But the get_url() function assumes that it always going to be a 2-element tuple.