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 class
private static class
private static class
private static class
Nested 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 File
private boolean
private File
private SVNNodeKind
private boolean
private String
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private SVNNodeKind
private boolean
private static final int
private File
private File
private SVNPatchFileStream
private Map<String,
SvnPropertiesPatchTarget> private File
private SVNPatchFileStream
private File
private boolean
private boolean
private boolean
private SVNPatchFileStream
private boolean
Fields inherited from class org.tmatesoft.svn.core.internal.wc2.patch.SvnTargetContent
currentLine, existed
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
applyHunk
(SvnPatchTarget target, SvnTargetContent targetContent, SvnHunkInfo hunkInfo, String propName) static SvnPatchTarget
applyPatch
(SvnPatch patch, File workingCopyDirectory, int stripCount, SVNWCContext context, boolean ignoreWhitespace, boolean removeTempFiles) private static File
chooseTargetFilename
(SvnPatch patch) private static void
copyLinesToTarget
(SvnTargetContent target, int line) private void
createMissingParents
(File workingCopyDirectory, SVNWCContext context, boolean dryRun) private static File
createTempFile
(File workingCopyDirectory, SVNWCContext context) int
private SvnHunkInfo
getHunkInfo
(SvnDiffHunk hunk, SvnTargetContent targetContent, int fuzz, boolean ignoreWhitespace, boolean isPropHunk) private boolean
private boolean
private boolean
boolean
boolean
private static SvnPatchTarget
initPatchTarget
(SvnPatch patch, File workingCopyDirectory, int stripCount, boolean removeTempFiles, SVNWCContext context) void
installPatchedPropTarget
(boolean dryRun, SVNWCContext context) void
installPatchedTarget
(File workingCopyDirectory, boolean dryRun, SVNWCContext context) boolean
isAdded()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
private static boolean
isUnderRoot
(File workingCopyDirectory, File relPath) private static void
obtainEolAndKeywordsForFile
(Map<String, byte[]> keywords, SVNWCContext.SVNEolStyle[] eolStyle, String[] eolStr, SVNWCContext context, File localAbsPath) private void
putPropTarget
(String propName, SvnPropertiesPatchTarget propTarget) private static void
rejectHunk
(SvnPatchTarget target, SvnDiffHunk hunk, String propName) private void
resolveTargetPath
(File pathFromPatchFile, File workingCopyDirectory, int stripCount, boolean propChangesOnly, SVNWCContext context) private void
sendHunkNotification
(SvnHunkInfo hunkInfo, String propName, SVNWCContext context) void
sendPatchNotification
(SVNWCContext context) void
setAbsPath
(File absPath) void
setAdded
(boolean added) void
setCanonPathFromPatchfile
(File canonPathFromPatchfile) void
setCurrentLine
(int currentLine) void
setDbKind
(SVNNodeKind dbKind) void
setDeleted
(boolean deleted) void
void
setExecutable
(boolean executable) void
setExisted
(boolean existed) void
setHadPropRejects
(boolean hadPropRejects) void
setHadRejects
(boolean hadRejects) void
setHasLocalModifications
(boolean hasLocalModifications) void
setHasPropChanges
(boolean hasPropChanges) void
setHasTextChanges
(boolean hasTextChanges) void
setKindOnDisk
(SVNNodeKind kindOnDisk) void
setLocallyDeleted
(boolean locallyDeleted) void
setPatchedAbsPath
(File patchedAbsPath) void
setPatchedStream
(SVNPatchFileStream patchedStream) void
setRejectAbsPath
(File rejectAbsPath) void
setRejectStream
(SVNPatchFileStream rejectStream) void
setRelPath
(File relPath) void
setReplaced
(boolean replaced) void
setSkipped
(boolean skipped) void
setSpecial
(boolean special) void
setStream
(SVNPatchFileStream stream) void
setSymlink
(boolean symlink) void
writeOutRejectedHunks
(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, setWriteCallback
-
Field Details
-
MAX_FUZZ
private static final int MAX_FUZZ- See Also:
-
absPath
-
relPath
-
patchedAbsPath
-
rejectAbsPath
-
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
-
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
-
getMoveTargetAbsPath
-
isDeleted
public boolean isDeleted() -
hasPropChanges
public boolean hasPropChanges() -
setSpecial
public void setSpecial(boolean special) -
getPropTargets
-
getEolStr
- Overrides:
getEolStr
in classSvnTargetContent
-
getRejectAbsPath
-
setRejectAbsPath
-
getStream
-
getPatchedStream
-
setPatchedStream
-
getRejectStream
-
setRejectStream
-
applyPatch
public static SvnPatchTarget applyPatch(SvnPatch patch, File workingCopyDirectory, int stripCount, SVNWCContext context, boolean ignoreWhitespace, boolean removeTempFiles) throws SVNException, IOException - Throws:
SVNException
IOException
-
rejectHunk
private static void rejectHunk(SvnPatchTarget target, SvnDiffHunk hunk, String propName) throws SVNException - Throws:
SVNException
-
applyHunk
private static void applyHunk(SvnPatchTarget target, SvnTargetContent targetContent, SvnHunkInfo hunkInfo, 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, File workingCopyDirectory, int stripCount, boolean removeTempFiles, SVNWCContext context) throws SVNException, IOException - Throws:
SVNException
IOException
-
obtainEolAndKeywordsForFile
private static void obtainEolAndKeywordsForFile(Map<String, byte[]> keywords, SVNWCContext.SVNEolStyle[] eolStyle, String[] eolStr, SVNWCContext context, File localAbsPath) throws SVNException- Throws:
SVNException
-
resolveTargetPath
private void resolveTargetPath(File pathFromPatchFile, File workingCopyDirectory, int stripCount, boolean propChangesOnly, SVNWCContext context) throws SVNException, IOException - Throws:
SVNException
IOException
-
isUnderRoot
- Throws:
SVNException
-
chooseTargetFilename
-
putPropTarget
-
createTempFile
private static File createTempFile(File workingCopyDirectory, SVNWCContext context) throws SVNException - Throws:
SVNException
-
installPatchedTarget
public void installPatchedTarget(File workingCopyDirectory, boolean dryRun, SVNWCContext context) throws SVNException - Throws:
SVNException
-
createMissingParents
private void createMissingParents(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, 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:
setExisted
in classSvnTargetContent
-
setCurrentLine
public void setCurrentLine(int currentLine) - Overrides:
setCurrentLine
in classSvnTargetContent
-
setHasLocalModifications
public void setHasLocalModifications(boolean hasLocalModifications) -
setExecutable
public void setExecutable(boolean executable) -
setAbsPath
-
setRelPath
-
getCanonPathFromPatchfile
-
setCanonPathFromPatchfile
-
getRelPath
-
setLocallyDeleted
public void setLocallyDeleted(boolean locallyDeleted) -
setSymlink
public void setSymlink(boolean symlink) -
isExisted
public boolean isExisted()- Overrides:
isExisted
in classSvnTargetContent
-
getCurrentLine
public int getCurrentLine()- Overrides:
getCurrentLine
in classSvnTargetContent
-
setEolStr
- Overrides:
setEolStr
in classSvnTargetContent
-
isReplaced
public boolean isReplaced() -
isSpecial
public boolean isSpecial() -
isExecutable
public boolean isExecutable() -
getPatchedAbsPath
-
setPatchedAbsPath
-
setHasPropChanges
public void setHasPropChanges(boolean hasPropChanges) -
setHasTextChanges
public void setHasTextChanges(boolean hasTextChanges) -
setStream
-