svn http/https transport

Jelmer Vernooij jelmer at
Sun Apr 5 22:56:39 BST 2009

Ricardo Kirkner wrote:
> Jelmer Vernooij wrote:
>> Ricardo Kirkner wrote:
>>>> If Bazaar allowed multiple transports then the first transport (the
>>>> "native Bazaar" transport) would still prompt the user for
>>>> credentials,
>>>> so I don't see how this would help the problem. If the http transport
>>>> used a common mechanism for retrieving credentials (which could
>>>> include
>>>> checking ~/.subevrsion) then you wouldn't be prompted at all.
>>> Well, what I was thinking (from my experiments), is that the bzr
>>> default
>>> mechanism gets loaded last. In our example, if the svn plugin defines a
>>> new mechanism, and since the plugins get loaded 'after' the core of
>>> bzr,
>>> and since when registering a new transport it gets stored as the
>>> 'first'
>>> option, this effectively makes it the default option, and so, the svn
>>> transport gets tried first, and eventually falls back to the bzr
>>> mechanism.
>> This means that Bazaar gets slower when used for "native" Bazaar
>> branches if bzr-svn is loaded, and that's something I'd very much like
>> to avoid. bzr-svn should not cause any significant overhead when it's
>> loaded but you're not using it.
> Well, yes, you're right again here. We should avoid making the default
> bzr slower at all costs.
> So, to sum up, the main idea is to make bzr always use the svn
> credential store for authentication, if the bzr-svn plugin is loaded,
> and keep the current transport detection mechanism untouched.
Yep, exactly.
> Following the same reasoning as before, the optimal choice would be
> that bzr would use the svn credential store only if accessing a svn
> branch. In order to do that, I guess it would have to store some
> metadata about the credential store used when branched, so it can try
> that out first. This would though create some overhead that was not
> present so far, and might be desirable to avoid.
I don't think that's necessary. The overhead is very very small though
because all the extra work is accessing a couple of extra local files
(it'll be a few ms at most), there is no network traffic involved. This
overhead will only happen if the branch requires authentication *and*
Bazaar didn't have credentials available itself, so it would have to
prompt anyway if it didn't check the svn cache. Also, storing and
retrieving what credentials store to use and then checking it will
probably be just as expensive as checking both credential stores.



More information about the bazaar mailing list