List of usage examples for org.eclipse.jgit.transport Connection getRefsMap
Map<String, Ref> getRefsMap();
From source file:org.eclipse.egit.core.op.ListRemoteOperation.java
License:Open Source License
/** * @param pm//from w w w . jav a2s.co m * the monitor to be used for reporting progress and responding * to cancellation. The monitor is never <code>null</code> * @throws InvocationTargetException * @throws InterruptedException */ public void run(IProgressMonitor pm) throws InvocationTargetException, InterruptedException { Transport transport = null; Connection connection = null; try { transport = Transport.open(localDb, uri); if (credentialsProvider != null) transport.setCredentialsProvider(credentialsProvider); transport.setTimeout(this.timeout); if (pm != null) pm.beginTask(CoreText.ListRemoteOperation_title, IProgressMonitor.UNKNOWN); connection = transport.openFetch(); remoteRefsMap = connection.getRefsMap(); } catch (NotSupportedException e) { throw new InvocationTargetException(e); } catch (TransportException e) { throw new InvocationTargetException(e); } finally { if (connection != null) connection.close(); if (transport != null) transport.close(); if (pm != null) pm.done(); } }