Package de.regnis.q.sequence

Examples of de.regnis.q.sequence.QSequenceDifferenceBlock


            final QSequenceLineResult result = QSequenceLineMedia.createBlocks(new QSequenceLineRAFileData(left), new QSequenceLineRAFileData(right), createSimplifier());
            try {
                List blocksList = result.getBlocks();
                for(int i = 0; i < blocksList.size(); i++) {
                    QSequenceDifferenceBlock block = (QSequenceDifferenceBlock) blocksList.get(i);
                    if (block.getLeftSize() > 0) {
                        deleteBlameChunk(block.getRightFrom(), block.getLeftSize(), chain);
                    }
                    if (block.getRightSize() > 0) {
                        insertBlameChunk(myCurrentRevision, myCurrentAuthor,
                                         myCurrentDate, myCurrentPath,
                                         block.getRightFrom(), block.getRightSize(), chain);
                    }
                }
            } finally {
                result.close();
            }
View Full Code Here


          latest.forward();
          continue;
        }

        if (local.hasCurrent() && latest.hasCurrent()) {
          final QSequenceDifferenceBlock localStartBlock = local.current();
          final QSequenceDifferenceBlock latestStartBlock = latest.current();
          if (checkConflict(local, latest, localLines, latestLines, baseLines.getLineCount())) {
            baseLineIndex = createConflict(result, localStartBlock, local.current(), latestStartBlock, latest.current(), localLines, latestLines, baseLineIndex, transformedLocalLines);
            local.forward();
            latest.forward();
            conflict = true;
View Full Code Here

    int baseIndex = 0;

    for (;localIndex < localLines.getLineCount();) {
      final int baseTo;
      if (blockList.hasCurrent()) {
        final QSequenceDifferenceBlock block = blockList.current();
        baseTo = block.getLeftFrom() -1;
      }
      else {
        baseTo = Integer.MAX_VALUE;
      }
View Full Code Here

          latest.forward();
          continue;
        }

        if (local.hasCurrent() && latest.hasCurrent()) {
          final QSequenceDifferenceBlock localStartBlock = local.current();
          final QSequenceDifferenceBlock latestStartBlock = latest.current();
          if (checkConflict(local, latest, localLines, latestLines, baseLines.getLineCount())) {
            if (style == SVNDiffConflictChoiceStyle.CHOOSE_LATEST) {
                        baseLineIndex = appendLines(result, latest.current(), latestLines, baseLineIndex, transformedLocalLines);
                            local.forward();
                        latest.forward();
View Full Code Here

    int baseIndex = 0;

    for (;localIndex < localLines.getLineCount();) {
      final int baseTo;
      if (blockList.hasCurrent()) {
        final QSequenceDifferenceBlock block = blockList.current();
        baseTo = block.getLeftFrom() -1;
      }
      else {
        baseTo = Integer.MAX_VALUE;
      }
View Full Code Here

            final QSequenceLineResult result = QSequenceLineMedia.createBlocks(new QSequenceLineRAFileData(left), new QSequenceLineRAFileData(right), createSimplifier());
            try {
                List blocksList = result.getBlocks();
                for(int i = 0; i < blocksList.size(); i++) {
                    QSequenceDifferenceBlock block = (QSequenceDifferenceBlock) blocksList.get(i);
                    if (block.getLeftSize() > 0) {
                        deleteBlameChunk(block.getRightFrom(), block.getLeftSize(), chain);
                    }
                    if (block.getRightSize() > 0) {
                        insertBlameChunk(myCurrentRevision, myCurrentAuthor,
                                         myCurrentDate, myCurrentPath,
                                         block.getRightFrom(), block.getRightSize(), chain);
                    }
                }
            } finally {
                result.close();
            }
View Full Code Here

            final QSequenceLineResult result = QSequenceLineMedia.createBlocks(new QSequenceLineRAFileData(left), new QSequenceLineRAFileData(right), createSimplifier());
            try {
                List blocksList = result.getBlocks();
                for(int i = 0; i < blocksList.size(); i++) {
                    QSequenceDifferenceBlock block = (QSequenceDifferenceBlock) blocksList.get(i);
                    copyOldLinesToNewLines(oldStart, newStart, block.getLeftFrom() - oldStart, myLines, newLines, result.getRightCache());
                    // copy all from right.
                    for (int j = block.getRightFrom(); j <= block.getRightTo(); j++) {
                        LineInfo line = new LineInfo();
                        line.revision = myCurrentDate != null ? myCurrentRevision : -1;
                        line.author = myCurrentAuthor;
                        line.line = result.getRightCache().getLine(j).getContentBytes();
                        line.date = myCurrentDate;
                        newLines.add(line);
                    }
                  oldStart = block.getLeftTo() + 1;
                  newStart = block.getRightTo() + 1;
                }
                copyOldLinesToNewLines(oldStart, newStart, myLines.size() - oldStart, myLines, newLines, result.getRightCache());
                myLines = newLines;
            }
            finally {
View Full Code Here

            final QSequenceLineResult result = QSequenceLineMedia.createBlocks(new QSequenceLineRAFileData(left), new QSequenceLineRAFileData(right), createSimplifier());
            try {
                List blocksList = result.getBlocks();
                for(int i = 0; i < blocksList.size(); i++) {
                    QSequenceDifferenceBlock block = (QSequenceDifferenceBlock) blocksList.get(i);
                    if (block.getLeftSize() > 0) {
                        deleteBlameChunk(block.getRightFrom(), block.getLeftSize(), chain);
                    }
                    if (block.getRightSize() > 0) {
                        insertBlameChunk(myCurrentRevision, myCurrentAuthor,
                                         myCurrentDate, myCurrentPath,
                                         block.getRightFrom(), block.getRightSize(), chain);
                    }
                }
            } finally {
                result.close();
            }
View Full Code Here

            final QSequenceLineResult result = QSequenceLineMedia.createBlocks(new QSequenceLineRAFileData(left), new QSequenceLineRAFileData(right), createSimplifier());
            try {
                List blocksList = result.getBlocks();
                for(int i = 0; i < blocksList.size(); i++) {
                    QSequenceDifferenceBlock block = (QSequenceDifferenceBlock) blocksList.get(i);
                    if (block.getLeftSize() > 0) {
                        deleteBlameChunk(block.getRightFrom(), block.getLeftSize(), chain);
                    }
                    if (block.getRightSize() > 0) {
                        insertBlameChunk(myCurrentRevision, myCurrentAuthor,
                                         myCurrentDate, myCurrentPath,
                                         block.getRightFrom(), block.getRightSize(), chain);
                    }
                }
            } finally {
                result.close();
            }
View Full Code Here

          latest.forward();
          continue;
        }

        if (local.hasCurrent() && latest.hasCurrent()) {
          final QSequenceDifferenceBlock localStartBlock = local.current();
          final QSequenceDifferenceBlock latestStartBlock = latest.current();
          if (checkConflict(local, latest, localLines, latestLines, baseLines.getLineCount())) {
            baseLineIndex = createConflict(result, localStartBlock, local.current(), latestStartBlock, latest.current(), localLines, latestLines, baseLineIndex, transformedLocalLines);
            local.forward();
            latest.forward();
            conflict = true;
View Full Code Here

TOP

Related Classes of de.regnis.q.sequence.QSequenceDifferenceBlock

Copyright © 2018 www.massapicom. 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.