Package org.eclipse.jgit.diff

Examples of org.eclipse.jgit.diff.DiffAlgorithm.diff()


    int cnt = 0;

    final long startTime = mxBean.getCurrentThreadCpuTime();
    long lastTime = startTime;
    while (cpuTimeChanges < minCPUTimerTicks) {
      da.diff(cmp, a, b);
      cnt++;

      long interimTime = mxBean.getCurrentThreadCpuTime();
      if (interimTime != lastTime) {
        cpuTimeChanges++;
View Full Code Here


    int cnt = 0;

    final long startTime = mxBean.getCurrentThreadCpuTime();
    long lastTime = startTime;
    while (cpuTimeChanges < minCPUTimerTicks) {
      da.diff(cmp, a, b);
      cnt++;

      long interimTime = mxBean.getCurrentThreadCpuTime();
      if (interimTime != lastTime) {
        cpuTimeChanges++;
View Full Code Here

        FileDiff fileDiff = new FileDiff();
        fileDiff.a = new RawText("apple\nbanana\ncat\n".getBytes());
        fileDiff.b = new RawText("apple\nbanana\ncorn\n".getBytes());
        DiffAlgorithm diffAlgorithm =
                DiffAlgorithm.getAlgorithm(DiffAlgorithm.SupportedAlgorithm.HISTOGRAM);
        fileDiff.editList = diffAlgorithm.diff(RawTextComparator.DEFAULT, fileDiff.a,
                        fileDiff.b);

        // when
        List<Hunk> hunks = fileDiff.getHunks();
View Full Code Here

      DiffAlgorithm diffAlgorithm = DiffAlgorithm.getAlgorithm(config
          .getEnum(ConfigConstants.CONFIG_DIFF_SECTION, null,
              ConfigConstants.CONFIG_KEY_ALGORITHM,
              SupportedAlgorithm.HISTOGRAM));

      EditList editList = diffAlgorithm.diff(RawTextComparator.DEFAULT,
          oldText, newText);

      return new Diff(diffEntry.getOldPath(), oldText, newText, editList);
    } catch (IOException e) {
      return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.