[RFC/MERGE] Branch.get_master_branch() should default to using self as a possible transport
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Jan 15 07:46:32 GMT 2009
>>>>> "jam" == John Arbash Meinel <john at arbash-meinel.com> writes:
jam> This is a quick change to 'Branch.get_master_branch()'. All it does is
jam> insert self.bzrdir.transport into the list of possible transports to re-use.
jam> I'm offering this, because it seems like we have a transport that we may
jam> want to re-use. I'm leaving this as RFC, because I'm not sure the exact
jam> use case, as it means the branch would have to be remote, and bound to
jam> another remote branch to actually be useful.
jam> I can't quite decide if that is worth persuing, as it is probably an
jam> edge case, but I figured I could bring it up for discussion.
It's a good catch, you can add a test for it now :-)
On the discussion front, since the possible_transport mechanism
has been introduced only a few places had to me modified. We did
that as we discovered the multiple connections but overall, we
didn't catch that much spurious connections.
In itself, it shows that the solution was good.
On the API side, though, I wondered if adding a
possible_transport here and there as the needs arisen is the best
solution (it's easy to forget when you should use it and when
it's not there it's hard to know you must add it).
May the possible_transports should become an attribute of bzrdir
instead.
Nothing you have to address for this patch of course,
but since you gave a few cycles to the subject lately... what do
you think about the idea ?
Vincent
More information about the bazaar
mailing list