[BUG?] bzr server hooks dont expose the real local url
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Jun 4 10:46:37 BST 2007
>>>>> "robert" == Robert Collins <robertc at robertcollins.net> writes:
robert> 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)
robert> I dont think its safe to assume its always a chroot transport. So I was
robert> thinking of adding a transport API like the local_abspath one - a
robert> external_url() method, which returns the URL that should be used to talk
robert> about this path to external systems.
I think you're looking for abspath here, but you have used it for
clone (may be wrongly).
I think abspath definition is: from this path relative to you
(the transport), give me back something that I can use to present
that path to the user without referring to you.
robert> for memory: it will raise an error (its not externally visible)
Seems to fit: a memory transport is only usable for paths related to himself.
robert> for chroot: it will return self.server.backing_transport.external_url
Seems to fit: we leave the chroot jail.
robert> for everything else, its self.base
Seems to fit too.
Vincent
More information about the bazaar
mailing list