Bug 336749 - TransportGitSsh.setConnectionFactory
Summary: TransportGitSsh.setConnectionFactory
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 0.11   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 0.12-M1   Edit
Assignee: John Eblen CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2011-02-09 14:29 EST by Roland Schulz CLA
Modified: 2011-03-23 11:56 EDT (History)
4 users (show)

See Also:


Attachments
Ease access restrictions to allow subclassing of TransportGitSsh (6.17 KB, patch)
2011-02-15 14:38 EST, John Eblen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Schulz CLA 2011-02-09 14:29:55 EST
We would like to reuse the Jsch session we already have, but keep it encapsulated and thus not pass it to JGit. Thus it would be nice if TransportGitSsh had a setConnectionFactory method and newConnection would use that factory to create a connection if a factory is available. The connection factory should return a class extending TransportGitSsh.Connection. Thus this class would have to be made public.
Comment 1 Chris Aniszczyk CLA 2011-02-09 16:09:52 EST
We'd love a patch to start the discussion...

http://wiki.eclipse.org/EGit/Contributor_Guide#Contributing_Patches
Comment 2 John Eblen CLA 2011-02-15 14:38:54 EST
Created attachment 189039 [details]
Ease access restrictions to allow subclassing of TransportGitSsh

Rather than creating a connection factory, as first suggested, Roland and I can achieve our goal by being able to subclass TransportGitSsh. This allows us to create our own TransportGitSsh.Connection. Also, the resulting patch is much smaller (only the word "protected" is added in several places, along with required javadoc comments). A more elegant solution could use a connection factory and make the TransportGitSsh.Connection class non-nested. Such a Connection class could allow the remote execution by any method (e.g. telnet, rsh, etc.) (In our case we use org.eclipse.ptp.remote.core.IRemoteProcessBuilder)
Comment 3 Chris Aniszczyk CLA 2011-02-15 14:40:21 EST
Do you mind contributing this patch to our Gerrit instance at http://egit.eclipse.org as outlined in our contributor guide?

http://wiki.eclipse.org/EGit/Contributor_Guide#Contributing_Patches
Comment 4 John Eblen CLA 2011-02-17 10:18:49 EST
I have just contributed the patch to your Gerrit instance.
Comment 5 Chris Aniszczyk CLA 2011-02-17 10:19:36 EST
Thanks John, we'll look at this soon!
Comment 6 Chris Aniszczyk CLA 2011-02-21 20:00:33 EST
Can you update your patch based on Shawn's comments John?
Comment 7 John Eblen CLA 2011-02-21 20:27:06 EST
Yes, we are working on a patch that includes a connection factory. It should be ready by tomorrow or Wednesday at the latest.
Comment 8 John Eblen CLA 2011-02-23 16:18:27 EST
I have just contributed a new patch to your Gerrit instance.
Comment 9 John Eblen CLA 2011-03-03 17:14:11 EST
A new patch is now available on your Gerrit instance.
Comment 10 Chris Aniszczyk CLA 2011-03-07 11:57:18 EST
John and Roland, the foundation requests that you confirm the following by replying to this bug:

1.  You have authored 100% of the content contained within the patch.
2.  You have the rights to contribute the content to the JGit project.
3.  You agree you are contributing the content under the EDL, which is the BSD
license appearing in our file headers.
Comment 11 Roland Schulz CLA 2011-03-07 12:13:28 EST
(In reply to comment #10)

1.  I have authored together with John Eblen 100% of the content contained within the patch.
2.  I have the rights to contribute the content to the JGit project.
3.  I agree I am contributing the content under the EDL.

(In case it matters: I am Eclipse Committer (for the PTP project))
Comment 12 Chris Aniszczyk CLA 2011-03-07 12:22:42 EST
John, can you make similar statements?
Comment 13 John Eblen CLA 2011-03-07 14:28:18 EST
1.  I have authored, along with Roland Schulz, 100% of the content contained
within the patch.
2.  I have the rights to contribute the content to the JGit project.
3.  I agree I am contributing the content under the EDL.
Comment 14 Chris Aniszczyk CLA 2011-03-07 14:30:46 EST
Thanks guys. Now we just have to wait for the CQ...

https://dev.eclipse.org/ipzilla/show_bug.cgi?id=5004
Comment 15 Chris Aniszczyk CLA 2011-03-23 11:56:34 EDT
CQ is approved now and code is merged into master.

Thanks guys!

Sorry for the wait, the IP team is busy around this time of year.