org.tmatesoft.svn.core.SVNDepth Java Examples

The following examples show how to use org.tmatesoft.svn.core.SVNDepth. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SvnKitDiff.java    From StatSVN with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * Gets a single diff for a file between two revisions. 
 */
public int[] getLineDiff(String oldRevNr, String newRevNr, String filename) throws IOException, BinaryDiffException {

    int oldRevisionNo = Integer.parseInt(oldRevNr);
    int newRevisionNo = Integer.parseInt(newRevNr);
    File newFile = new File(getProcessor().getInfoProcessor().relativeToAbsolutePath(filename));
    File oldFile = newFile;
    ByteArrayOutputStream diffBytes = new ByteArrayOutputStream();
    try {
        getManager().getDiffClient().doDiff(oldFile, SVNRevision.create(oldRevisionNo), newFile, SVNRevision.create(newRevisionNo), SVNDepth.INFINITY,
                false, diffBytes, null);
    } catch (SVNException ex) {
        handleSvnException(ex);
    }
    String modDiffDataStr = replaceRelativePathWithinDiffData(getCheckoutDirectory(), diffBytes.toString());

    return parseSingleDiffStream(new ByteArrayInputStream(modDiffDataStr.getBytes()));
}
 
Example #2
Source File: SubversionCommit.java    From Getaviz with Apache License 2.0 6 votes vote down vote up
private String createDiffDescription(long revision, String cleanedFilePath) throws SVNException {
	String returnable = null;
	final SvnOperationFactory svnOperationFactory = new SvnOperationFactory();
	try {
		final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
		final SvnDiffGenerator diffGenerator = new SvnDiffGenerator();
		final SvnDiff diff = svnOperationFactory.createDiff();
		SVNURL currentRepoFilePath = SVNURL.parseURIEncoded(repo.getLocation().toString() + "/" + cleanedFilePath);
		List<SVNFileRevision> revisions = new ArrayList<SVNFileRevision>();
		repo.getFileRevisions(cleanedFilePath, revisions, 0, entry.getRevision());
		diff.setSources(SvnTarget.fromURL(currentRepoFilePath, SVNRevision.create(getLastCommitWhenChanged(revision, revisions))),
				SvnTarget.fromURL(currentRepoFilePath, SVNRevision.create(revision)));
		diff.setUseGitDiffFormat(true);
		diff.setDiffGenerator(diffGenerator);
		diff.setOutput(byteArrayOutputStream);
		diff.setDepth(SVNDepth.EMPTY);
		diff.run();
		returnable = new String(byteArrayOutputStream.toByteArray());
	} finally {
		svnOperationFactory.dispose();
	}
	return returnable;
}
 
Example #3
Source File: ReplayCmd.java    From git-as-svn with GNU General Public License v2.0 6 votes vote down vote up
static void replayRevision(@NotNull SessionContext context, int revision, int lowRevision, boolean sendDeltas) throws IOException, SVNException {
  final DeltaCmd.ReportPipeline pipeline = new DeltaCmd.ReportPipeline(
      new DeltaParams(
          new int[]{revision},
          "",
          "",
          sendDeltas,
          Depth.Infinity,
          SendCopyFrom.OnlyRelative,
          false,
          false,
          lowRevision
      )
  );

  pipeline.setPathReport("", revision - 1, false, SVNDepth.INFINITY);
  pipeline.sendDelta(context);

  final SvnServerWriter writer = context.getWriter();
  writer
      .listBegin()
      .word("finish-replay")
      .listBegin().listEnd()
      .listEnd();
}
 
Example #4
Source File: SvnKitDiff.java    From StatSVN with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * Gets diffs inside one revision. 
 * 
 * @return a list of diffs that were extracted from one particular revision    
 */
public Vector getLineDiff(String newRevNr) throws IOException, BinaryDiffException {
    ByteArrayOutputStream diffBytes = new ByteArrayOutputStream();
    int revisionNo = Integer.parseInt(newRevNr);
    try {
        getManager().getDiffClient().doDiff(getCheckoutDirectory(), SVNRevision.create(revisionNo), SVNRevision.create(revisionNo - 1),
                SVNRevision.create(revisionNo), SVNDepth.INFINITY, false, diffBytes, null);
    } catch (SVNException ex) {
        handleSvnException(ex);
    }
    String modDiffDataStr = replaceRelativePathWithinDiffData(getCheckoutDirectory(), diffBytes.toString());

    final Vector answer = new Vector();
    parseMultipleDiffStream(answer, new ByteArrayInputStream(modDiffDataStr.getBytes()));
    return answer;
}
 
Example #5
Source File: WCDepthTest.java    From git-as-svn with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void infinity() throws SVNException {
  checkout("", SVNDepth.INFINITY);
  Assert.assertTrue(Files.exists(wc.resolve("a/b/c/d")));
  Assert.assertTrue(Files.exists(wc.resolve("a/b/e")));

  update("", null);
  Assert.assertTrue(Files.exists(wc.resolve("a/b/c/d")));
  Assert.assertTrue(Files.exists(wc.resolve("a/b/e")));
}
 
Example #6
Source File: WCDepthTest.java    From git-as-svn with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void emptySubdir2() throws SVNException {
  checkout("a/b/c", SVNDepth.EMPTY);
  Assert.assertFalse(Files.exists(wc.resolve("d")));

  update("", null);
  Assert.assertFalse(Files.exists(wc.resolve("d")));

  update("", SVNDepth.INFINITY);
  Assert.assertTrue(Files.exists(wc.resolve("d")));
}
 
Example #7
Source File: WCDepthTest.java    From git-as-svn with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void emptySubdir() throws SVNException {
  checkout("a/b", SVNDepth.EMPTY);
  Assert.assertFalse(Files.exists(wc.resolve("c")));
  Assert.assertFalse(Files.exists(wc.resolve("e")));

  update("", null);
  Assert.assertFalse(Files.exists(wc.resolve("c")));
  Assert.assertFalse(Files.exists(wc.resolve("e")));

  update("", SVNDepth.INFINITY);
  Assert.assertTrue(Files.exists(wc.resolve("c/d")));
  Assert.assertTrue(Files.exists(wc.resolve("e")));
}
 
Example #8
Source File: WCDepthTest.java    From git-as-svn with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void empty() throws SVNException {
  checkout("", SVNDepth.EMPTY);
  Assert.assertFalse(Files.exists(wc.resolve("a")));

  update("", null);
  Assert.assertFalse(Files.exists(wc.resolve("a")));

  update("", SVNDepth.INFINITY);
  Assert.assertTrue(Files.exists(wc.resolve("a/b/c/d")));
}
 
Example #9
Source File: WCDepthTest.java    From git-as-svn with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void infinitySubdir() throws SVNException {
  checkout("a", SVNDepth.INFINITY);
  Assert.assertTrue(Files.exists(wc.resolve("b/c/d")));
  Assert.assertTrue(Files.exists(wc.resolve("b/e")));

  update("", null);
  Assert.assertTrue(Files.exists(wc.resolve("b/c/d")));
  Assert.assertTrue(Files.exists(wc.resolve("b/e")));
}
 
Example #10
Source File: WCDepthTest.java    From git-as-svn with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void files() throws SVNException {
  checkout("a/b", SVNDepth.FILES);
  Assert.assertFalse(Files.exists(wc.resolve("c")));
  Assert.assertTrue(Files.exists(wc.resolve("e")));

  update("", null);
  Assert.assertFalse(Files.exists(wc.resolve("c")));
  Assert.assertTrue(Files.exists(wc.resolve("e")));

  update("", SVNDepth.INFINITY);
  Assert.assertTrue(Files.exists(wc.resolve("c/d")));
}
 
Example #11
Source File: WCDepthTest.java    From git-as-svn with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void immediates() throws SVNException {
  checkout("a/b", SVNDepth.IMMEDIATES);
  Assert.assertTrue(Files.exists(wc.resolve("c")));
  Assert.assertFalse(Files.exists(wc.resolve("c/d")));
  Assert.assertTrue(Files.exists(wc.resolve("e")));

  update("", null);
  Assert.assertTrue(Files.exists(wc.resolve("c")));
  Assert.assertFalse(Files.exists(wc.resolve("c/d")));
  Assert.assertTrue(Files.exists(wc.resolve("e")));

  update("", SVNDepth.INFINITY);
  Assert.assertTrue(Files.exists(wc.resolve("c/d")));
}
 
Example #12
Source File: WCDepthTest.java    From git-as-svn with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void complex() throws SVNException {
  checkout("", SVNDepth.INFINITY);
  Assert.assertTrue(Files.exists(wc.resolve("a/b/c/d")));

  update("a/b", SVNDepth.FILES);
  Assert.assertFalse(Files.exists(wc.resolve("a/b/c")));
  Assert.assertTrue(Files.exists(wc.resolve("a/b/e")));

  update("", SVNDepth.INFINITY);
  Assert.assertTrue(Files.exists(wc.resolve("a/b/c")));
  Assert.assertTrue(Files.exists(wc.resolve("a/b/c/d")));

  update("a/b", SVNDepth.EMPTY);
  Assert.assertFalse(Files.exists(wc.resolve("a/b/c")));
  Assert.assertFalse(Files.exists(wc.resolve("a/b/e")));

  update("", SVNDepth.INFINITY);
  Assert.assertTrue(Files.exists(wc.resolve("a/b/c/d")));
  Assert.assertTrue(Files.exists(wc.resolve("a/b/e")));

  update("a/b", SVNDepth.IMMEDIATES);
  Assert.assertTrue(Files.exists(wc.resolve("a/b/c")));
  Assert.assertTrue(Files.exists(wc.resolve("a/b/e")));
  Assert.assertFalse(Files.exists(wc.resolve("a/b/c/d")));

  update("", SVNDepth.INFINITY);
  Assert.assertTrue(Files.exists(wc.resolve("a/b/c/d")));
}
 
Example #13
Source File: SvnUpdateTest.java    From git-as-svn with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Bug: svn up doesnt remove file #18
 * <pre>
 * bozaro@landfill:/tmp/test/git-as-svn$ echo > test.txt
 * bozaro@landfill:/tmp/test/git-as-svn$ svn add test.txt
 * A         test.txt
 * bozaro@landfill:/tmp/test/git-as-svn$ svn commit -m "Add new file"
 * Добавляю          test.txt
 * Передаю данные .
 * Committed revision 58.
 * bozaro@landfill:/tmp/test/git-as-svn$ svn up -r 57
 * Updating '.':
 * В редакции 57.
 * bozaro@landfill:/tmp/test/git-as-svn$ ls -l test.txt
 * -rw-rw-r-- 1 bozaro bozaro 1 авг.  15 00:50 test.txt
 * bozaro@landfill:/tmp/test/git-as-svn$
 * </pre>
 */
@Test
public void addAndUpdate() throws Exception {
  try (SvnTestServer server = SvnTestServer.createEmpty()) {
    final SvnOperationFactory factory = server.createOperationFactory();
    final SVNClientManager client = SVNClientManager.newInstance(factory);
    // checkout
    final SvnCheckout checkout = factory.createCheckout();
    checkout.setSource(SvnTarget.fromURL(server.getUrl()));
    checkout.setSingleTarget(SvnTarget.fromFile(server.getTempDirectory().toFile()));
    checkout.setRevision(SVNRevision.HEAD);
    final long revision = checkout.run();
    // create file
    Path newFile = server.getTempDirectory().resolve("somefile.txt");
    TestHelper.saveFile(newFile, "Bla Bla Bla");
    // add file
    client.getWCClient().doAdd(newFile.toFile(), false, false, false, SVNDepth.INFINITY, false, true);
    // set eof property
    client.getWCClient().doSetProperty(newFile.toFile(), SVNProperty.EOL_STYLE, SVNPropertyValue.create(SVNProperty.EOL_STYLE_NATIVE), false, SVNDepth.INFINITY, null, null);
    // commit new file
    client.getCommitClient().doCommit(new File[]{newFile.toFile()}, false, "Add file commit", null, null, false, false, SVNDepth.INFINITY);
    // update for checkout revision
    client.getUpdateClient().doUpdate(server.getTempDirectory().toFile(), SVNRevision.create(revision), SVNDepth.INFINITY, false, false);
    // file must be remove
    Assert.assertFalse(Files.exists(newFile));
  }
}
 
Example #14
Source File: DepthTest.java    From git-as-svn with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "all", dataProviderClass = SvnTesterDataProvider.class)
public void interruptedUpdate(@NotNull SvnTesterFactory factory) throws Exception {
  try (SvnTester server = create(factory)) {
    final long revision = server.openSvnRepository().getLatestRevision();
    check(server, "", SVNDepth.INFINITY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.INFINITY, false);
      reporter.setPath("a/b/c", null, revision, SVNDepth.INFINITY, true);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        "/ - change-dir-prop: svn:entry:committed-date\n" +
        "/ - change-dir-prop: svn:entry:committed-rev\n" +
        "/ - change-dir-prop: svn:entry:last-author\n" +
        "/ - change-dir-prop: svn:entry:uuid\n" +
        "a - change-dir-prop: svn:entry:committed-date\n" +
        "a - change-dir-prop: svn:entry:committed-rev\n" +
        "a - change-dir-prop: svn:entry:last-author\n" +
        "a - change-dir-prop: svn:entry:uuid\n" +
        "a - open-dir: r0\n" +
        "a/b - change-dir-prop: svn:entry:committed-date\n" +
        "a/b - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b - change-dir-prop: svn:entry:last-author\n" +
        "a/b - change-dir-prop: svn:entry:uuid\n" +
        "a/b - open-dir: r0\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-date\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b/c - change-dir-prop: svn:entry:last-author\n" +
        "a/b/c - change-dir-prop: svn:entry:uuid\n" +
        "a/b/c - open-dir: r0\n" +
        "a/b/c/d - add-file\n" +
        "a/b/c/d - apply-text-delta: null\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-date\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/c/d - change-file-prop: svn:entry:last-author\n" +
        "a/b/c/d - change-file-prop: svn:entry:uuid\n" +
        "a/b/c/d - change-file-prop: svn:eol-style\n" +
        "a/b/c/d - close-file: e08b5cff98d6e3f8a892fc999622d441\n" +
        "a/b/c/d - delta-chunk\n" +
        "a/b/c/d - delta-end\n");
  }
}
 
Example #15
Source File: SVNStatusCrawler.java    From celerio with Apache License 2.0 5 votes vote down vote up
public static SCMStatus doStatus(File baseDir) throws RuntimeException {
    // initialize SVNKit to work through file:/// protocol
    FSRepositoryFactory.setup();

    SVNClientManager clientManager = SVNClientManager.newInstance();
    SVNStatusClient statusClient = clientManager.getStatusClient();
    Map<String, Boolean> map = new HashMap<String, Boolean>();
    ISVNStatusHandler handler = new StatusHandler(baseDir, map);

    try {
        statusClient.doStatus(baseDir,
            SVNRevision.WORKING,
            SVNDepth.INFINITY,
            false /* remote */,
            true /* reportAll */,
            false /* includeIgnored */,
            false /* collectParentExternals */,
            handler, null);
    } catch (SVNException svne) {
        throw new RuntimeException(svne);
    }

    int counter = 0;
    for (Boolean b : map.values()) {
        if (b == Boolean.TRUE) {
            counter++;
        }
    }

    log.info("-----------------------------------------------------------------------------------------------");
    log.info("PROJECT IS UNDER SVN: Files tracked by svn ({}) won't be overwritten/deleted by Celerio", counter);
    log.info("-----------------------------------------------------------------------------------------------");

    return new SCMStatus(map);
}
 
Example #16
Source File: SvnClient.java    From steady with Apache License 2.0 5 votes vote down vote up
public File checkoutFile(String _rev, String _rel_path) {
	final SvnOperationFactory svnOperationFactory = new SvnOperationFactory();
	File f = null;
	SVNURL url = null;
	try {
		// Create subdir for given rev
		final String rel_dir = _rel_path.substring(0, _rel_path.lastIndexOf('/'));
		final Path rev_dir = Paths.get(this.workDir.toString(), _rev, rel_dir);
		Path p = Files.createDirectories(rev_dir);

		// Create SVNURL for specific file
		url = SVNURL.parseURIEncoded(this.rootRepo.getRepositoryRoot(false) + "/" + rel_dir);

		// Perform checkout
		SVNRevision revision = SVNRevision.create(Long.valueOf(_rev));

		SVNUpdateClient clnt = new SVNUpdateClient((ISVNAuthenticationManager)this.authManager, null);
		clnt.doCheckout(url, p.toFile(), revision, revision, SVNDepth.FILES, false); //IMMEDIATES, FILES, INFINITY

		//
		//			final SvnCheckout checkout = svnOperationFactory.createCheckout();
		//			checkout.setSingleTarget(SvnTarget.fromFile(p.toFile()));
		//			checkout.setSource(SvnTarget.fromURL(url));
		//			checkout.setDepth(SVNDepth.IMMEDIATES); //INFINITY
		//			checkout.setRevision(revision);
		//
		//			// Checkout and get file
		//			checkout.run();
		f = Paths.get(this.workDir.toString(), _rev, _rel_path).toFile();
	} catch (Exception e) {
		SvnClient.log.error("Error while checking out URL '" + url + "', revision "+ _rev + ": " + e.getMessage());
	} finally {
		svnOperationFactory.dispose();
	}
	return f;
}
 
Example #17
Source File: SvnKitInfo.java    From StatSVN with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Loads the information from svn info if needed.
 * 
 * @param bRootOnly
 *            load only the root?
 * @throws LogSyntaxException
 *             if the format of the svn info is invalid
 * @throws IOException
 *             if we can't read from the response stream.
 */
protected void loadInfo(final boolean bRootOnly) throws LogSyntaxException, IOException {
    if (isQueryNeeded(true /*bRootOnly*/)) {
        clearCache();

        try {
            SVNXMLInfoHandler handler = new SVNXMLInfoHandler(new SvnKitInfoHandler(this));
            handler.setTargetPath(getCheckoutDirectory());
            getManager().getWCClient().doInfo(getCheckoutDirectory(), null, null, SVNDepth.fromRecurse(!bRootOnly), null,
                    handler);
        } catch (SVNException e) {
            handleSvnException(e);
        }
    }
}
 
Example #18
Source File: SvnProctorUtils.java    From proctor with Apache License 2.0 4 votes vote down vote up
static void doInWorkingDirectory(
    final Logger logger,
    final File userDir,
    final String username,
    final String password,
    final SVNURL svnUrl,
    final FileBasedProctorStore.ProctorUpdater updater,
    final String comment) throws IOException, SVNException, Exception {
    final BasicAuthenticationManager authManager = new BasicAuthenticationManager(username, password);
    final SVNClientManager userClientManager = SVNClientManager.newInstance(null, authManager);
    final SVNWCClient wcClient = userClientManager.getWCClient();

    try {
        // Clean up the UserDir
        SvnProctorUtils.cleanUpWorkingDir(logger, userDir, svnUrl, userClientManager);

        /*
            if (previousVersion != 0) {
                final Collection<?> changesSinceGivenVersion = repo.log(new String[] { "" }, null, previousVersion, -1, false, false);
                if (! changesSinceGivenVersion.isEmpty()) {
                    //  TODO: the baseline version is out of date, so need to go back to the user
                }
            }
            updateClient.doCheckout(checkoutUrl, workingDir, null, SVNRevision.HEAD, SVNDepth.INFINITY, false);
        */

        final FileBasedProctorStore.RcsClient rcsClient = new SvnPersisterCoreImpl.SvnRcsClient(wcClient);
        final boolean thingsChanged = updater.doInWorkingDirectory(rcsClient, userDir);

        if (thingsChanged) {
            final SVNCommitClient commitClient = userClientManager.getCommitClient();
            final SVNCommitPacket commit = commitClient.doCollectCommitItems(new File[]{userDir}, false, false, SVNDepth.INFINITY, new String[0]);
            long elapsed = -System.currentTimeMillis();
            final SVNCommitInfo info = commitClient.doCommit(commit, /* keepLocks */ false, comment);
            elapsed += System.currentTimeMillis();
            if (logger.isDebugEnabled()) {
                final StringBuilder changes = new StringBuilder("Committed " + commit.getCommitItems().length + " changes: ");
                for (final SVNCommitItem item : commit.getCommitItems()) {
                    changes.append(item.getKind() + " - " + item.getPath() + ", ");
                }
                changes.append(String.format(" in %d ms new revision: r%d", elapsed, info.getNewRevision()));
                logger.debug(changes.toString());
            }
        }
    } finally {
        userClientManager.dispose();
    }
}
 
Example #19
Source File: SvnPersisterCoreImpl.java    From proctor with Apache License 2.0 4 votes vote down vote up
@Override
public TestVersionResult determineVersions(final String fetchRevision) throws StoreException.ReadException {
    checkShutdownState();

    return doReadWithClientAndRepository(new SvnOperation<TestVersionResult>() {
        @Override
        public TestVersionResult execute(final SVNRepository repo, final SVNClientManager clientManager) throws Exception {
            final String testDefPath = testDefinitionsDirectory;
            /*
            final SVNDirEntry info = repo.info(testDefPath, 2);
            if (info == null) {
                LOGGER.warn("No test matrix found in " + testDefPath + " under " + svnPath);
                return null;
            }
            */
            final Long revision = fetchRevision.length() > 0 ? parseRevisionOrDie(fetchRevision) : Long.valueOf(-1);
            final SVNRevision svnRevision = revision.longValue() > 0 ? SVNRevision.create(revision.longValue()) : SVNRevision.HEAD;
            final SVNLogClient logClient = clientManager.getLogClient();
            final FilterableSVNDirEntryHandler handler = new FilterableSVNDirEntryHandler();
            final SVNURL url = SvnPersisterCoreImpl.this.svnUrl.appendPath(testDefPath, false);
            logClient.doList(url,
                             svnRevision,
                             svnRevision,
                             /* fetchlocks */false,
                             SVNDepth.IMMEDIATES,
                             SVNDirEntry.DIRENT_KIND | SVNDirEntry.DIRENT_CREATED_REVISION,
                             handler);


            final SVNDirEntry logEntry = handler.getParent();

            final List<TestVersionResult.Test> tests = Lists.newArrayListWithExpectedSize(handler.getChildren().size());
            for (final SVNDirEntry testDefFile : handler.getChildren()) {
                if (testDefFile.getKind() != SVNNodeKind.DIR) {
                    LOGGER.warn(String.format("svn kind (%s) is not SVNNodeKind.DIR, skipping %s", testDefFile.getKind(), testDefFile.getURL()));
                    continue;
                }
                final String testName = testDefFile.getName();
                final long testRevision;

                /*
                    When a svn directory gets copied using svn cp source-dir destination-dir, the revision
                    returned by svn list --verbose directory is different from that of svn log directory/sub-dir
                    The revision returned by svn list is the revision of the on the source-dir instead of the destination-dir
                    The code below checks to see if the directory at the provided revision exists, if it does it will use this revision.
                    If the directory does does not exist, try and identify the correct revision using svn log.
                 */
                final SVNLogEntry log = getMostRecentLogEntry(clientManager, testDefPath + "/" + testDefFile.getRelativePath(), svnRevision);
                if (log != null && log.getRevision() != testDefFile.getRevision()) {
                    // The difference in the log.revision and the list.revision can occur during an ( svn cp )
                    if (LOGGER.isDebugEnabled()) {
                        LOGGER.debug("svn log r" + log.getRevision() + " is different than svn list r" + testDefFile.getRevision() + " for " + testDefFile.getURL());
                    }
                    testRevision = log.getRevision();
                } else {
                    testRevision = testDefFile.getRevision();
                }

                tests.add(new TestVersionResult.Test(testName, String.valueOf(testRevision)));
            }

            final String matrixRevision = String.valueOf(logEntry.getRevision());
            return new TestVersionResult(
                tests,
                logEntry.getDate(),
                logEntry.getAuthor(),
                matrixRevision,
                logEntry.getCommitMessage()
            );
        }

        @Override
        public StoreException handleException(final Exception e) throws StoreException {
            throw new StoreException.ReadException("Unable to read from SVN", e);
        }
    });
}
 
Example #20
Source File: SvnPersisterCoreImpl.java    From proctor with Apache License 2.0 4 votes vote down vote up
@Override
public void add(final File file) throws Exception {
    wcClient.doAdd(file, false, false, false, SVNDepth.UNKNOWN, false, true);
}
 
Example #21
Source File: DepthTest.java    From git-as-svn with GNU General Public License v2.0 4 votes vote down vote up
@Test(dataProvider = "all", dataProviderClass = SvnTesterDataProvider.class)
public void immediates(@NotNull SvnTesterFactory factory) throws Exception {
  try (SvnTester server = create(factory)) {
    final long revision = server.openSvnRepository().getLatestRevision();
    // svn checkout --depth immediates a/b
    check(server, "a/b", SVNDepth.IMMEDIATES, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.INFINITY, true);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        "a/b - change-dir-prop: svn:entry:committed-date\n" +
        "a/b - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b - change-dir-prop: svn:entry:last-author\n" +
        "a/b - change-dir-prop: svn:entry:uuid\n" +
        "a/b - open-dir: r0\n" +
        "a/b/c - add-dir\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-date\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b/c - change-dir-prop: svn:entry:last-author\n" +
        "a/b/c - change-dir-prop: svn:entry:uuid\n" +
        "a/b/e - add-file\n" +
        "a/b/e - apply-text-delta: null\n" +
        "a/b/e - change-file-prop: svn:entry:committed-date\n" +
        "a/b/e - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/e - change-file-prop: svn:entry:last-author\n" +
        "a/b/e - change-file-prop: svn:entry:uuid\n" +
        "a/b/e - change-file-prop: svn:eol-style\n" +
        "a/b/e - close-file: babc2f91dac8ef35815e635d89196696\n" +
        "a/b/e - delta-chunk\n" +
        "a/b/e - delta-end\n");

    // svn update
    check(server, "a/b", SVNDepth.UNKNOWN, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.IMMEDIATES, false);
      reporter.finishReport();
    }, " - open-root: r0\n");

    // svn update --set-depth infinity
    check(server, "a/b", SVNDepth.INFINITY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.IMMEDIATES, false);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        "a/b - change-dir-prop: svn:entry:committed-date\n" +
        "a/b - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b - change-dir-prop: svn:entry:last-author\n" +
        "a/b - change-dir-prop: svn:entry:uuid\n" +
        "a/b - open-dir: r0\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-date\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b/c - change-dir-prop: svn:entry:last-author\n" +
        "a/b/c - change-dir-prop: svn:entry:uuid\n" +
        "a/b/c - open-dir: r0\n" +
        "a/b/c/d - add-file\n" +
        "a/b/c/d - apply-text-delta: null\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-date\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/c/d - change-file-prop: svn:entry:last-author\n" +
        "a/b/c/d - change-file-prop: svn:entry:uuid\n" +
        "a/b/c/d - change-file-prop: svn:eol-style\n" +
        "a/b/c/d - close-file: e08b5cff98d6e3f8a892fc999622d441\n" +
        "a/b/c/d - delta-chunk\n" +
        "a/b/c/d - delta-end\n");
  }
}
 
Example #22
Source File: DepthTest.java    From git-as-svn with GNU General Public License v2.0 4 votes vote down vote up
@Test(dataProvider = "all", dataProviderClass = SvnTesterDataProvider.class)
public void files(@NotNull SvnTesterFactory factory) throws Exception {
  try (SvnTester server = create(factory)) {
    final long revision = server.openSvnRepository().getLatestRevision();
    // svn checkout --depth infinity a
    check(server, "a/b", SVNDepth.FILES, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.INFINITY, true);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        "a/b - change-dir-prop: svn:entry:committed-date\n" +
        "a/b - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b - change-dir-prop: svn:entry:last-author\n" +
        "a/b - change-dir-prop: svn:entry:uuid\n" +
        "a/b - open-dir: r0\n" +
        "a/b/e - add-file\n" +
        "a/b/e - apply-text-delta: null\n" +
        "a/b/e - change-file-prop: svn:entry:committed-date\n" +
        "a/b/e - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/e - change-file-prop: svn:entry:last-author\n" +
        "a/b/e - change-file-prop: svn:entry:uuid\n" +
        "a/b/e - change-file-prop: svn:eol-style\n" +
        "a/b/e - close-file: babc2f91dac8ef35815e635d89196696\n" +
        "a/b/e - delta-chunk\n" +
        "a/b/e - delta-end\n");

    // svn update
    check(server, "a/b", SVNDepth.UNKNOWN, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.FILES, false);
      reporter.finishReport();
    }, " - open-root: r0\n");

    // svn update --set-depth infinity
    check(server, "a/b", SVNDepth.INFINITY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.FILES, false);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        "a/b - change-dir-prop: svn:entry:committed-date\n" +
        "a/b - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b - change-dir-prop: svn:entry:last-author\n" +
        "a/b - change-dir-prop: svn:entry:uuid\n" +
        "a/b - open-dir: r0\n" +
        "a/b/c - add-dir\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-date\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b/c - change-dir-prop: svn:entry:last-author\n" +
        "a/b/c - change-dir-prop: svn:entry:uuid\n" +
        "a/b/c/d - add-file\n" +
        "a/b/c/d - apply-text-delta: null\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-date\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/c/d - change-file-prop: svn:entry:last-author\n" +
        "a/b/c/d - change-file-prop: svn:entry:uuid\n" +
        "a/b/c/d - change-file-prop: svn:eol-style\n" +
        "a/b/c/d - close-file: e08b5cff98d6e3f8a892fc999622d441\n" +
        "a/b/c/d - delta-chunk\n" +
        "a/b/c/d - delta-end\n");
  }
}
 
Example #23
Source File: DepthTest.java    From git-as-svn with GNU General Public License v2.0 4 votes vote down vote up
@Test(dataProvider = "all", dataProviderClass = SvnTesterDataProvider.class)
public void infinitySubdir(@NotNull SvnTesterFactory factory) throws Exception {
  try (SvnTester server = create(factory)) {
    final long revision = server.openSvnRepository().getLatestRevision();
    // svn checkout --depth infinity a
    check(server, "a", SVNDepth.INFINITY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.INFINITY, true);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        "a - change-dir-prop: svn:entry:committed-date\n" +
        "a - change-dir-prop: svn:entry:committed-rev\n" +
        "a - change-dir-prop: svn:entry:last-author\n" +
        "a - change-dir-prop: svn:entry:uuid\n" +
        "a - open-dir: r0\n" +
        "a/b - add-dir\n" +
        "a/b - change-dir-prop: svn:entry:committed-date\n" +
        "a/b - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b - change-dir-prop: svn:entry:last-author\n" +
        "a/b - change-dir-prop: svn:entry:uuid\n" +
        "a/b/c - add-dir\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-date\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b/c - change-dir-prop: svn:entry:last-author\n" +
        "a/b/c - change-dir-prop: svn:entry:uuid\n" +
        "a/b/c/d - add-file\n" +
        "a/b/c/d - apply-text-delta: null\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-date\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/c/d - change-file-prop: svn:entry:last-author\n" +
        "a/b/c/d - change-file-prop: svn:entry:uuid\n" +
        "a/b/c/d - change-file-prop: svn:eol-style\n" +
        "a/b/c/d - close-file: e08b5cff98d6e3f8a892fc999622d441\n" +
        "a/b/c/d - delta-chunk\n" +
        "a/b/c/d - delta-end\n" +
        "a/b/e - add-file\n" +
        "a/b/e - apply-text-delta: null\n" +
        "a/b/e - change-file-prop: svn:entry:committed-date\n" +
        "a/b/e - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/e - change-file-prop: svn:entry:last-author\n" +
        "a/b/e - change-file-prop: svn:entry:uuid\n" +
        "a/b/e - change-file-prop: svn:eol-style\n" +
        "a/b/e - close-file: babc2f91dac8ef35815e635d89196696\n" +
        "a/b/e - delta-chunk\n" +
        "a/b/e - delta-end\n");

    // svn update
    check(server, "a", SVNDepth.UNKNOWN, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.INFINITY, false);
      reporter.finishReport();
    }, " - open-root: r0\n");
  }
}
 
Example #24
Source File: DepthTest.java    From git-as-svn with GNU General Public License v2.0 4 votes vote down vote up
@Test(dataProvider = "all", dataProviderClass = SvnTesterDataProvider.class)
public void infinity(@NotNull SvnTesterFactory factory) throws Exception {
  try (SvnTester server = create(factory)) {
    final long revision = server.openSvnRepository().getLatestRevision();
    // svn checkout --depth infinity a
    check(server, "", SVNDepth.INFINITY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.INFINITY, true);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        ".gitattributes - add-file\n" +
        ".gitattributes - apply-text-delta: null\n" +
        ".gitattributes - change-file-prop: svn:entry:committed-date\n" +
        ".gitattributes - change-file-prop: svn:entry:committed-rev\n" +
        ".gitattributes - change-file-prop: svn:entry:last-author\n" +
        ".gitattributes - change-file-prop: svn:entry:uuid\n" +
        ".gitattributes - change-file-prop: svn:eol-style\n" +
        ".gitattributes - close-file: 68b329da9893e34099c7d8ad5cb9c940\n" +
        ".gitattributes - delta-chunk\n" +
        ".gitattributes - delta-end\n" +
        ".gitignore - add-file\n" +
        ".gitignore - apply-text-delta: null\n" +
        ".gitignore - change-file-prop: svn:entry:committed-date\n" +
        ".gitignore - change-file-prop: svn:entry:committed-rev\n" +
        ".gitignore - change-file-prop: svn:entry:last-author\n" +
        ".gitignore - change-file-prop: svn:entry:uuid\n" +
        ".gitignore - change-file-prop: svn:eol-style\n" +
        ".gitignore - close-file: 57457451fdf67806102d334f30c062f3\n" +
        ".gitignore - delta-chunk\n" +
        ".gitignore - delta-end\n" +
        "/ - change-dir-prop: svn:entry:committed-date\n" +
        "/ - change-dir-prop: svn:entry:committed-rev\n" +
        "/ - change-dir-prop: svn:entry:last-author\n" +
        "/ - change-dir-prop: svn:entry:uuid\n" +
        "/ - change-dir-prop: svn:ignore\n" +
        "a - add-dir\n" +
        "a - change-dir-prop: svn:entry:committed-date\n" +
        "a - change-dir-prop: svn:entry:committed-rev\n" +
        "a - change-dir-prop: svn:entry:last-author\n" +
        "a - change-dir-prop: svn:entry:uuid\n" +
        "a/b - add-dir\n" +
        "a/b - change-dir-prop: svn:entry:committed-date\n" +
        "a/b - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b - change-dir-prop: svn:entry:last-author\n" +
        "a/b - change-dir-prop: svn:entry:uuid\n" +
        "a/b/c - add-dir\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-date\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b/c - change-dir-prop: svn:entry:last-author\n" +
        "a/b/c - change-dir-prop: svn:entry:uuid\n" +
        "a/b/c/d - add-file\n" +
        "a/b/c/d - apply-text-delta: null\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-date\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/c/d - change-file-prop: svn:entry:last-author\n" +
        "a/b/c/d - change-file-prop: svn:entry:uuid\n" +
        "a/b/c/d - change-file-prop: svn:eol-style\n" +
        "a/b/c/d - close-file: e08b5cff98d6e3f8a892fc999622d441\n" +
        "a/b/c/d - delta-chunk\n" +
        "a/b/c/d - delta-end\n" +
        "a/b/e - add-file\n" +
        "a/b/e - apply-text-delta: null\n" +
        "a/b/e - change-file-prop: svn:entry:committed-date\n" +
        "a/b/e - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/e - change-file-prop: svn:entry:last-author\n" +
        "a/b/e - change-file-prop: svn:entry:uuid\n" +
        "a/b/e - change-file-prop: svn:eol-style\n" +
        "a/b/e - close-file: babc2f91dac8ef35815e635d89196696\n" +
        "a/b/e - delta-chunk\n" +
        "a/b/e - delta-end\n");

    // svn update
    check(server, "", SVNDepth.UNKNOWN, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.INFINITY, false);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        "/ - change-dir-prop: svn:entry:committed-date\n" +
        "/ - change-dir-prop: svn:entry:committed-rev\n" +
        "/ - change-dir-prop: svn:entry:last-author\n" +
        "/ - change-dir-prop: svn:entry:uuid\n");
  }
}
 
Example #25
Source File: DepthTest.java    From git-as-svn with GNU General Public License v2.0 4 votes vote down vote up
@Test(dataProvider = "all", dataProviderClass = SvnTesterDataProvider.class)
public void emptySubdir2(@NotNull SvnTesterFactory factory) throws Exception {
  try (SvnTester server = create(factory)) {
    final long revision = server.openSvnRepository().getLatestRevision();
    // svn checkout --depth empty
    check(server, "a/b/c", SVNDepth.EMPTY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.EMPTY, true);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-date\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b/c - change-dir-prop: svn:entry:last-author\n" +
        "a/b/c - change-dir-prop: svn:entry:uuid\n" +
        "a/b/c - open-dir: r0\n");

    // svn update
    check(server, "a/b/c", SVNDepth.EMPTY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.EMPTY, false);
      reporter.finishReport();
    }, " - open-root: r0\n");

    // svn update --set-depth infinity
    check(server, "a/b/c", SVNDepth.INFINITY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.EMPTY, false);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-date\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b/c - change-dir-prop: svn:entry:last-author\n" +
        "a/b/c - change-dir-prop: svn:entry:uuid\n" +
        "a/b/c - open-dir: r0\n" +
        "a/b/c/d - add-file\n" +
        "a/b/c/d - apply-text-delta: null\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-date\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/c/d - change-file-prop: svn:entry:last-author\n" +
        "a/b/c/d - change-file-prop: svn:entry:uuid\n" +
        "a/b/c/d - change-file-prop: svn:eol-style\n" +
        "a/b/c/d - close-file: e08b5cff98d6e3f8a892fc999622d441\n" +
        "a/b/c/d - delta-chunk\n" +
        "a/b/c/d - delta-end\n");
  }
}
 
Example #26
Source File: DepthTest.java    From git-as-svn with GNU General Public License v2.0 4 votes vote down vote up
@Test(dataProvider = "all", dataProviderClass = SvnTesterDataProvider.class)
public void emptySubdir(@NotNull SvnTesterFactory factory) throws Exception {
  try (SvnTester server = create(factory)) {
    final long revision = server.openSvnRepository().getLatestRevision();
    // svn checkout --depth empty
    check(server, "a/b", SVNDepth.EMPTY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.EMPTY, true);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        "a/b - change-dir-prop: svn:entry:committed-date\n" +
        "a/b - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b - change-dir-prop: svn:entry:last-author\n" +
        "a/b - change-dir-prop: svn:entry:uuid\n" +
        "a/b - open-dir: r0\n");

    // svn update
    check(server, "a/b", SVNDepth.EMPTY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.EMPTY, false);
      reporter.finishReport();
    }, " - open-root: r0\n");

    // svn update --set-depth infinity
    check(server, "a/b", SVNDepth.INFINITY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.EMPTY, false);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        "a/b - change-dir-prop: svn:entry:committed-date\n" +
        "a/b - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b - change-dir-prop: svn:entry:last-author\n" +
        "a/b - change-dir-prop: svn:entry:uuid\n" +
        "a/b - open-dir: r0\n" +
        "a/b/c - add-dir\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-date\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b/c - change-dir-prop: svn:entry:last-author\n" +
        "a/b/c - change-dir-prop: svn:entry:uuid\n" +
        "a/b/c/d - add-file\n" +
        "a/b/c/d - apply-text-delta: null\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-date\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/c/d - change-file-prop: svn:entry:last-author\n" +
        "a/b/c/d - change-file-prop: svn:entry:uuid\n" +
        "a/b/c/d - change-file-prop: svn:eol-style\n" +
        "a/b/c/d - close-file: e08b5cff98d6e3f8a892fc999622d441\n" +
        "a/b/c/d - delta-chunk\n" +
        "a/b/c/d - delta-end\n" +
        "a/b/e - add-file\n" +
        "a/b/e - apply-text-delta: null\n" +
        "a/b/e - change-file-prop: svn:entry:committed-date\n" +
        "a/b/e - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/e - change-file-prop: svn:entry:last-author\n" +
        "a/b/e - change-file-prop: svn:entry:uuid\n" +
        "a/b/e - change-file-prop: svn:eol-style\n" +
        "a/b/e - close-file: babc2f91dac8ef35815e635d89196696\n" +
        "a/b/e - delta-chunk\n" +
        "a/b/e - delta-end\n");
  }
}
 
Example #27
Source File: DepthTest.java    From git-as-svn with GNU General Public License v2.0 4 votes vote down vote up
@Test(dataProvider = "all", dataProviderClass = SvnTesterDataProvider.class)
public void empty(@NotNull SvnTesterFactory factory) throws Exception {
  try (SvnTester server = create(factory)) {
    final long revision = server.openSvnRepository().getLatestRevision();
    // svn checkout --depth empty
    check(server, "", SVNDepth.EMPTY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.EMPTY, true);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        "/ - change-dir-prop: svn:entry:committed-date\n" +
        "/ - change-dir-prop: svn:entry:committed-rev\n" +
        "/ - change-dir-prop: svn:entry:last-author\n" +
        "/ - change-dir-prop: svn:entry:uuid\n" +
        "/ - change-dir-prop: svn:ignore\n");

    // svn update
    check(server, "", SVNDepth.EMPTY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.EMPTY, false);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        "/ - change-dir-prop: svn:entry:committed-date\n" +
        "/ - change-dir-prop: svn:entry:committed-rev\n" +
        "/ - change-dir-prop: svn:entry:last-author\n" +
        "/ - change-dir-prop: svn:entry:uuid\n");

    // svn update --set-depth infinity
    check(server, "", SVNDepth.INFINITY, reporter -> {
      reporter.setPath("", null, revision, SVNDepth.EMPTY, false);
      reporter.finishReport();
    }, " - open-root: r0\n" +
        ".gitattributes - add-file\n" +
        ".gitattributes - apply-text-delta: null\n" +
        ".gitattributes - change-file-prop: svn:entry:committed-date\n" +
        ".gitattributes - change-file-prop: svn:entry:committed-rev\n" +
        ".gitattributes - change-file-prop: svn:entry:last-author\n" +
        ".gitattributes - change-file-prop: svn:entry:uuid\n" +
        ".gitattributes - change-file-prop: svn:eol-style\n" +
        ".gitattributes - close-file: 68b329da9893e34099c7d8ad5cb9c940\n" +
        ".gitattributes - delta-chunk\n" +
        ".gitattributes - delta-end\n" +
        ".gitignore - add-file\n" +
        ".gitignore - apply-text-delta: null\n" +
        ".gitignore - change-file-prop: svn:entry:committed-date\n" +
        ".gitignore - change-file-prop: svn:entry:committed-rev\n" +
        ".gitignore - change-file-prop: svn:entry:last-author\n" +
        ".gitignore - change-file-prop: svn:entry:uuid\n" +
        ".gitignore - change-file-prop: svn:eol-style\n" +
        ".gitignore - close-file: 57457451fdf67806102d334f30c062f3\n" +
        ".gitignore - delta-chunk\n" +
        ".gitignore - delta-end\n" +
        "/ - change-dir-prop: svn:entry:committed-date\n" +
        "/ - change-dir-prop: svn:entry:committed-rev\n" +
        "/ - change-dir-prop: svn:entry:last-author\n" +
        "/ - change-dir-prop: svn:entry:uuid\n" +
        "a - add-dir\n" +
        "a - change-dir-prop: svn:entry:committed-date\n" +
        "a - change-dir-prop: svn:entry:committed-rev\n" +
        "a - change-dir-prop: svn:entry:last-author\n" +
        "a - change-dir-prop: svn:entry:uuid\n" +
        "a/b - add-dir\n" +
        "a/b - change-dir-prop: svn:entry:committed-date\n" +
        "a/b - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b - change-dir-prop: svn:entry:last-author\n" +
        "a/b - change-dir-prop: svn:entry:uuid\n" +
        "a/b/c - add-dir\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-date\n" +
        "a/b/c - change-dir-prop: svn:entry:committed-rev\n" +
        "a/b/c - change-dir-prop: svn:entry:last-author\n" +
        "a/b/c - change-dir-prop: svn:entry:uuid\n" +
        "a/b/c/d - add-file\n" +
        "a/b/c/d - apply-text-delta: null\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-date\n" +
        "a/b/c/d - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/c/d - change-file-prop: svn:entry:last-author\n" +
        "a/b/c/d - change-file-prop: svn:entry:uuid\n" +
        "a/b/c/d - change-file-prop: svn:eol-style\n" +
        "a/b/c/d - close-file: e08b5cff98d6e3f8a892fc999622d441\n" +
        "a/b/c/d - delta-chunk\n" +
        "a/b/c/d - delta-end\n" +
        "a/b/e - add-file\n" +
        "a/b/e - apply-text-delta: null\n" +
        "a/b/e - change-file-prop: svn:entry:committed-date\n" +
        "a/b/e - change-file-prop: svn:entry:committed-rev\n" +
        "a/b/e - change-file-prop: svn:entry:last-author\n" +
        "a/b/e - change-file-prop: svn:entry:uuid\n" +
        "a/b/e - change-file-prop: svn:eol-style\n" +
        "a/b/e - close-file: babc2f91dac8ef35815e635d89196696\n" +
        "a/b/e - delta-chunk\n" +
        "a/b/e - delta-end\n");
  }
}
 
Example #28
Source File: DepthTest.java    From git-as-svn with GNU General Public License v2.0 4 votes vote down vote up
private void check(@NotNull SvnTester server, @NotNull String path, @Nullable SVNDepth depth, @NotNull ISVNReporterBaton reporterBaton, @NotNull String expected) throws SVNException {
  final SVNRepository repo = server.openSvnRepository();
  final ReportSVNEditor editor = new ReportSVNEditor();
  repo.update(repo.getLatestRevision(), path, depth, false, reporterBaton, editor);
  Assert.assertEquals(editor.toString(), expected);
}