Package org.tmatesoft.svn.core.wc
Class SVNMergeFileSet
java.lang.Object
org.tmatesoft.svn.core.wc.SVNMergeFileSet
public class SVNMergeFileSet
extends java.lang.Object
The SVNMergeFileSet class holds information about the file that is to be merged.
This information includes references to
File
objects with working, base, repository contents;
file mimeType; labels to append to the file name to produce conflict files in case a merge fails with a
conflict, and so on.- Since:
- 1.2
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SVNAdminArea
private java.io.File
private java.lang.String
private java.lang.String
private java.io.File
private java.io.File
private java.lang.String
private java.lang.String
private SVNLog
private java.io.File
private java.lang.String
private java.lang.String
private java.io.File
private java.lang.String
private java.lang.String
private java.util.Collection
private java.lang.String
-
Constructor Summary
ConstructorsConstructorDescriptionSVNMergeFileSet
(SVNAdminArea adminArea, SVNLog log, java.io.File baseFile, java.io.File localFile, java.lang.String wcPath, java.io.File reposFile, java.io.File resultFile, java.io.File copyFromFile, java.lang.String mimeType) Creates a newSVNMergeFileSet
object given the data prepared for merging a file. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes this object.Returns the admin area which controls the file.java.io.File
Returns the file containing the pristine file contents.java.lang.String
Returns the base file label.java.lang.String
Returns the base file path.java.io.File
Returns the file which is the copy source for the file being merged.java.lang.String
Returns the copy source path.java.io.File
Returns the detranslated working copy file.java.lang.String
Returns the local file label.java.lang.String
Returns the path of the detranslated version of the working copy file.getLog()
Returns the log object.java.lang.String
Returns the mime type of the file.java.io.File
Returns the repository version of the file.java.lang.String
Returns the repository file label.java.lang.String
Returns the path to the file containing the contents of the repository version of the file.java.io.File
Returns the file where the merged resultant text is written to.java.lang.String
Returns the path of the file where the merged resultant text is written to.java.io.File
Returns the working copy file as it presents in the working copy.java.lang.String
Returns the path of the working copy file.boolean
isBinary()
Tells whether this file is binary or textual.void
setMergeLabels
(java.lang.String baseLabel, java.lang.String localLabel, java.lang.String repositoryLabel) Sets the labels for conflict files.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
myLocalFilePath
private java.lang.String myLocalFilePath -
myBaseFilePath
private java.lang.String myBaseFilePath -
myRepositoryFilePath
private java.lang.String myRepositoryFilePath -
myWCFilePath
private java.lang.String myWCFilePath -
myMergeResultFilePath
private java.lang.String myMergeResultFilePath -
myMimeType
private java.lang.String myMimeType -
myAdminArea
-
myLog
-
myLocalLabel
private java.lang.String myLocalLabel -
myBaseLabel
private java.lang.String myBaseLabel -
myRepositoryLabel
private java.lang.String myRepositoryLabel -
myLocalFile
private java.io.File myLocalFile -
myBaseFile
private java.io.File myBaseFile -
myRepositoryFile
private java.io.File myRepositoryFile -
myMergeResultFile
private java.io.File myMergeResultFile -
myCopyFromFile
private java.io.File myCopyFromFile -
myTmpPaths
private java.util.Collection myTmpPaths
-
-
Constructor Details
-
SVNMergeFileSet
public SVNMergeFileSet(SVNAdminArea adminArea, SVNLog log, java.io.File baseFile, java.io.File localFile, java.lang.String wcPath, java.io.File reposFile, java.io.File resultFile, java.io.File copyFromFile, java.lang.String mimeType) Creates a newSVNMergeFileSet
object given the data prepared for merging a file. Note: This is intended for internal use only, not for API users.- Parameters:
adminArea
- admin area the file is controlled underlog
- log objectbaseFile
- file with pristine contentslocalFile
- file with translated working contentswcPath
- working copy path relative to the location ofadminArea
reposFile
- file contents from the repositoryresultFile
- file where the resultant merged contents will be written tocopyFromFile
- contents of the copy source file (if any)mimeType
- file mime type
-
-
Method Details
-
setMergeLabels
public void setMergeLabels(java.lang.String baseLabel, java.lang.String localLabel, java.lang.String repositoryLabel) Sets the labels for conflict files. IfbaseLabel
is null, ".old" will be set by default. IflocalLabel
is null, ".working" will be set by default. IfrepositoryLabel
is null, ".new" will be set by default.- Parameters:
baseLabel
- base file labellocalLabel
- working file labelrepositoryLabel
- repository file label
-
getLog
Returns the log object. Note: This is intended for internal use only, not for API users.- Returns:
- wc modification commands logger
-
getBaseLabel
public java.lang.String getBaseLabel()Returns the base file label.- Returns:
- base label string
-
getLocalLabel
public java.lang.String getLocalLabel()Returns the local file label.- Returns:
- working file label
-
getRepositoryLabel
public java.lang.String getRepositoryLabel()Returns the repository file label.- Returns:
- label of the repository file version
-
getBasePath
Returns the base file path. If thebase file
is located under theadmin area
, then the return path will be just a relevant to the admin area path of the base file. Otherwise (in case the repository file is located not under the admin area) this method will create a temporary file in the.svn/tmp
area of the admin area and copy the contents of the base file into it; the return path will be again relative to the location of the admin area.- Returns:
- path of the file with pristine contents
- Throws:
SVNException
-
getLocalPath
public java.lang.String getLocalPath()Returns the path of the detranslated version of the working copy file. Detranslating of a working copy file takes place in case it's a symlink, or it has keywords or eol-style properties set on it.- Returns:
- path to the file with detranslated working contents; it's relevant to the
admin area
location
-
getWCPath
public java.lang.String getWCPath()Returns the path of the working copy file.- Returns:
- path of the working copy file; it's relevant to the
admin area
location
-
getRepositoryPath
Returns the path to the file containing the contents of the repository version of the file. If therepository file
is located under theadmin area
, then the return path will be just a relevant to the admin area path of the repository file. Otherwise (in case the repository file is located not under the admin area) this method will create a temporary file in the.svn/tmp
area of the admin area and copy the contents of the repository file into it; the return path will be again relative to the location of the admin area.- Returns:
- path of the file containing file contents that come from the repository
- Throws:
SVNException
-
getResultPath
public java.lang.String getResultPath()Returns the path of the file where the merged resultant text is written to.- Returns:
- path of the result file; it's relevant to the
admin area
location
-
getBaseFile
public java.io.File getBaseFile()Returns the file containing the pristine file contents.- Returns:
- base file
-
getWCFile
public java.io.File getWCFile()Returns the working copy file as it presents in the working copy.- Returns:
- working copy file
-
getLocalFile
public java.io.File getLocalFile()Returns the detranslated working copy file. Detranslating of a working copy file takes place in case it's a symlink, or it has keywords or eol-style properties set on it.- Returns:
- detranslated working copy file
-
getRepositoryFile
public java.io.File getRepositoryFile()Returns the repository version of the file.- Returns:
- repository file
-
getResultFile
public java.io.File getResultFile()Returns the file where the merged resultant text is written to.- Returns:
- merge result file
-
isBinary
public boolean isBinary()Tells whether this file is binary or textual. The result will depend on the value of the filemime type
.- Returns:
- true if binary
-
getMimeType
public java.lang.String getMimeType()Returns the mime type of the file.- Returns:
- file mime type
-
getAdminArea
Returns the admin area which controls the file. Note: this method is not intended for API users.- Returns:
- admin area
-
dispose
Disposes this object. Note: this method is not intended for API users.- Throws:
SVNException
-
getCopyFromFile
public java.io.File getCopyFromFile()Returns the file which is the copy source for the file being merged.- Returns:
- copy source file
-
getCopyFromPath
public java.lang.String getCopyFromPath()Returns the copy source path.- Returns:
- path of the copy source file;
it's relevant to the
admin area
location - Since:
- 1.3
-