On Mon, 2010-06-07 at 15:40 -0500, Augie Fackler wrote: > On Sun, May 30, 2010 at 10:23 AM, Jelmer Vernooij <[email protected]> wrote: > > On Thu, May 20, 2010 at 05:07:22PM -0500, Augie Fackler wrote: > >> http://github.com/durin42/dulwich now has two branches: > >> d42-send-fix: the send-pack fix along with some already-passing compat > >> tests, for 0.6.0 > > Thanks, this one was merged for 0.6.0. It also appears to be different with > > a different > > Git SHA on d42-refactor-clients. > > > >> d42-refactor-clients: the larger client refactor, for after 0.6.0, > >> pending discussion > > I'm now looking at this one in more detail. > > > > With regard to connect_ssh / SSHVendor I agree it's a good idea to get rid > > of the current approach. > > I'll need to fix bzr-git to pass in a single function, but I'm happy to do > > that. FWIW the reason > > we had a SSHVendor class was to match what bzr has so I could hook that > > into it easily. > > Bazaar has more methods than connect_ssh on SSHVendor, most prominently > > connect_sftp, which > > is why it is an object rather than a method. > > Actually, having thought about it a little, I think that the default > argument doesn't make a ton of sense either. Would it make sense to > have a dict of connection type to connection method? That is, > > {'tcp': connect_tcp, 'ssh': connect_ssh, ...} > > and then there can be a registration function? That allows registering > new protocol formats fairly easily, and lets us define some kind of > function for "I want to override this method" that'd update the dict. Yeah, that'd make sense. We already have something similar to that - get_transport_and_path() in dulwich.client currently uses a list of prefixes. It could use a dictionary with schemes and a registration function instead.
Cheers, Jelmer _______________________________________________ Mailing list: https://launchpad.net/~dulwich-users Post to : [email protected] Unsubscribe : https://launchpad.net/~dulwich-users More help : https://help.launchpad.net/ListHelp

