Class SvnPatchTarget

java.lang.Object
org.tmatesoft.svn.core.internal.wc2.patch.SvnTargetContent
org.tmatesoft.svn.core.internal.wc2.patch.SvnPatchTarget

public class SvnPatchTarget extends SvnTargetContent
  • Field Details

    • MAX_FUZZ

      private static final int MAX_FUZZ
      See Also:
    • absPath

      private java.io.File absPath
    • relPath

      private java.io.File relPath
    • patchedAbsPath

      private java.io.File patchedAbsPath
    • rejectAbsPath

      private java.io.File rejectAbsPath
    • moveTargetAbsPath

      private java.io.File moveTargetAbsPath
    • filtered

      private boolean filtered
    • skipped

      private boolean skipped
    • hasTextChanges

      private boolean hasTextChanges
    • added

      private boolean added
    • deleted

      private boolean deleted
    • hasPropChanges

      private boolean hasPropChanges
    • propTargets

      private java.util.Map<java.lang.String,SvnPropertiesPatchTarget> propTargets
    • special

      private boolean special
    • replaced

      private boolean replaced
    • locallyDeleted

      private boolean locallyDeleted
    • kindOnDisk

      private SVNNodeKind kindOnDisk
    • dbKind

      private SVNNodeKind dbKind
    • hasLocalModifications

      private boolean hasLocalModifications
    • hadRejects

      private boolean hadRejects
    • hadPropRejects

      private boolean hadPropRejects
    • executable

      private boolean executable
    • canonPathFromPatchfile

      private java.io.File canonPathFromPatchfile
    • eolStr

      private java.lang.String eolStr
    • stream

      private SVNPatchFileStream stream
    • patchedStream

      private SVNPatchFileStream patchedStream
    • rejectStream

      private SVNPatchFileStream rejectStream
  • Constructor Details

    • SvnPatchTarget

      public SvnPatchTarget()
  • Method Details

    • isFiltered

      public boolean isFiltered()
    • isSkipped

      public boolean isSkipped()
    • hasTextChanges

      public boolean hasTextChanges()
    • isAdded

      public boolean isAdded()
    • getAbsPath

      public java.io.File getAbsPath()
    • getMoveTargetAbsPath

      public java.io.File getMoveTargetAbsPath()
    • isDeleted

      public boolean isDeleted()
    • hasPropChanges

      public boolean hasPropChanges()
    • setSpecial

      public void setSpecial(boolean special)
    • getPropTargets

      public java.util.Map<java.lang.String,SvnPropertiesPatchTarget> getPropTargets()
    • getEolStr

      public java.lang.String getEolStr()
      Overrides:
      getEolStr in class SvnTargetContent
    • getRejectAbsPath

      public java.io.File getRejectAbsPath()
    • setRejectAbsPath

      public void setRejectAbsPath(java.io.File rejectAbsPath)
    • getStream

      public SVNPatchFileStream getStream()
    • getPatchedStream

      public SVNPatchFileStream getPatchedStream()
    • setPatchedStream

      public void setPatchedStream(SVNPatchFileStream patchedStream)
    • getRejectStream

      public SVNPatchFileStream getRejectStream()
    • setRejectStream

      public void setRejectStream(SVNPatchFileStream rejectStream)
    • applyPatch

      public static SvnPatchTarget applyPatch(SvnPatch patch, java.io.File workingCopyDirectory, int stripCount, SVNWCContext context, boolean ignoreWhitespace, boolean removeTempFiles) throws SVNException, java.io.IOException
      Throws:
      SVNException
      java.io.IOException
    • rejectHunk

      private static void rejectHunk(SvnPatchTarget target, SvnDiffHunk hunk, java.lang.String propName) throws SVNException
      Throws:
      SVNException
    • applyHunk

      private static void applyHunk(SvnPatchTarget target, SvnTargetContent targetContent, SvnHunkInfo hunkInfo, java.lang.String propName) throws SVNException
      Throws:
      SVNException
    • getHunkInfo

      private SvnHunkInfo getHunkInfo(SvnDiffHunk hunk, SvnTargetContent targetContent, int fuzz, boolean ignoreWhitespace, boolean isPropHunk) throws SVNException
      Throws:
      SVNException
    • copyLinesToTarget

      private static void copyLinesToTarget(SvnTargetContent target, int line) throws SVNException
      Throws:
      SVNException
    • initPatchTarget

      private static SvnPatchTarget initPatchTarget(SvnPatch patch, java.io.File workingCopyDirectory, int stripCount, boolean removeTempFiles, SVNWCContext context) throws SVNException, java.io.IOException
      Throws:
      SVNException
      java.io.IOException
    • obtainEolAndKeywordsForFile

      private static void obtainEolAndKeywordsForFile(java.util.Map<java.lang.String,byte[]> keywords, SVNWCContext.SVNEolStyle[] eolStyle, java.lang.String[] eolStr, SVNWCContext context, java.io.File localAbsPath) throws SVNException
      Throws:
      SVNException
    • resolveTargetPath

      private void resolveTargetPath(java.io.File pathFromPatchFile, java.io.File workingCopyDirectory, int stripCount, boolean propChangesOnly, SVNWCContext context) throws SVNException, java.io.IOException
      Throws:
      SVNException
      java.io.IOException
    • isUnderRoot

      private static boolean isUnderRoot(java.io.File workingCopyDirectory, java.io.File relPath) throws SVNException
      Throws:
      SVNException
    • chooseTargetFilename

      private static java.io.File chooseTargetFilename(SvnPatch patch)
    • putPropTarget

      private void putPropTarget(java.lang.String propName, SvnPropertiesPatchTarget propTarget)
    • createTempFile

      private static java.io.File createTempFile(java.io.File workingCopyDirectory, SVNWCContext context) throws SVNException
      Throws:
      SVNException
    • installPatchedTarget

      public void installPatchedTarget(java.io.File workingCopyDirectory, boolean dryRun, SVNWCContext context) throws SVNException
      Throws:
      SVNException
    • createMissingParents

      private void createMissingParents(java.io.File workingCopyDirectory, SVNWCContext context, boolean dryRun) throws SVNException
      Throws:
      SVNException
    • installPatchedPropTarget

      public void installPatchedPropTarget(boolean dryRun, SVNWCContext context) throws SVNException
      Throws:
      SVNException
    • writeOutRejectedHunks

      public void writeOutRejectedHunks(boolean dryRun) throws SVNException
      Throws:
      SVNException
    • sendPatchNotification

      public void sendPatchNotification(SVNWCContext context) throws SVNException
      Throws:
      SVNException
    • sendHunkNotification

      private void sendHunkNotification(SvnHunkInfo hunkInfo, java.lang.String propName, SVNWCContext context) throws SVNException
      Throws:
      SVNException
    • hasLocalModifications

      private boolean hasLocalModifications()
    • hadRejects

      private boolean hadRejects()
    • setHadRejects

      public void setHadRejects(boolean hadRejects)
    • hadPropRejects

      private boolean hadPropRejects()
    • setHadPropRejects

      public void setHadPropRejects(boolean hadPropRejects)
    • setSkipped

      public void setSkipped(boolean skipped)
    • isSymlink

      public boolean isSymlink()
    • setAdded

      public void setAdded(boolean added)
    • setReplaced

      public void setReplaced(boolean replaced)
    • isLocallyDeleted

      public boolean isLocallyDeleted()
    • getKindOnDisk

      public SVNNodeKind getKindOnDisk()
    • getDbKind

      public SVNNodeKind getDbKind()
    • setDeleted

      public void setDeleted(boolean deleted)
    • setDbKind

      public void setDbKind(SVNNodeKind dbKind)
    • setKindOnDisk

      public void setKindOnDisk(SVNNodeKind kindOnDisk)
    • setExisted

      public void setExisted(boolean existed)
      Overrides:
      setExisted in class SvnTargetContent
    • setCurrentLine

      public void setCurrentLine(int currentLine)
      Overrides:
      setCurrentLine in class SvnTargetContent
    • setHasLocalModifications

      public void setHasLocalModifications(boolean hasLocalModifications)
    • setExecutable

      public void setExecutable(boolean executable)
    • setAbsPath

      public void setAbsPath(java.io.File absPath)
    • setRelPath

      public void setRelPath(java.io.File relPath)
    • getCanonPathFromPatchfile

      public java.io.File getCanonPathFromPatchfile()
    • setCanonPathFromPatchfile

      public void setCanonPathFromPatchfile(java.io.File canonPathFromPatchfile)
    • getRelPath

      public java.io.File getRelPath()
    • setLocallyDeleted

      public void setLocallyDeleted(boolean locallyDeleted)
    • setSymlink

      public void setSymlink(boolean symlink)
    • isExisted

      public boolean isExisted()
      Overrides:
      isExisted in class SvnTargetContent
    • getCurrentLine

      public int getCurrentLine()
      Overrides:
      getCurrentLine in class SvnTargetContent
    • setEolStr

      public void setEolStr(java.lang.String eolStr)
      Overrides:
      setEolStr in class SvnTargetContent
    • isReplaced

      public boolean isReplaced()
    • isSpecial

      public boolean isSpecial()
    • isExecutable

      public boolean isExecutable()
    • getPatchedAbsPath

      public java.io.File getPatchedAbsPath()
    • setPatchedAbsPath

      public void setPatchedAbsPath(java.io.File patchedAbsPath)
    • setHasPropChanges

      public void setHasPropChanges(boolean hasPropChanges)
    • setHasTextChanges

      public void setHasTextChanges(boolean hasTextChanges)
    • setStream

      public void setStream(SVNPatchFileStream stream)