Class SvnPatchTarget
java.lang.Object
org.tmatesoft.svn.core.internal.wc2.patch.SvnTargetContent
org.tmatesoft.svn.core.internal.wc2.patch.SvnPatchTarget
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static classprivate static classprivate static classNested classes/interfaces inherited from class org.tmatesoft.svn.core.internal.wc2.patch.SvnTargetContent
SvnTargetContent.IRealLineCallback, SvnTargetContent.ISeekCallback, SvnTargetContent.ITellCallback, SvnTargetContent.IWriteCallback -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate java.io.Fileprivate booleanprivate java.io.Fileprivate SVNNodeKindprivate booleanprivate java.lang.Stringprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate SVNNodeKindprivate booleanprivate static final intprivate java.io.Fileprivate java.io.Fileprivate SVNPatchFileStreamprivate java.util.Map<java.lang.String,SvnPropertiesPatchTarget> private java.io.Fileprivate SVNPatchFileStreamprivate java.io.Fileprivate booleanprivate booleanprivate booleanprivate SVNPatchFileStreamprivate booleanFields inherited from class org.tmatesoft.svn.core.internal.wc2.patch.SvnTargetContent
currentLine, existed -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidapplyHunk(SvnPatchTarget target, SvnTargetContent targetContent, SvnHunkInfo hunkInfo, java.lang.String propName) static SvnPatchTargetapplyPatch(SvnPatch patch, java.io.File workingCopyDirectory, int stripCount, SVNWCContext context, boolean ignoreWhitespace, boolean removeTempFiles) private static java.io.FilechooseTargetFilename(SvnPatch patch) private static voidcopyLinesToTarget(SvnTargetContent target, int line) private voidcreateMissingParents(java.io.File workingCopyDirectory, SVNWCContext context, boolean dryRun) private static java.io.FilecreateTempFile(java.io.File workingCopyDirectory, SVNWCContext context) java.io.Filejava.io.Fileintjava.lang.Stringprivate SvnHunkInfogetHunkInfo(SvnDiffHunk hunk, SvnTargetContent targetContent, int fuzz, boolean ignoreWhitespace, boolean isPropHunk) java.io.Filejava.io.Filejava.util.Map<java.lang.String,SvnPropertiesPatchTarget> java.io.Filejava.io.Fileprivate booleanprivate booleanprivate booleanbooleanbooleanprivate static SvnPatchTargetinitPatchTarget(SvnPatch patch, java.io.File workingCopyDirectory, int stripCount, boolean removeTempFiles, SVNWCContext context) voidinstallPatchedPropTarget(boolean dryRun, SVNWCContext context) voidinstallPatchedTarget(java.io.File workingCopyDirectory, boolean dryRun, SVNWCContext context) booleanisAdded()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanprivate static booleanisUnderRoot(java.io.File workingCopyDirectory, java.io.File relPath) private static voidobtainEolAndKeywordsForFile(java.util.Map<java.lang.String, byte[]> keywords, SVNWCContext.SVNEolStyle[] eolStyle, java.lang.String[] eolStr, SVNWCContext context, java.io.File localAbsPath) private voidputPropTarget(java.lang.String propName, SvnPropertiesPatchTarget propTarget) private static voidrejectHunk(SvnPatchTarget target, SvnDiffHunk hunk, java.lang.String propName) private voidresolveTargetPath(java.io.File pathFromPatchFile, java.io.File workingCopyDirectory, int stripCount, boolean propChangesOnly, SVNWCContext context) private voidsendHunkNotification(SvnHunkInfo hunkInfo, java.lang.String propName, SVNWCContext context) voidsendPatchNotification(SVNWCContext context) voidsetAbsPath(java.io.File absPath) voidsetAdded(boolean added) voidsetCanonPathFromPatchfile(java.io.File canonPathFromPatchfile) voidsetCurrentLine(int currentLine) voidsetDbKind(SVNNodeKind dbKind) voidsetDeleted(boolean deleted) voidsetEolStr(java.lang.String eolStr) voidsetExecutable(boolean executable) voidsetExisted(boolean existed) voidsetHadPropRejects(boolean hadPropRejects) voidsetHadRejects(boolean hadRejects) voidsetHasLocalModifications(boolean hasLocalModifications) voidsetHasPropChanges(boolean hasPropChanges) voidsetHasTextChanges(boolean hasTextChanges) voidsetKindOnDisk(SVNNodeKind kindOnDisk) voidsetLocallyDeleted(boolean locallyDeleted) voidsetPatchedAbsPath(java.io.File patchedAbsPath) voidsetPatchedStream(SVNPatchFileStream patchedStream) voidsetRejectAbsPath(java.io.File rejectAbsPath) voidsetRejectStream(SVNPatchFileStream rejectStream) voidsetRelPath(java.io.File relPath) voidsetReplaced(boolean replaced) voidsetSkipped(boolean skipped) voidsetSpecial(boolean special) voidsetStream(SVNPatchFileStream stream) voidsetSymlink(boolean symlink) voidwriteOutRejectedHunks(boolean dryRun) Methods inherited from class org.tmatesoft.svn.core.internal.wc2.patch.SvnTargetContent
addHunkInfo, getEolStyle, getHunkInfos, getKeywords, getLines, getReadBaton, getReadLineCallback, getSeekCallback, getTellCallback, getWriteBaton, getWriteCallback, isEof, matchExistingTarget, readLine, scanForMatch, seekToLine, setEof, setEolStyle, setKeywords, setLines, setReadBaton, setReadLineCallback, setSeekCallback, setTellCallback, setWriteBaton, setWriteCallbackMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
special
private boolean special -
symlink
private boolean symlink -
replaced
private boolean replaced -
locallyDeleted
private boolean locallyDeleted -
kindOnDisk
-
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
-
patchedStream
-
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
-
getEolStr
public java.lang.String getEolStr()- Overrides:
getEolStrin classSvnTargetContent
-
getRejectAbsPath
public java.io.File getRejectAbsPath() -
setRejectAbsPath
public void setRejectAbsPath(java.io.File rejectAbsPath) -
getStream
-
getPatchedStream
-
setPatchedStream
-
getRejectStream
-
setRejectStream
-
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:
SVNExceptionjava.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
- 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:
SVNExceptionjava.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:
SVNExceptionjava.io.IOException
-
isUnderRoot
private static boolean isUnderRoot(java.io.File workingCopyDirectory, java.io.File relPath) throws SVNException - Throws:
SVNException
-
chooseTargetFilename
-
putPropTarget
-
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
- Throws:
SVNException
-
writeOutRejectedHunks
- Throws:
SVNException
-
sendPatchNotification
- 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
-
getDbKind
-
setDeleted
public void setDeleted(boolean deleted) -
setDbKind
-
setKindOnDisk
-
setExisted
public void setExisted(boolean existed) - Overrides:
setExistedin classSvnTargetContent
-
setCurrentLine
public void setCurrentLine(int currentLine) - Overrides:
setCurrentLinein classSvnTargetContent
-
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:
isExistedin classSvnTargetContent
-
getCurrentLine
public int getCurrentLine()- Overrides:
getCurrentLinein classSvnTargetContent
-
setEolStr
public void setEolStr(java.lang.String eolStr) - Overrides:
setEolStrin classSvnTargetContent
-
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
-