public class SvnPatchTarget extends SvnTargetContent
Modifier and Type | Class and Description |
---|---|
private static class |
SvnPatchTarget.RegularCallbacks |
private static class |
SvnPatchTarget.RegularWriteCallback |
private static class |
SvnPatchTarget.SymlinkCallbacks |
private static class |
SvnPatchTarget.SymlinkReadBaton |
SvnTargetContent.IRealLineCallback, SvnTargetContent.ISeekCallback, SvnTargetContent.ITellCallback, SvnTargetContent.IWriteCallback
Modifier and Type | Field and Description |
---|---|
private java.io.File |
absPath |
private boolean |
added |
private java.io.File |
canonPathFromPatchfile |
private SVNNodeKind |
dbKind |
private boolean |
deleted |
private java.lang.String |
eolStr |
private boolean |
executable |
private boolean |
filtered |
private boolean |
hadPropRejects |
private boolean |
hadRejects |
private boolean |
hasLocalModifications |
private boolean |
hasPropChanges |
private boolean |
hasTextChanges |
private SVNNodeKind |
kindOnDisk |
private boolean |
locallyDeleted |
private static int |
MAX_FUZZ |
private java.io.File |
moveTargetAbsPath |
private java.io.File |
patchedAbsPath |
private SVNPatchFileStream |
patchedStream |
private java.util.Map<java.lang.String,SvnPropertiesPatchTarget> |
propTargets |
private java.io.File |
rejectAbsPath |
private SVNPatchFileStream |
rejectStream |
private java.io.File |
relPath |
private boolean |
replaced |
private boolean |
skipped |
private boolean |
special |
private SVNPatchFileStream |
stream |
private boolean |
symlink |
currentLine, existed
Constructor and Description |
---|
SvnPatchTarget() |
Modifier and Type | Method and Description |
---|---|
private static void |
applyHunk(SvnPatchTarget target,
SvnTargetContent targetContent,
SvnHunkInfo hunkInfo,
java.lang.String propName) |
static SvnPatchTarget |
applyPatch(SvnPatch patch,
java.io.File workingCopyDirectory,
int stripCount,
SVNWCContext context,
boolean ignoreWhitespace,
boolean removeTempFiles) |
private static java.io.File |
chooseTargetFilename(SvnPatch patch) |
private static void |
copyLinesToTarget(SvnTargetContent target,
int line) |
private void |
createMissingParents(java.io.File workingCopyDirectory,
SVNWCContext context,
boolean dryRun) |
private static java.io.File |
createTempFile(java.io.File workingCopyDirectory,
SVNWCContext context) |
java.io.File |
getAbsPath() |
java.io.File |
getCanonPathFromPatchfile() |
int |
getCurrentLine() |
SVNNodeKind |
getDbKind() |
java.lang.String |
getEolStr() |
private SvnHunkInfo |
getHunkInfo(SvnDiffHunk hunk,
SvnTargetContent targetContent,
int fuzz,
boolean ignoreWhitespace,
boolean isPropHunk) |
SVNNodeKind |
getKindOnDisk() |
java.io.File |
getMoveTargetAbsPath() |
java.io.File |
getPatchedAbsPath() |
SVNPatchFileStream |
getPatchedStream() |
java.util.Map<java.lang.String,SvnPropertiesPatchTarget> |
getPropTargets() |
java.io.File |
getRejectAbsPath() |
SVNPatchFileStream |
getRejectStream() |
java.io.File |
getRelPath() |
SVNPatchFileStream |
getStream() |
private boolean |
hadPropRejects() |
private boolean |
hadRejects() |
private boolean |
hasLocalModifications() |
boolean |
hasPropChanges() |
boolean |
hasTextChanges() |
private static SvnPatchTarget |
initPatchTarget(SvnPatch patch,
java.io.File workingCopyDirectory,
int stripCount,
boolean removeTempFiles,
SVNWCContext context) |
void |
installPatchedPropTarget(boolean dryRun,
SVNWCContext context) |
void |
installPatchedTarget(java.io.File workingCopyDirectory,
boolean dryRun,
SVNWCContext context) |
boolean |
isAdded() |
boolean |
isDeleted() |
boolean |
isExecutable() |
boolean |
isExisted() |
boolean |
isFiltered() |
boolean |
isLocallyDeleted() |
boolean |
isReplaced() |
boolean |
isSkipped() |
boolean |
isSpecial() |
boolean |
isSymlink() |
private static boolean |
isUnderRoot(java.io.File workingCopyDirectory,
java.io.File relPath) |
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) |
private void |
putPropTarget(java.lang.String propName,
SvnPropertiesPatchTarget propTarget) |
private static void |
rejectHunk(SvnPatchTarget target,
SvnDiffHunk hunk,
java.lang.String propName) |
private void |
resolveTargetPath(java.io.File pathFromPatchFile,
java.io.File workingCopyDirectory,
int stripCount,
boolean propChangesOnly,
SVNWCContext context) |
private void |
sendHunkNotification(SvnHunkInfo hunkInfo,
java.lang.String propName,
SVNWCContext context) |
void |
sendPatchNotification(SVNWCContext context) |
void |
setAbsPath(java.io.File absPath) |
void |
setAdded(boolean added) |
void |
setCanonPathFromPatchfile(java.io.File canonPathFromPatchfile) |
void |
setCurrentLine(int currentLine) |
void |
setDbKind(SVNNodeKind dbKind) |
void |
setDeleted(boolean deleted) |
void |
setEolStr(java.lang.String eolStr) |
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(java.io.File patchedAbsPath) |
void |
setPatchedStream(SVNPatchFileStream patchedStream) |
void |
setRejectAbsPath(java.io.File rejectAbsPath) |
void |
setRejectStream(SVNPatchFileStream rejectStream) |
void |
setRelPath(java.io.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) |
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
private static final int MAX_FUZZ
private java.io.File absPath
private java.io.File relPath
private java.io.File patchedAbsPath
private java.io.File rejectAbsPath
private java.io.File moveTargetAbsPath
private boolean filtered
private boolean skipped
private boolean hasTextChanges
private boolean added
private boolean deleted
private boolean hasPropChanges
private java.util.Map<java.lang.String,SvnPropertiesPatchTarget> propTargets
private boolean special
private boolean symlink
private boolean replaced
private boolean locallyDeleted
private SVNNodeKind kindOnDisk
private SVNNodeKind dbKind
private boolean hasLocalModifications
private boolean hadRejects
private boolean hadPropRejects
private boolean executable
private java.io.File canonPathFromPatchfile
private java.lang.String eolStr
private SVNPatchFileStream stream
private SVNPatchFileStream patchedStream
private SVNPatchFileStream rejectStream
public boolean isFiltered()
public boolean isSkipped()
public boolean hasTextChanges()
public boolean isAdded()
public java.io.File getAbsPath()
public java.io.File getMoveTargetAbsPath()
public boolean isDeleted()
public boolean hasPropChanges()
public void setSpecial(boolean special)
public java.util.Map<java.lang.String,SvnPropertiesPatchTarget> getPropTargets()
public java.lang.String getEolStr()
getEolStr
in class SvnTargetContent
public java.io.File getRejectAbsPath()
public void setRejectAbsPath(java.io.File rejectAbsPath)
public SVNPatchFileStream getStream()
public SVNPatchFileStream getPatchedStream()
public void setPatchedStream(SVNPatchFileStream patchedStream)
public SVNPatchFileStream getRejectStream()
public void setRejectStream(SVNPatchFileStream rejectStream)
public static SvnPatchTarget applyPatch(SvnPatch patch, java.io.File workingCopyDirectory, int stripCount, SVNWCContext context, boolean ignoreWhitespace, boolean removeTempFiles) throws SVNException, java.io.IOException
SVNException
java.io.IOException
private static void rejectHunk(SvnPatchTarget target, SvnDiffHunk hunk, java.lang.String propName) throws SVNException
SVNException
private static void applyHunk(SvnPatchTarget target, SvnTargetContent targetContent, SvnHunkInfo hunkInfo, java.lang.String propName) throws SVNException
SVNException
private SvnHunkInfo getHunkInfo(SvnDiffHunk hunk, SvnTargetContent targetContent, int fuzz, boolean ignoreWhitespace, boolean isPropHunk) throws SVNException
SVNException
private static void copyLinesToTarget(SvnTargetContent target, int line) throws SVNException
SVNException
private static SvnPatchTarget initPatchTarget(SvnPatch patch, java.io.File workingCopyDirectory, int stripCount, boolean removeTempFiles, SVNWCContext context) throws SVNException, java.io.IOException
SVNException
java.io.IOException
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
SVNException
private void resolveTargetPath(java.io.File pathFromPatchFile, java.io.File workingCopyDirectory, int stripCount, boolean propChangesOnly, SVNWCContext context) throws SVNException, java.io.IOException
SVNException
java.io.IOException
private static boolean isUnderRoot(java.io.File workingCopyDirectory, java.io.File relPath) throws SVNException
SVNException
private static java.io.File chooseTargetFilename(SvnPatch patch)
private void putPropTarget(java.lang.String propName, SvnPropertiesPatchTarget propTarget)
private static java.io.File createTempFile(java.io.File workingCopyDirectory, SVNWCContext context) throws SVNException
SVNException
public void installPatchedTarget(java.io.File workingCopyDirectory, boolean dryRun, SVNWCContext context) throws SVNException
SVNException
private void createMissingParents(java.io.File workingCopyDirectory, SVNWCContext context, boolean dryRun) throws SVNException
SVNException
public void installPatchedPropTarget(boolean dryRun, SVNWCContext context) throws SVNException
SVNException
public void writeOutRejectedHunks(boolean dryRun) throws SVNException
SVNException
public void sendPatchNotification(SVNWCContext context) throws SVNException
SVNException
private void sendHunkNotification(SvnHunkInfo hunkInfo, java.lang.String propName, SVNWCContext context) throws SVNException
SVNException
private boolean hasLocalModifications()
private boolean hadRejects()
public void setHadRejects(boolean hadRejects)
private boolean hadPropRejects()
public void setHadPropRejects(boolean hadPropRejects)
public void setSkipped(boolean skipped)
public boolean isSymlink()
public void setAdded(boolean added)
public void setReplaced(boolean replaced)
public boolean isLocallyDeleted()
public SVNNodeKind getKindOnDisk()
public SVNNodeKind getDbKind()
public void setDeleted(boolean deleted)
public void setDbKind(SVNNodeKind dbKind)
public void setKindOnDisk(SVNNodeKind kindOnDisk)
public void setExisted(boolean existed)
setExisted
in class SvnTargetContent
public void setCurrentLine(int currentLine)
setCurrentLine
in class SvnTargetContent
public void setHasLocalModifications(boolean hasLocalModifications)
public void setExecutable(boolean executable)
public void setAbsPath(java.io.File absPath)
public void setRelPath(java.io.File relPath)
public java.io.File getCanonPathFromPatchfile()
public void setCanonPathFromPatchfile(java.io.File canonPathFromPatchfile)
public java.io.File getRelPath()
public void setLocallyDeleted(boolean locallyDeleted)
public void setSymlink(boolean symlink)
public boolean isExisted()
isExisted
in class SvnTargetContent
public int getCurrentLine()
getCurrentLine
in class SvnTargetContent
public void setEolStr(java.lang.String eolStr)
setEolStr
in class SvnTargetContent
public boolean isReplaced()
public boolean isSpecial()
public boolean isExecutable()
public java.io.File getPatchedAbsPath()
public void setPatchedAbsPath(java.io.File patchedAbsPath)
public void setHasPropChanges(boolean hasPropChanges)
public void setHasTextChanges(boolean hasTextChanges)
public void setStream(SVNPatchFileStream stream)