|
SVNKit Home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tmatesoft.svn.core.wc.SVNBasicClient
org.tmatesoft.svn.core.wc.SVNDiffClient
The SVNDiffClient class provides methods allowing to get differences between versioned items ('diff' operation) as well as ones intended for merging file contents.
Here's a list of the SVNDiffClient's methods matched against corresponing commands of the SVN command line client:
SVNKit | Subversion |
doDiff() | 'svn diff' |
doDiffStatus() | 'svn diff --summarize' |
doMerge() | 'svn merge' |
Nested Class Summary |
Nested classes inherited from class org.tmatesoft.svn.core.wc.SVNBasicClient |
SVNBasicClient.RepositoryReference, SVNBasicClient.SVNRepositoryLocation |
Field Summary |
Fields inherited from interface org.tmatesoft.svn.core.wc.ISVNEventHandler |
UNKNOWN |
Fields inherited from interface org.tmatesoft.svn.core.ISVNCanceller |
NULL |
Constructor Summary | |
SVNDiffClient(ISVNAuthenticationManager authManager,
ISVNOptions options)
Constructs and initializes an SVNDiffClient object with the specified run-time configuration and authentication drivers. |
|
SVNDiffClient(ISVNRepositoryPool repositoryPool,
ISVNOptions options)
|
Method Summary | |
void |
doDiff(File path1,
SVNRevision rN,
File path2,
SVNRevision rM,
boolean recursive,
boolean useAncestry,
OutputStream result)
Generates the differences comparing either the specified Working Copy paths or their repository location URLs (any combinations are possible) in the specified revisions and writes the result to the provided output stream. |
void |
doDiff(File path,
SVNRevision pegRevision,
SVNRevision rN,
SVNRevision rM,
boolean recursive,
boolean useAncestry,
OutputStream result)
Generates the differences for the specified path taken from the two specified revisions and writes the result to the provided output stream. |
void |
doDiff(File path1,
SVNRevision rN,
SVNURL url2,
SVNRevision rM,
boolean recursive,
boolean useAncestry,
OutputStream result)
Generates the differences comparing the specified URL in a certain revision against either the specified Working Copy path or its repository location URL in the specified revision, and writes the result to the provided output stream. |
void |
doDiff(SVNURL url1,
SVNRevision rN,
File path2,
SVNRevision rM,
boolean recursive,
boolean useAncestry,
OutputStream result)
Generates the differences comparing either the specified Working Copy path or its repository location URL in the specified revision against the specified URL in a certain revision, and writes the result to the provided output stream. |
void |
doDiff(SVNURL url,
SVNRevision pegRevision,
SVNRevision rN,
SVNRevision rM,
boolean recursive,
boolean useAncestry,
OutputStream result)
Generates the differences for the specified URL taken from the two specified revisions and writes the result to the provided output stream. |
void |
doDiff(SVNURL url1,
SVNRevision rN,
SVNURL url2,
SVNRevision rM,
boolean recursive,
boolean useAncestry,
OutputStream result)
Generates the differences for the specified URLs taken from the two specified revisions and writes the result to the provided output stream. |
void |
doDiffStatus(File path1,
SVNRevision rN,
File path2,
SVNRevision rM,
boolean recursive,
boolean useAncestry,
ISVNDiffStatusHandler handler)
Diffs one path against another one providing short status-like change information to the provided handler. |
void |
doDiffStatus(File path1,
SVNRevision rN,
SVNURL url2,
SVNRevision rM,
boolean recursive,
boolean useAncestry,
ISVNDiffStatusHandler handler)
Diffs a path against a url providing short status-like change information to the provided handler. |
void |
doDiffStatus(SVNURL url1,
SVNRevision rN,
File path2,
SVNRevision rM,
boolean recursive,
boolean useAncestry,
ISVNDiffStatusHandler handler)
Diffs a url against a path providing short status-like change information to the provided handler. |
void |
doDiffStatus(SVNURL url1,
SVNRevision rN,
SVNURL url2,
SVNRevision rM,
boolean recursive,
boolean useAncestry,
ISVNDiffStatusHandler handler)
Diffs one url against another one providing short status-like change information to the provided handler. |
void |
doMerge(File path1,
SVNRevision revision1,
File path2,
SVNRevision revision2,
File dstPath,
boolean recusrsive,
boolean useAncestry,
boolean force,
boolean dryRun)
Applies the differences between two sources (using Working Copy paths to get corresponding URLs of the sources) to a Working Copy path. |
void |
doMerge(File path1,
SVNRevision pegRevision,
SVNRevision revision1,
SVNRevision revision2,
File dstPath,
boolean recusrsive,
boolean useAncestry,
boolean force,
boolean dryRun)
Applies the differences between two sources (the repository location of a source Working Copy path in a particular revision against the repository location of the same path in another particular revision) to a Working Copy path. |
void |
doMerge(File path1,
SVNRevision revision1,
SVNURL url2,
SVNRevision revision2,
File dstPath,
boolean recusrsive,
boolean useAncestry,
boolean force,
boolean dryRun)
Applies the differences between two sources (a source URL against the repository location URL of a source Working Copy path) to a Working Copy path. |
void |
doMerge(SVNURL url1,
SVNRevision revision1,
File path2,
SVNRevision revision2,
File dstPath,
boolean recusrsive,
boolean useAncestry,
boolean force,
boolean dryRun)
Applies the differences between two sources (the repository location URL of a source Working Copy against a source URL) to a Working Copy path. |
void |
doMerge(SVNURL url1,
SVNRevision pegRevision,
SVNRevision revision1,
SVNRevision revision2,
File dstPath,
boolean recusrsive,
boolean useAncestry,
boolean force,
boolean dryRun)
Applies the differences between two sources (a source URL in a particular revision against the same source URL in another particular revision) to a Working Copy path. |
void |
doMerge(SVNURL url1,
SVNRevision revision1,
SVNURL url2,
SVNRevision revision2,
File dstPath,
boolean recusrsive,
boolean useAncestry,
boolean force,
boolean dryRun)
Applies the differences between two sources (one source URL against another source URL) to a Working Copy path. |
ISVNDiffGenerator |
getDiffGenerator()
Returns the diff driver being in use. |
SVNDiffOptions |
getMergeOptions()
Gets the diff options that are used in merge operations by this client. |
void |
setDiffGenerator(ISVNDiffGenerator diffGenerator)
Sets the specified diff driver for this object to use for generating and writing file differences to an otput stream. |
void |
setMergeOptions(SVNDiffOptions diffOptions)
Sets diff options for this client to use in merge operations. |
Methods inherited from class org.tmatesoft.svn.core.wc.SVNBasicClient |
checkCancelled, createRepository, createRepository, createRepository, createWCAccess, createWCAccess, dispatchEvent, dispatchEvent, getDebugLog, getEventDispatcher, getLocations, getOptions, getRepositoryPool, getRevisionNumber, getURL, handleEvent, isIgnoreExternals, isLeaveConflictsUnresolved, setDebugLog, setEventHandler, setEventPathPrefix, setIgnoreExternals, setLeaveConflictsUnresolved, setOptions, sleepForTimeStamp |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SVNDiffClient(ISVNAuthenticationManager authManager, ISVNOptions options)
If options
is null,
then this SVNDiffClient will be using a default run-time
configuration driver which takes client-side settings from the
default SVN's run-time configuration area but is not able to
change those settings (read more on ISVNOptions
and SVNWCUtil
).
If authManager
is null,
then this SVNDiffClient will be using a default authentication
and network layers driver (see SVNWCUtil.createDefaultAuthenticationManager()
)
which uses server-side settings and auth storage from the
default SVN's run-time configuration area (or system properties
if that area is not found).
authManager
- an authentication and network layers driveroptions
- a run-time configuration options driverpublic SVNDiffClient(ISVNRepositoryPool repositoryPool, ISVNOptions options)
Method Detail |
public void setDiffGenerator(ISVNDiffGenerator diffGenerator)
If no specific diff driver was set in this way, a default one
will be used (see DefaultSVNDiffGenerator
).
diffGenerator
- a diff drivergetDiffGenerator()
public ISVNDiffGenerator getDiffGenerator()
If no specific diff driver was previously provided, a default one
will be returned (see DefaultSVNDiffGenerator
).
setDiffGenerator(ISVNDiffGenerator)
public void setMergeOptions(SVNDiffOptions diffOptions)
diffOptions
- diff options objectpublic SVNDiffOptions getMergeOptions()
public void doDiff(SVNURL url, SVNRevision pegRevision, SVNRevision rN, SVNRevision rM, boolean recursive, boolean useAncestry, OutputStream result) throws SVNException
Corresponds to the SVN command line client's
'svn diff -r N:M URL'
command.
url
- a repository locationpegRevision
- a revision in which url
is first looked uprN
- an old revisionrM
- a new revisionrecursive
- true to descend
recursivelyuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise notresult
- the target OutputStream
where
the differences will be written to
SVNException
- if one of the following is true:
rN
, rM
and
pegRevision
is invalid
rN
and rM
is
a local revision (see SVNRevision.isLocal()
)
url
was not found in rN
url
was not found in rM
public void doDiff(File path, SVNRevision pegRevision, SVNRevision rN, SVNRevision rM, boolean recursive, boolean useAncestry, OutputStream result) throws SVNException
If rM
is a local revision (see SVNRevision.isLocal()
),
then the Working Copy path
is compared with the corresponding
repository file at revision rN
(that is similar to the SVN command
line client's 'svn diff -r N path'
command).
Otherwise if both rN
and rM
are non-local, then
the repository location of path
is compared for these
revisions ('svn diff -r N:M URL'
).
path
- a Working Copy file pathpegRevision
- a revision in which the repository location of path
is first looked uprN
- an old revisionrM
- a new revision (or a local one)recursive
- true to descend
recursivelyuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise notresult
- the target OutputStream
where
the differences will be written to
SVNException
- if one of the following is true:
rN
, rM
and
pegRevision
is invalid
rN
and rM
are
local revisions
path
was not found in rN
path
was not found in rM
public void doDiff(SVNURL url1, SVNRevision rN, SVNURL url2, SVNRevision rM, boolean recursive, boolean useAncestry, OutputStream result) throws SVNException
Corresponds to the SVN command line client's
'svn diff -r N:M URL1 URL2'
command.
url1
- the first URL to be comparedrN
- a revision of url1
url2
- the second URL to be comparedrM
- a revision of url2
recursive
- true to descend
recursivelyuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise notresult
- the target OutputStream
where
the differences will be written to
SVNException
- if one of the following is true:
rN
and rM
is
invalid
url1
was not found in rN
url2
was not found in rM
public void doDiff(File path1, SVNRevision rN, SVNURL url2, SVNRevision rM, boolean recursive, boolean useAncestry, OutputStream result) throws SVNException
If rN
is not a local revision (see SVNRevision.isLocal()
),
then its repository location URL as it is in the revision represented by
rN
is taken for comparison with url2
.
Corresponds to the SVN command line client's
'svn diff -r N:M PATH URL'
command.
path1
- a WC pathrN
- a revision of path1
url2
- a repository location URL that is to be compared
against path1
(or its repository location)rM
- a revision of url2
recursive
- true to descend
recursivelyuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise notresult
- the target OutputStream
where
the differences will be written to
SVNException
- if one of the following is true:
rN
and rM
is
invalid
path1
is not under version control
path1
has no URL
url2
was not found in rM
path1
was
not found in rN
public void doDiff(SVNURL url1, SVNRevision rN, File path2, SVNRevision rM, boolean recursive, boolean useAncestry, OutputStream result) throws SVNException
If rM
is not a local revision (see SVNRevision.isLocal()
),
then its repository location URL as it is in the revision represented by
rM
is taken for comparison with url1
.
Corresponds to the SVN command line client's
'svn diff -r N:M URL PATH'
command.
url1
- a repository location URLrN
- a revision of url1
path2
- a WC path that is to be compared
against url1
rM
- a revision of path2
recursive
- true to descend
recursivelyuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise notresult
- the target OutputStream
where
the differences will be written to
SVNException
- if one of the following is true:
rN
and rM
is
invalid
path2
is not under version control
path2
has no URL
url1
was not found in rN
path2
was
not found in rM
public void doDiff(File path1, SVNRevision rN, File path2, SVNRevision rM, boolean recursive, boolean useAncestry, OutputStream result) throws SVNException
If both rN
and rM
are local revisions (see SVNRevision.isLocal()
),
then a Working Copy path2
is compared against a Working Copy path1
.
If rN
is a local revision but rM
is not, then
the repository location URL of path2
as it is in the revision
represented by rM
is compared against the Working Copy path1
.
If rM
is a local revision but rN
is not, then
the Working Copy path2
is compared against the repository location
URL of path1
as it is in the revision represented by rN
.
If both rN
and rM
are non-local revisions, then the
repository location URL of path2
in revision rM
is
compared against the repository location URL of path1
in revision
rN
.
path1
- a WC pathrN
- a revision of path1
path2
- a WC path that is to be compared
against path1
rM
- a revision of path2
recursive
- true to descend
recursivelyuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise notresult
- the target OutputStream
where
the differences will be written to
SVNException
- if one of the following is true:
rN
and rM
is
invalid
path1
is not under version control
path1
has no URL
path2
is not under version control
path2
has no URL
path1
was
not found in rN
path2
was
not found in rM
rN
and rM
are local,
but either path1
does not equal path2
,
or rN
is not SVNRevision.BASE
, or
rM
is not SVNRevision.WORKING
public void doDiffStatus(File path1, SVNRevision rN, File path2, SVNRevision rM, boolean recursive, boolean useAncestry, ISVNDiffStatusHandler handler) throws SVNException
path1
- the path of a left-hand item to diffrN
- a revision of path1
path2
- the path of a right-hand item to diffrM
- a revision of path2
recursive
- controls whether operation must recurse or notuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise nothandler
- a diff status handler
SVNException
public void doDiffStatus(File path1, SVNRevision rN, SVNURL url2, SVNRevision rM, boolean recursive, boolean useAncestry, ISVNDiffStatusHandler handler) throws SVNException
path1
- the path of a left-hand item to diffrN
- a revision of path1
url2
- the url of a right-hand item to diffrM
- a revision of url2
recursive
- controls whether operation must recurse or notuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise nothandler
- a diff status handler
SVNException
public void doDiffStatus(SVNURL url1, SVNRevision rN, File path2, SVNRevision rM, boolean recursive, boolean useAncestry, ISVNDiffStatusHandler handler) throws SVNException
url1
- the url of a left-hand item to diffrN
- a revision of url1
path2
- the path of a right-hand item to diffrM
- a revision of path2
recursive
- controls whether operation must recurse or notuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise nothandler
- a diff status handler
SVNException
public void doDiffStatus(SVNURL url1, SVNRevision rN, SVNURL url2, SVNRevision rM, boolean recursive, boolean useAncestry, ISVNDiffStatusHandler handler) throws SVNException
url1
- the url of a left-hand item to diffrN
- a revision of url1
url2
- the url of a right-hand item to diffrM
- a revision of url2
recursive
- controls whether operation must recurse or notuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise nothandler
- a diff status handler
SVNException
public void doMerge(File path1, SVNRevision revision1, File path2, SVNRevision revision2, File dstPath, boolean recusrsive, boolean useAncestry, boolean force, boolean dryRun) throws SVNException
Corresponds to the SVN command line client's
'svn merge sourceWCPATH1@rev1 sourceWCPATH2@rev2 WCPATH'
command.
If you need only to try merging your file(s) without actual merging, you
should set dryRun
to true.
Your event handler will be dispatched status type information on the target
path(s). If a path can be successfully merged, the status type will be
SVNStatusType.MERGED
for that path.
path1
- the first source pathrevision1
- a revision of path1
path2
- the second source path which URL is to be compared
against the URL of path1
revision2
- a revision of path2
dstPath
- the target path to which the result should
be appliedrecusrsive
- true to descend
recursivelyuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise notforce
- true to
force the operation to rundryRun
- if true then
only tries the operation to run (to find out
if a file can be merged successfully)
SVNException
- if one of the following is true:
revision1
and revision2
is
invalid
path1
has no URL
path2
has no URL
path1
was
not found in revision1
path2
was
not found in revision2
dstPath
is not under version control
public void doMerge(File path1, SVNRevision revision1, SVNURL url2, SVNRevision revision2, File dstPath, boolean recusrsive, boolean useAncestry, boolean force, boolean dryRun) throws SVNException
If you need only to try merging your file(s) without actual merging, you
should set dryRun
to true.
Your event handler will be dispatched status type information on the target
path(s). If a path can be successfully merged, the status type will be
SVNStatusType.MERGED
for that path.
path1
- the first source - a WC pathrevision1
- a revision of path1
url2
- the second source - a URL that is to be compared
against the URL of path1
revision2
- a revision of url2
dstPath
- the target path to which the result should
be appliedrecusrsive
- true to descend
recursivelyuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise notforce
- true to
force the operation to rundryRun
- if true then
only tries the operation to run (to find out
if a file can be merged successfully)
SVNException
- if one of the following is true:
revision1
and revision2
is
invalid
path1
has no URL
path1
was
not found in revision1
url2
was not found in
revision2
dstPath
is not under version control
public void doMerge(SVNURL url1, SVNRevision revision1, File path2, SVNRevision revision2, File dstPath, boolean recusrsive, boolean useAncestry, boolean force, boolean dryRun) throws SVNException
If you need only to try merging your file(s) without actual merging, you
should set dryRun
to true.
Your event handler will be dispatched status type information on the target
path(s). If a path can be successfully merged, the status type will be
SVNStatusType.MERGED
for that path.
url1
- the first source - a URLrevision1
- a revision of url1
path2
- the second source - a WC path that is to be compared
against url1
revision2
- a revision of path2
dstPath
- the target path to which the result should
be appliedrecusrsive
- true to descend
recursivelyuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise notforce
- true to
force the operation to rundryRun
- if true then
only tries the operation to run (to find out
if a file can be merged successfully)
SVNException
- if one of the following is true:
revision1
and revision2
is
invalid
path2
has no URL
url1
was not found in
revision1
path2
was
not found in revision2
dstPath
is not under version control
public void doMerge(SVNURL url1, SVNRevision revision1, SVNURL url2, SVNRevision revision2, File dstPath, boolean recusrsive, boolean useAncestry, boolean force, boolean dryRun) throws SVNException
Corresponds to the SVN command line client's
'svn merge sourceURL1@rev1 sourceURL2@rev2 WCPATH'
command.
If you need only to try merging your file(s) without actual merging, you
should set dryRun
to true.
Your event handler will be dispatched status type information on the target
path(s). If a path can be successfully merged, the status type will be
SVNStatusType.MERGED
for that path.
url1
- the first source URLrevision1
- a revision of url1
url2
- the second source URL that is to be compared against
url1
revision2
- a revision of url2
dstPath
- the target path to which the result should
be appliedrecusrsive
- true to descend
recursivelyuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise notforce
- true to
force the operation to rundryRun
- if true then
only tries the operation to run (to find out
if a file can be merged successfully)
SVNException
- if one of the following is true:
revision1
and revision2
is
invalid
url1
was not found in
revision1
url2
was not found in
revision2
dstPath
is not under version control
public void doMerge(SVNURL url1, SVNRevision pegRevision, SVNRevision revision1, SVNRevision revision2, File dstPath, boolean recusrsive, boolean useAncestry, boolean force, boolean dryRun) throws SVNException
Corresponds to the SVN command line client's
'svn merge -r rev1:rev2 URL@pegRev WCPATH'
command.
If you need only to try merging your file(s) without actual merging, you
should set dryRun
to true.
Your event handler will be dispatched status type information on the target
path(s). If a path can be successfully merged, the status type will be
SVNStatusType.MERGED
for that path.
url1
- a source URLpegRevision
- a revision in which code>url1
is first looked uprevision1
- a left-hand revision of url1
revision2
- a right-hand revision of url1
dstPath
- the target path to which the result should
be appliedrecusrsive
- true to descend
recursivelyuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise notforce
- true to
force the operation to rundryRun
- if true then
only tries the operation to run (to find out
if a file can be merged successfully)
SVNException
- if one of the following is true:
revision1
, revision2
and
pegRevision
is invalid
url1
was not found in
revision1
url1
was not found in
revision2
dstPath
is not under version control
public void doMerge(File path1, SVNRevision pegRevision, SVNRevision revision1, SVNRevision revision2, File dstPath, boolean recusrsive, boolean useAncestry, boolean force, boolean dryRun) throws SVNException
Corresponds to the SVN command line client's
'svn merge -r rev1:rev2 sourceWCPATH@pegRev WCPATH'
command.
If you need only to try merging your file(s) without actual merging, you
should set dryRun
to true.
Your event handler will be dispatched status type information on the target
path(s). If a path can be successfully merged, the status type will be
SVNStatusType.MERGED
for that path.
path1
- a source WC pathpegRevision
- a revision in which the repository location of
path1
is first looked uprevision1
- a left-hand revision of path1
revision2
- a right-hand revision of path1
dstPath
- the target path to which the result should
be appliedrecusrsive
- true to descend
recursivelyuseAncestry
- if true then
the paths ancestry will be noticed while calculating differences,
otherwise notforce
- true to
force the operation to rundryRun
- if true then
only tries the operation to run (to find out
if a file can be merged successfully)
SVNException
- if one of the following is true:
revision1
, revision2
and
pegRevision
is invalid
path1
has no URL
path1
was not found in
revision1
path1
was not found in
revision2
dstPath
is not under version control
|
SVNKit Home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |