[BUG?] bzr server hooks dont expose the real local url

Robert Collins robertc at robertcollins.net
Mon Jun 4 03:19:33 BST 2007


On Fri, 2007-06-01 at 10:55 -0500, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> > This lets the bzr dbus plugin work correct when applied to 0.16. I'll
> > probably do this in the dbus plugin for 0.16 users; but I think
> > something like this should be done to bzr.dev for 0.17.
> > 
> > -Rob
> > 
> > === modified file 'bzrlib/smart/server.py'
> > --- bzrlib/smart/server.py      2007-04-20 05:11:46 +0000
> > +++ bzrlib/smart/server.py      2007-05-18 17:42:00 +0000
> > @@ -66,7 +66,7 @@
> >      def serve(self):
> >          self._should_terminate = False
> >          for hook in SmartTCPServer.hooks['server_started']:
> > -            hook(self.backing_transport.base, self.get_url())
> > +            hook(self.backing_transport.server.backing_transport.base,
> > self.get_url())
> >          self._started.set()
> >          try:
> >              try:
> > 
> 
> +1 (though it needs tests)

I dont think its safe to assume its always a chroot transport. So I was
thinking of adding a transport API like the local_abspath one - a
external_url() method, which returns the URL that should be used to talk
about this path to external systems.

for memory: it will raise an error (its not externally visible)
for chroot: it will return self.server.backing_transport.external_url
for everything else, its self.base

What do you think?

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070604/a11e3503/attachment.pgp 


More information about the bazaar mailing list