public class SVNPatchTarget extends Object
Modifier and Type | Method and Description |
---|---|
void |
applyHunk(SVNPatchHunkInfo hi)
Write the modified text of hunk described by HI to the patched stream of
TARGET.
|
static SVNPatchTarget |
applyPatch(SVNPatch patch,
File absWCPath,
int stripCount,
SVNAdminArea wc)
Apply a PATCH to a working copy at ABS_WC_PATH.
|
void |
copyLinesToTarget(int line)
Copy lines to the patched stream until the specified LINE has been
reached.
|
static String[] |
decomposePath(File path) |
File |
getAbsPath() |
File |
getCanonPathFromPatchfile() |
int |
getCurrentLine() |
String |
getEolStr() |
String |
getEolStyle() |
RandomAccessFile |
getFile() |
SVNPatchHunkInfo |
getHunkInfo(SVNPatchHunk hunk,
int fuzz)
Determine the line at which a HUNK applies to the TARGET file, and return
an appropriate hunk_info object in *HI, allocated from RESULT_POOL.
|
List |
getHunks() |
Map |
getKeywords() |
SVNNodeKind |
getKind() |
List |
getLines() |
SVNPatch |
getPatch() |
OutputStream |
getPatched() |
File |
getPatchedPath() |
OutputStream |
getPatchedRaw() |
SVNPatchFileStream |
getReject() |
File |
getRejectPath() |
File |
getRelPath() |
SVNPatchFileStream |
getStream() |
static SVNPatchTarget |
initPatchTarget(SVNPatch patch,
File baseDir,
int stripCount,
SVNAdminArea wc)
Attempt to initialize a patch TARGET structure for a target file
described by PATCH.
|
void |
installPatchedTarget(File absWCPath,
boolean dryRun,
SVNAdminArea wc)
Install a patched TARGET into the working copy at ABS_WC_PATH.
|
boolean |
isAdded() |
static boolean |
isChildPath(File baseFile,
File file) |
boolean |
isDeleted() |
boolean |
isEof() |
boolean |
isExecutable() |
boolean |
isHadRejects() |
boolean |
isLocalMods() |
boolean |
isModified() |
boolean |
isParentDirExists() |
boolean |
isSkipped() |
void |
readLine(StringBuffer line)
Read a *LINE from TARGET.
|
void |
rejectHunk(SVNPatchHunkInfo hi)
Write the diff text of the hunk described by HI to the reject stream of
TARGET, and mark TARGET as having had rejects.
|
int |
scanForMatch(SVNPatchHunk hunk,
boolean matchFirst,
int upperLine,
int fuzz)
Scan lines of TARGET for a match of the original text of HUNK, up to but
not including the specified UPPER_LINE.
|
void |
seekToLine(int line)
Seek to the specified LINE in TARGET.
|
void |
sendPatchNotification(SVNAdminArea wc)
Use client context CTX to send a suitable notification for a patch
TARGET.
|
static File |
stripPath(File path,
int stripCount) |
public boolean isLocalMods()
public String getEolStr()
public Map getKeywords()
public String getEolStyle()
public RandomAccessFile getFile()
public OutputStream getPatchedRaw()
public File getCanonPathFromPatchfile()
public SVNPatch getPatch()
public int getCurrentLine()
public boolean isModified()
public boolean isEof()
public List getLines()
public boolean isSkipped()
public List getHunks()
public SVNNodeKind getKind()
public SVNPatchFileStream getStream()
public OutputStream getPatched()
public SVNPatchFileStream getReject()
public File getPatchedPath()
public boolean isAdded()
public boolean isDeleted()
public boolean isExecutable()
public File getRejectPath()
public File getAbsPath()
public File getRelPath()
public boolean isHadRejects()
public boolean isParentDirExists()
public static SVNPatchTarget initPatchTarget(SVNPatch patch, File baseDir, int stripCount, SVNAdminArea wc) throws SVNException, IOException
SVNException
IOException
public static boolean isChildPath(File baseFile, File file) throws IOException
IOException
public void rejectHunk(SVNPatchHunkInfo hi) throws SVNException, IOException
IOException
SVNException
public void applyHunk(SVNPatchHunkInfo hi) throws SVNException, IOException
SVNException
IOException
public void seekToLine(int line) throws SVNException, IOException
SVNException
IOException
public void readLine(StringBuffer line) throws SVNException, IOException
SVNException
IOException
public void copyLinesToTarget(int line) throws SVNException, IOException
IOException
SVNException
public void installPatchedTarget(File absWCPath, boolean dryRun, SVNAdminArea wc) throws SVNException
SVNException
public static SVNPatchTarget applyPatch(SVNPatch patch, File absWCPath, int stripCount, SVNAdminArea wc) throws SVNException, IOException
SVNException
IOException
public SVNPatchHunkInfo getHunkInfo(SVNPatchHunk hunk, int fuzz) throws SVNException, IOException
SVNException
IOException
public int scanForMatch(SVNPatchHunk hunk, boolean matchFirst, int upperLine, int fuzz) throws SVNException, IOException
SVNException
IOException
public void sendPatchNotification(SVNAdminArea wc) throws SVNException
SVNException
Copyright © 2018. All rights reserved.