private SVNRepository getSourceRepository() throws SVNException { if (mySourceRepository == null) { mySourceRepository = SVNRepositoryFactory.create(myRepos.getLocation()); mySourceRepository.setAuthenticationManager(myRepos.getAuthenticationManager()); mySourceRepository.setDebugLog(myRepos.getDebugLog()); mySourceRepository.setTunnelProvider(myRepos.getTunnelProvider()); mySourceRepository.setCanceller(myRepos.getCanceller()); } return mySourceRepository; }
/** * Aborts the transaction. * * @throws SVNException */ public void abortEdit() throws SVNException { if (mySourceRepository != null) { mySourceRepository.closeSession(); mySourceRepository = null; } myCommitEditor.abortEdit(); }
private long getDeletedRevisionFromLog(String path, long pegRevision, long endRevision) throws SVNException { DeletedRevisionLogHandler handler = new DeletedRevisionLogHandler(path); log(null, pegRevision, endRevision, true, true, 0, false, null, handler); return handler.getDeletedRevision(); }
SVNRepository repository = SVNRepositoryFactory.create(url); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(user,password); repository.setAuthenticationManager(authManager); ISVNEditor editor = repository.getCommitEditor("comment" , null); editor.openRoot(-1); editor.openFile("/file1.txt", -1); editor.changeFileProperty("/file1.txt", "mypropertyname", SVNPropertyValue.create("myvalue")); editor.closeFile("/file1.txt",null); editor.closeEdit();
private SVNRepository getSourceRepository() throws SVNException { if (mySourceRepository == null) { mySourceRepository = SVNRepositoryFactory.create(myRepos.getLocation()); mySourceRepository.setAuthenticationManager(myRepos.getAuthenticationManager()); } return mySourceRepository; }
SVNRepository repository = SVNRepositoryFactory.create(url); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(user,password); repository.setAuthenticationManager(authManager); SVNPropertyValue svnPropertyValue = SVNPropertyValue.create("def"); ISVNEditor editor = repository.getCommitEditor("comment", null); editor.openRoot(-1); editor.openDir("dirname", -1); editor.changeDirProperty("myproperty", svnPropertyValue); editor.closeEdit();
private void attemptAccess(ISVNAuthenticationManager m) throws SVNException { SVNRepository repository = SVNRepositoryFactory.create(repo); try { repository.setAuthenticationManager(m); repository.testConnection(); } finally { repository.closeSession(); } }
public static SVNRepository repository(SVNURL url, ISVNAuthenticationManager authenticationManager) throws SVNException { SVNRepository repository; repository = SVNRepositoryFactory.create(url); repository.setAuthenticationManager(authenticationManager); return repository; }
/** * Commits the transaction. * @return commit info * @throws SVNException */ public SVNCommitInfo closeEdit() throws SVNException { myCommitInfo = myCommitEditor.closeEdit(); if (mySourceRepository != null) { mySourceRepository.closeSession(); mySourceRepository = null; } return myCommitInfo; }
SVNRepository repository = SVNRepositoryFactory.create( SVNURL.parseURIDecoded( url ) ); ISVNEditor editor = repository.getCommitEditor( logMessage , null /*locks*/ , true /*keepLocks*/ , null /*mediator*/ ); //the second and the third parameters are the path and revision respectively //of the item's ancestor if the item is being added with history editor.addFile( "your/path/project/README.txt" , null , -1 );
public void maybeCropAndSendSegment(String path, long startRevision, long rangeStart, long rangeEnd, ISVNLocationSegmentHandler handler) throws SVNException { long segmentRangeStart = rangeStart; long segmentRangeEnd = rangeEnd; if (segmentRangeStart <= startRevision) { if (segmentRangeEnd > startRevision) { segmentRangeEnd = startRevision; } if (handler != null) { handler.handleLocationSegment(new SVNLocationSegment(segmentRangeStart, segmentRangeEnd, path)); myCount += segmentRangeEnd - segmentRangeStart + 1; } } }
private SVNRepository getSourceRepository() throws SVNException { if (mySourceRepository == null) { mySourceRepository = SVNRepositoryFactory.create(myRepos.getLocation()); mySourceRepository.setAuthenticationManager(myRepos.getAuthenticationManager()); mySourceRepository.setDebugLog(myRepos.getDebugLog()); mySourceRepository.setTunnelProvider(myRepos.getTunnelProvider()); mySourceRepository.setCanceller(myRepos.getCanceller()); } return mySourceRepository; }
public static SVNRepository repository(SVNURL url, ISVNAuthenticationManager authenticationManager) throws SVNException { SVNRepository repository; repository = SVNRepositoryFactory.create(url); repository.setAuthenticationManager(authenticationManager); return repository; }
/** * Commits the transaction. * @return commit info * @throws SVNException */ public SVNCommitInfo closeEdit() throws SVNException { myCommitInfo = myCommitEditor.closeEdit(); if (mySourceRepository != null) { mySourceRepository.closeSession(); mySourceRepository = null; } return myCommitInfo; }
/** * Aborts the transaction. * * @throws SVNException */ public void abortEdit() throws SVNException { if (mySourceRepository != null) { mySourceRepository.closeSession(); mySourceRepository = null; } myCommitEditor.abortEdit(); }
private long getDeletedRevisionFromLog(String path, long pegRevision, long endRevision) throws SVNException { DeletedRevisionLogHandler handler = new DeletedRevisionLogHandler(path); log(null, pegRevision, endRevision, true, true, 0, false, null, handler); return handler.getDeletedRevision(); }
private SVNRepository getSourceRepository() throws SVNException { if (mySourceRepository == null) { mySourceRepository = SVNRepositoryFactory.create(myRepos.getLocation()); mySourceRepository.setAuthenticationManager(myRepos.getAuthenticationManager()); mySourceRepository.setDebugLog(myRepos.getDebugLog()); mySourceRepository.setTunnelProvider(myRepos.getTunnelProvider()); mySourceRepository.setCanceller(myRepos.getCanceller()); } return mySourceRepository; }
/** * Commits the transaction. * @return commit info * @throws SVNException */ public SVNCommitInfo closeEdit() throws SVNException { myCommitInfo = myCommitEditor.closeEdit(); if (mySourceRepository != null) { mySourceRepository.closeSession(); mySourceRepository = null; } return myCommitInfo; }
/** * Aborts the transaction. * * @throws SVNException */ public void abortEdit() throws SVNException { if (mySourceRepository != null) { mySourceRepository.closeSession(); mySourceRepository = null; } myCommitEditor.abortEdit(); }
private long getDeletedRevisionFromLog(String path, long pegRevision, long endRevision) throws SVNException { DeletedRevisionLogHandler handler = new DeletedRevisionLogHandler(path); log(null, pegRevision, endRevision, true, true, 0, false, null, handler); return handler.getDeletedRevision(); }