/** * dump the data in a repository * * @param path the path to the repository * @param dataOut the data will be outputed here * @param errorOut the messages will be outputed here * @param start the first revision to be dumped * @param end the last revision to be dumped * @param incremental the dump will be incremantal * @throws ClientException throw in case of problem */ public void dump(String path, OutputInterface dataOut, OutputInterface errorOut, Revision start, Revision end, boolean incremental) throws ClientException { dump(path, dataOut, errorOut, start, end, incremental, false); }
/** * load the data of a dump into a repository, * * @param path the path to the repository * @param dataInput the data input source * @param messageOutput the target for processing messages * @param ignoreUUID ignore any UUID found in the input stream * @param forceUUID set the repository UUID to any found in the * stream * @param relativePath the directory in the repository, where the data * in put optional. * @throws ClientException throw in case of problem */ public void load(String path, InputInterface dataInput, final OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, String relativePath) throws ClientException { load(path, dataInput, messageOutput, ignoreUUID, forceUUID, false, false, relativePath); }
/** * list all logfiles (BDB) in use or not) * * @param path the path to the repository * @param receiver interface to receive the logfile names * @throws ClientException throw in case of problem */ public void listDBLogs(String path, MessageReceiver receiver) throws ClientException { notImplementedYet("Only " + FSFS + " type of repositories are supported by " + getVersion().toString()); }
/** * Standard initialization of one test * @throws Exception */ protected void setUp() throws Exception { super.setUp(); createDirectories(); // create and configure the needed subversion objects admin = new SVNAdmin(); initClient(); // build and dump the sample repository File greekFiles = buildGreekFiles(); greekRepos = new File(localTmp, "repos"); greekDump = new File(localTmp, "greek_dump"); admin.create(greekRepos.getAbsolutePath(), true,false, null, this.fsType); addExpectedCommitItem(greekFiles.getAbsolutePath(), null, null, NodeKind.none, CommitItemStateFlags.Add); client.doImport(greekFiles.getAbsolutePath(), makeReposUrl(greekRepos), null, true ); admin.dump(greekRepos.getAbsolutePath(), new FileOutputer(greekDump), new IgnoreOutputer(), null, null, false); }
/** * make a hot copy of the repository * * @param path the path to the source repository * @param targetPath the path to the target repository * @param cleanLogs clean the unused log files in the source * repository * @throws ClientException throw in case of problem */ public void hotcopy(String path, String targetPath, boolean cleanLogs) throws ClientException { try { getAdminClient().doHotCopy(new File(path).getAbsoluteFile(), new File(targetPath).getAbsoluteFile()); } catch (SVNException e) { JavaHLObjectFactory.throwException(e, myDelegate); } }
/** * Create the repository for the beginning of the test. * Assumes that {@link #testName} has been set. * * @return the repository directory * @throws SubversionException If there is a problem * creating or loading the repository. * @throws IOException If there is a problem finding the * dump file. */ protected File createInitialRepository(boolean loadGreek) throws SubversionException, IOException { // build a clean repository directory File repos = new File(repositories, this.testName); removeDirOrFile(repos); // create and load the repository from the default repository dump admin.create(repos.getAbsolutePath(), true, false, conf.getAbsolutePath(), fsType); if (loadGreek) { admin.load(repos.getAbsolutePath(), new FileInputer(greekDump), new IgnoreOutputer(), false, false, null); } return repos; }
OutputStream os = createOutputStream(dataOut); try { getAdminClient().setEventHandler(new SVNAdminEventAdapter() { public void handleAdminEvent(SVNAdminEvent event, double progress) throws SVNException { if (errorOut != null && event.getAction() == SVNAdminEventAction.REVISION_DUMPED) { getAdminClient().doDump(new File(path).getAbsoluteFile(), os, JavaHLObjectFactory.getSVNRevision(start), JavaHLObjectFactory.getSVNRevision(end), incremental, useDeltas); } catch (SVNException e) { try { getAdminClient().setEventHandler(null);
public void load(String path, InputInterface dataInput, final OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, boolean usePreCommitHook, boolean usePostCommitHook, String relativePath) throws ClientException { InputStream is = createInputStream(dataInput); try { SVNUUIDAction uuidAction = SVNUUIDAction.DEFAULT; uuidAction = SVNUUIDAction.FORCE_UUID; getAdminClient().setEventHandler(new SVNAdminEventAdapter() { getAdminClient().doLoad(new File(path).getAbsoluteFile(), is, usePreCommitHook, usePostCommitHook, uuidAction, relativePath); } catch (SVNException e) { if (messageOutput != null) { getAdminClient().setEventHandler(null);
/** * deltify the revisions in the repository * * @param path the path to the repository * @param start start revision * @param end end revision * @throws ClientException throw in case of problem */ public void deltify(String path, Revision start, Revision end) throws ClientException { notImplementedYet(); }
/** * set the log message of a revision * * @param path the path to the repository * @param rev the revision to be changed * @param message the message to be set * @param bypassHooks if to bypass all repository hooks * @throws ClientException throw in case of problem * @deprecated Use setRevProp() instead. */ public void setLog(String path, Revision rev, String message, boolean bypassHooks) throws ClientException { try { setRevisionProperty(path, rev, SVNRevisionProperty.LOG, message, bypassHooks, bypassHooks); } catch (SVNException e) { JavaHLObjectFactory.throwException(e, myDelegate); } }
/** * Standard initialization of one test * @throws Exception */ protected void setUp() throws Exception { super.setUp(); createDirectories(); // create and configure the needed subversion objects admin = new SVNAdmin(); initClient(); // build and dump the sample repository File greekFiles = buildGreekFiles(); greekRepos = new File(localTmp, "repos"); greekDump = new File(localTmp, "greek_dump"); admin.create(greekRepos.getAbsolutePath(), true,false, null, this.fsType); addExpectedCommitItem(greekFiles.getAbsolutePath(), null, null, NodeKind.none, CommitItemStateFlags.Add); client.doImport(greekFiles.getAbsolutePath(), makeReposUrl(greekRepos), null, true ); admin.dump(greekRepos.getAbsolutePath(), new FileOutputer(greekDump), new IgnoreOutputer(), null, null, false); }
/** * make a hot copy of the repository * * @param path the path to the source repository * @param targetPath the path to the target repository * @param cleanLogs clean the unused log files in the source * repository * @throws ClientException throw in case of problem */ public void hotcopy(String path, String targetPath, boolean cleanLogs) throws ClientException { try { getAdminClient().doHotCopy(new File(path).getAbsoluteFile(), new File(targetPath).getAbsoluteFile()); } catch (SVNException e) { JavaHLObjectFactory.throwException(e, myDelegate); } }
/** * Create the repository for the beginning of the test. * Assumes that {@link #testName} has been set. * * @return the repository directory * @throws SubversionException If there is a problem * creating or loading the repository. * @throws IOException If there is a problem finding the * dump file. */ protected File createInitialRepository() throws SubversionException, IOException { // build a clean repository directory File repos = new File(repositories, this.testName); removeDirOrFile(repos); // create and load the repository from the default repository dump admin.create(repos.getAbsolutePath(), true, false, conf.getAbsolutePath(), fsType); admin.load(repos.getAbsolutePath(), new FileInputer(greekDump), new IgnoreOutputer(), false, false, null); return repos; }
OutputStream os = createOutputStream(dataOut); try { getAdminClient().setEventHandler(new SVNAdminEventAdapter() { public void handleAdminEvent(SVNAdminEvent event, double progress) throws SVNException { if (errorOut != null && event.getAction() == SVNAdminEventAction.REVISION_DUMPED) { getAdminClient().doDump(new File(path).getAbsoluteFile(), os, JavaHLObjectFactory.getSVNRevision(start), JavaHLObjectFactory.getSVNRevision(end), incremental, useDeltas); } catch (SVNException e) { try { getAdminClient().setEventHandler(null);
public void load(String path, InputInterface dataInput, final OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, boolean usePreCommitHook, boolean usePostCommitHook, String relativePath) throws ClientException { InputStream is = createInputStream(dataInput); try { SVNUUIDAction uuidAction = SVNUUIDAction.DEFAULT; uuidAction = SVNUUIDAction.FORCE_UUID; getAdminClient().setEventHandler(new SVNAdminEventAdapter() { getAdminClient().doLoad(new File(path).getAbsoluteFile(), is, usePreCommitHook, usePostCommitHook, uuidAction, relativePath); } catch (SVNException e) { if (messageOutput != null) { getAdminClient().setEventHandler(null);
/** * deltify the revisions in the repository * * @param path the path to the repository * @param start start revision * @param end end revision * @throws ClientException throw in case of problem */ public void deltify(String path, Revision start, Revision end) throws ClientException { notImplementedYet(); }
/** * set the log message of a revision * * @param path the path to the repository * @param rev the revision to be changed * @param message the message to be set * @param bypassHooks if to bypass all repository hooks * @throws ClientException throw in case of problem * @deprecated Use setRevProp() instead. */ public void setLog(String path, Revision rev, String message, boolean bypassHooks) throws ClientException { try { setRevisionProperty(path, rev, SVNRevisionProperty.LOG, message, bypassHooks, bypassHooks); } catch (SVNException e) { JavaHLObjectFactory.throwException(e, myDelegate); } }
/** * list unused logfiles * * @param path the path to the repository * @param receiver interface to receive the logfile names * @throws ClientException throw in case of problem */ public void listUnusedDBLogs(String path, MessageReceiver receiver) throws ClientException { notImplementedYet("Only " + FSFS + " type of repositories are supported by " + getVersion().toString()); }
/** * load the data of a dump into a repository, * * @param path the path to the repository * @param dataInput the data input source * @param messageOutput the target for processing messages * @param ignoreUUID ignore any UUID found in the input stream * @param forceUUID set the repository UUID to any found in the * stream * @param relativePath the directory in the repository, where the data * in put optional. * @throws ClientException throw in case of problem */ public void load(String path, InputInterface dataInput, final OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, String relativePath) throws ClientException { load(path, dataInput, messageOutput, ignoreUUID, forceUUID, false, false, relativePath); }
/** * dump the data in a repository * * @param path the path to the repository * @param dataOut the data will be outputed here * @param errorOut the messages will be outputed here * @param start the first revision to be dumped * @param end the last revision to be dumped * @param incremental the dump will be incremantal * @throws ClientException throw in case of problem */ public void dump(String path, OutputInterface dataOut, OutputInterface errorOut, Revision start, Revision end, boolean incremental) throws ClientException { dump(path, dataOut, errorOut, start, end, incremental, false); }