hooks fired by smart server can't easily obtain absolute path to branch on the server.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
High
|
Unassigned | ||
Breezy |
Triaged
|
Medium
|
Unassigned |
Bug Description
I have a http smart server with a post_change_
I'm trying to obtain a url to the branch which I can pass to a php script which
will then call `bzr log ...` with the url.
This is my hook:
def branch_
trace.
from bzrlib import transport
tr = transport.
trace.
eu = tr.external_url()
trace.
trace.
which gives the following output:
==
2.158 *** branch_
2.160 tr: <bzrlib.
2.160 eu: file://
2.166 Traceback (most recent call last):
File "/opt/bzr/
_StatefulDe
File "/opt/bzr/
self.
File "/opt/bzr/
raise errors.
SmartMessageHan
==
I had a discussion on IRC with lifeless:
[23:09] <lifeless> I think you should file a bug; it is reasonable to want to run an external script on a branch being pushed to by the smart server
[23:09] <AmanicA> where do you think the problem/solution would be?
[23:10] <lifeless> we need to look at the security implications
[23:10] <AmanicA> oh you mean that method should be implemented?!
[23:10] <lifeless> and then likely both fix local_abspath to support the chroot transport type
[23:11] <lifeless> and possibly provide a public method to get the backing location
Changed in bzr: | |
status: | New → Confirmed |
Changed in bzr: | |
importance: | Undecided → High |
tags: | added: check-for-breezy |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | removed: check-for-breezy |
Making local_abspath work would be good. Also, we should make it so that branch.get_config() Just Works w.r.t. to absolute paths in locations.conf.