Examples of SVNDiffWindow


Examples of org.tmatesoft.svn.core.io.diff.SVNDiffWindow

                        if (curState.myOffset >= curState.myEnd) {
                            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_CORRUPT, "Reading one svndiff window read beyond the end of the representation");
                            SVNErrorManager.error(err, SVNLogType.FSFS);
                        }
                    }
                    SVNDiffWindow window = myCombiner.readWindow(curState.myFile, curState.myVersion);
                    ByteBuffer target = myCombiner.addWindow(window);
                    curState.myChunkIndex++;
                    curState.myOffset = curState.myFile.position();
                    if (target != null) {
                        myBuffer = target;
View Full Code Here

Examples of org.tmatesoft.svn.core.io.diff.SVNDiffWindow

            } catch (IOException e) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.SVNDIFF_CORRUPT_WINDOW);
                SVNErrorManager.error(err, e, SVNLogType.DEFAULT);
            }
        }
        SVNDiffWindow window = new SVNDiffWindow(sourceOffset, sourceLength, targetLength, instructionsLength, dataLength);
        window.setData(myReadWindowBuffer);
        return window;
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.io.diff.SVNDiffWindow

        myWindowData = ensureBufferSize(myWindowData, instrLength + newDataLength);
        myWindowData.put(myNextWindowInstructions);
        myWindowData.put(myNextWindowData);
        myWindowData.position(0); // no need to set 'limit'...
       
        myWindow = new SVNDiffWindow(window.getSourceViewOffset(), window.getSourceViewLength(), myWindow.getTargetViewLength(), instrLength, newDataLength);
        myWindow.setData(myWindowData);
       
        myNextWindowInstructions = clearBuffer(myNextWindowInstructions);
        myNextWindowData = clearBuffer(myNextWindowData);
        return myWindow;
View Full Code Here

Examples of org.tmatesoft.svn.core.io.diff.SVNDiffWindow

            if (myBuffer.remaining() < instructionsLength + newDataLength) {
                return;
            }
            myLastSourceOffset = sourceOffset;
            myLastSourceLength = sourceLength;
            SVNDiffWindow window = null;
            int allDataLength = newDataLength + instructionsLength;
            if (myVersion == 1) {
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                int bufferPosition = myBuffer.position();
                try {
                    instructionsLength = deflate(instructionsLength, out);
                    newDataLength = deflate(newDataLength, out);
                } catch (IOException e) {
                    SVNDebugLog.getDefaultLog().logSevere(SVNLogType.DEFAULT, e);
                }
                byte[] bytes = out.toByteArray();
                ByteBuffer decompressed = ByteBuffer.wrap(bytes);
                decompressed.position(0);
                window = new SVNDiffWindow(sourceOffset, sourceLength, targetLength, instructionsLength, newDataLength);
                window.setData(decompressed);
                myBuffer.position(bufferPosition);
            } else {
                window = new SVNDiffWindow(sourceOffset, sourceLength, targetLength, instructionsLength, newDataLength);
                window.setData(myBuffer);
            }
            int position = myBuffer.position();
            OutputStream os = consumer.textDeltaChunk(path, window);
            SVNFileUtil.closeFile(os);
            myBuffer.position(position + allDataLength);
View Full Code Here

Examples of org.tmatesoft.svn.core.io.diff.SVNDiffWindow

            } catch (IOException e) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.SVNDIFF_CORRUPT_WINDOW);
                SVNErrorManager.error(err, e);
            }
        }
        SVNDiffWindow window = new SVNDiffWindow(sourceOffset, sourceLength, targetLength, instructionsLength, dataLength);
        window.setData(myReadWindowBuffer);
        return window;
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.io.diff.SVNDiffWindow

        myWindowData = ensureBufferSize(myWindowData, instrLength + newDataLength);
        myWindowData.put(myNextWindowInstructions);
        myWindowData.put(myNextWindowData);
        myWindowData.position(0); // no need to set 'limit'...
       
        myWindow = new SVNDiffWindow(window.getSourceViewOffset(), window.getSourceViewLength(), myWindow.getTargetViewLength(), instrLength, newDataLength);
        myWindow.setData(myWindowData);
       
        myNextWindowInstructions = clearBuffer(myNextWindowInstructions);
        myNextWindowData = clearBuffer(myNextWindowData);
        return myWindow;
View Full Code Here

Examples of org.tmatesoft.svn.core.io.diff.SVNDiffWindow

            if (myBuffer.remaining() < instructionsLength + newDataLength) {
                return;
            }
            myLastSourceOffset = sourceOffset;
            myLastSourceLength = sourceLength;
            SVNDiffWindow window = null;
            int allDataLength = newDataLength + instructionsLength;
            if (myVersion == 1) {
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                int bufferPosition = myBuffer.position();
                try {
                    instructionsLength = deflate(instructionsLength, out);
                    newDataLength = deflate(newDataLength, out);
                } catch (IOException e) {
                    SVNDebugLog.getDefaultLog().error(e);
                }
                byte[] bytes = out.toByteArray();
                ByteBuffer decompressed = ByteBuffer.wrap(bytes);
                decompressed.position(0);
                window = new SVNDiffWindow(sourceOffset, sourceLength, targetLength, instructionsLength, newDataLength);
                window.setData(decompressed);
                myBuffer.position(bufferPosition);
            } else {
                window = new SVNDiffWindow(sourceOffset, sourceLength, targetLength, instructionsLength, newDataLength);
                window.setData(myBuffer);
            }
            int position = myBuffer.position();
            OutputStream os = consumer.textDeltaChunk(path, window);
            SVNFileUtil.closeFile(os);
            myBuffer.position(position + allDataLength);
View Full Code Here

Examples of org.tmatesoft.svn.core.io.diff.SVNDiffWindow

                        if (curState.myOffset >= curState.myEnd) {
                            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_CORRUPT, "Reading one svndiff window read beyond the end of the representation");
                            SVNErrorManager.error(err);
                        }
                    }
                    SVNDiffWindow window = myCombiner.readWindow(curState.myFile, curState.myVersion);
                    ByteBuffer target = myCombiner.addWindow(window);
                    curState.myChunkIndex++;
                    curState.myOffset = curState.myFile.position();
                    if (target != null) {
                        myBuffer = target;
View Full Code Here

Examples of org.tmatesoft.svn.core.io.diff.SVNDiffWindow

                        if (curState.myOffset >= curState.myEnd) {
                            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_CORRUPT, "Reading one svndiff window read beyond the end of the representation");
                            SVNErrorManager.error(err, SVNLogType.FSFS);
                        }
                    }
                    SVNDiffWindow window = myCombiner.readWindow(curState.myFile, curState.myVersion);
                    ByteBuffer target = myCombiner.addWindow(window);
                    curState.myChunkIndex++;
                    curState.myOffset = curState.myFile.position();
                    if (target != null) {
                        myBuffer = target;
View Full Code Here

Examples of org.tmatesoft.svn.core.io.diff.SVNDiffWindow

            } catch (IOException e) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.SVNDIFF_CORRUPT_WINDOW);
                SVNErrorManager.error(err, e, SVNLogType.DEFAULT);
            }
        }
        SVNDiffWindow window = new SVNDiffWindow(sourceOffset, sourceLength, targetLength, instructionsLength, dataLength);
        window.setData(myReadWindowBuffer);
        return window;
    }
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.