[MERGE] Default port for bzr:// (bug 86897)

James Henstridge james at jamesh.id.au
Tue Feb 27 06:46:57 GMT 2007


On 27/02/07, Andrew Bennetts <andrew at canonical.com> wrote:
> John Arbash Meinel wrote:
> > John Arbash Meinel has voted +1 (conditional).
> > Status is now: Conditionally approved
> > Comment:
> > I think it would be clearer if 4155 was a constant rather than just a
> > number in the source. So you would do:
> >
> > BZR_DEFAULT_SERVE_PORT = 4155
> >
> > ...
> >
> > if port is None:
> >   port = BZR_DEFAULT_SERVE_PORT
> >   host = '127.0.0.1'
> > elif:
> > ...
>
> Done.  (For some reason, I initially couldn't think of a good spot for the
> constant, but I since realised that bzrlib/transport/smart.py is the obvious
> place.)

I know it won't have any effect til distributions pick up the new
service names, but do you think it'd be worth using the result of
socket.getservbyname('bzr', 'tcp') in preference to
BZR_DEFAULT_SERVE_PORT?

James.



More information about the bazaar mailing list