public class SVNReplicationEditor extends java.lang.Object implements ISVNEditor
SVNRepository
Constructor and Description |
---|
SVNReplicationEditor(SVNRepository repository,
ISVNEditor commitEditor,
SVNLogEntry revision)
Creates a new replication editor.
|
Modifier and Type | Method and Description |
---|---|
void |
abortEdit()
Aborts the transaction.
|
void |
absentDir(java.lang.String path)
Does nothing.
|
void |
absentFile(java.lang.String path)
Does nothing.
|
void |
addDir(java.lang.String path,
java.lang.String copyFromPath,
long copyFromRevision)
Adds a new directory under the specified
path to the target repository. |
void |
addFile(java.lang.String path,
java.lang.String copyFromPath,
long copyFromRevision)
Adds a new file.
|
void |
applyTextDelta(java.lang.String path,
java.lang.String baseChecksum)
Starts applying text delta.
|
void |
changeDirProperty(java.lang.String name,
SVNPropertyValue value)
Changes a property of the current directory.
|
void |
changeFileProperty(java.lang.String path,
java.lang.String name,
SVNPropertyValue value)
Changes file property.
|
void |
closeDir()
Closes the current opened dir.
|
SVNCommitInfo |
closeEdit()
Commits the transaction.
|
void |
closeFile(java.lang.String path,
java.lang.String textChecksum)
Closes the current opened file.
|
void |
deleteEntry(java.lang.String path,
long revision)
Removes
path from the paths to be committed. |
SVNCommitInfo |
getCommitInfo()
Returns commit information on the revision
committed to the replication destination repository.
|
void |
openDir(java.lang.String path,
long revision)
Opens a corresponding
path in the target repository. |
void |
openFile(java.lang.String path,
long revision)
Opens a file.
|
void |
openRoot(long revision)
Starts a next replication transaction.
|
void |
targetRevision(long revision)
Saves the target
revision . |
java.io.OutputStream |
textDeltaChunk(java.lang.String path,
SVNDiffWindow diffWindow)
Applies a next chunk of delta.
|
void |
textDeltaEnd(java.lang.String path)
Handles text delta end.
|
public SVNReplicationEditor(SVNRepository repository, ISVNEditor commitEditor, SVNLogEntry revision)
repository
must be created for the root location of
the source repository which is to be replicated.
repository
- a source repositorycommitEditor
- a commit editor received from the destination
repository driver (which also must be point to the
root location of the destination repository)revision
- log information of the revision to be copiedpublic void targetRevision(long revision) throws SVNException
revision
.targetRevision
in interface ISVNEditor
revision
- revisionSVNException
public void openRoot(long revision) throws SVNException
openRoot
in interface ISVNEditor
revision
- target revisionSVNException
public void deleteEntry(java.lang.String path, long revision) throws SVNException
path
from the paths to be committed.deleteEntry
in interface ISVNEditor
path
- revision
- SVNException
- exception with SVNErrorCode.UNKNOWN
error code - if somehow
chanded paths fetched from the log of the resource repository did not
reflect path
deletion in revision
public void absentDir(java.lang.String path) throws SVNException
absentDir
in interface ISVNEditor
path
- SVNException
public void absentFile(java.lang.String path) throws SVNException
absentFile
in interface ISVNEditor
path
- SVNException
public void addDir(java.lang.String path, java.lang.String copyFromPath, long copyFromRevision) throws SVNException
path
to the target repository.addDir
in interface ISVNEditor
path
- target directory pathcopyFromPath
- not usedcopyFromRevision
- not usedSVNException
- exception with SVNErrorCode.UNKNOWN
error code - if somehow
chanded paths fetched from the log of the resource repository did not
reflect path
additionpublic void openDir(java.lang.String path, long revision) throws SVNException
path
in the target repository.openDir
in interface ISVNEditor
path
- target directory path relative to the root of the editrevision
- target directory revisionSVNException
public void changeDirProperty(java.lang.String name, SVNPropertyValue value) throws SVNException
changeDirProperty
in interface ISVNEditor
name
- value
- SVNException
ISVNEditor.openDir(String, long)
public void closeDir() throws SVNException
closeDir
in interface ISVNEditor
SVNException
public void addFile(java.lang.String path, java.lang.String copyFromPath, long copyFromRevision) throws SVNException
addFile
in interface ISVNEditor
path
- copyFromPath
- copyFromRevision
- SVNException
public void openFile(java.lang.String path, long revision) throws SVNException
openFile
in interface ISVNEditor
path
- revision
- SVNException
public void applyTextDelta(java.lang.String path, java.lang.String baseChecksum) throws SVNException
applyTextDelta
in interface ISVNDeltaConsumer
path
- baseChecksum
- SVNException
public java.io.OutputStream textDeltaChunk(java.lang.String path, SVNDiffWindow diffWindow) throws SVNException
textDeltaChunk
in interface ISVNDeltaConsumer
path
- diffWindow
- SVNException
public void textDeltaEnd(java.lang.String path) throws SVNException
textDeltaEnd
in interface ISVNDeltaConsumer
path
- SVNException
public void changeFileProperty(java.lang.String path, java.lang.String name, SVNPropertyValue value) throws SVNException
changeFileProperty
in interface ISVNEditor
path
- name
- value
- SVNException
public void closeFile(java.lang.String path, java.lang.String textChecksum) throws SVNException
closeFile
in interface ISVNEditor
path
- textChecksum
- SVNException
public SVNCommitInfo closeEdit() throws SVNException
closeEdit
in interface ISVNEditor
SVNException
public void abortEdit() throws SVNException
abortEdit
in interface ISVNEditor
SVNException
public SVNCommitInfo getCommitInfo()
Copyright © 2004-2012 TMate Software Ltd. All Rights Reserved.