Package com.google.gerrit.server.git
Class DelegateRepository
- java.lang.Object
-
- org.eclipse.jgit.lib.Repository
-
- com.google.gerrit.server.git.DelegateRepository
-
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
PermissionAwareRepository
public class DelegateRepository extends org.eclipse.jgit.lib.RepositoryWrapper aroundRepositorythat delegates all calls to the wrappedRepository.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.jgit.lib.Repositorydelegate
-
Constructor Summary
Constructors Modifier Constructor Description protectedDelegateRepository(org.eclipse.jgit.lib.Repository delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidautoGC(org.eclipse.jgit.lib.ProgressMonitor monitor)voidclose()voidconvertRefStorage(String format, boolean writeLogs, boolean backup)Converts between ref storage formats.voidcreate()voidcreate(boolean bare)org.eclipse.jgit.attributes.AttributesNodeProvidercreateAttributesNodeProvider()org.eclipse.jgit.lib.Repositorydelegate()Returns the wrappedRepositoryinstance.voidfireEvent(org.eclipse.jgit.events.RepositoryEvent<?> event)Set<org.eclipse.jgit.lib.ObjectId>getAdditionalHaves()Map<String,org.eclipse.jgit.lib.Ref>getAllRefs()Deprecated.Map<org.eclipse.jgit.lib.AnyObjectId,Set<org.eclipse.jgit.lib.Ref>>getAllRefsByPeeledObjectId()StringgetBranch()org.eclipse.jgit.lib.StoredConfiggetConfig()FilegetDirectory()org.eclipse.jgit.util.FSgetFS()StringgetFullBranch()StringgetGitwebDescription()StringgetIdentifier()FilegetIndexFile()org.eclipse.jgit.events.ListenerListgetListenerList()org.eclipse.jgit.lib.ObjectDatabasegetObjectDatabase()org.eclipse.jgit.lib.RefDatabasegetRefDatabase()org.eclipse.jgit.lib.ReflogReadergetReflogReader(String refName)StringgetRemoteName(String refName)Set<String>getRemoteNames()org.eclipse.jgit.lib.RepositoryStategetRepositoryState()Map<String,org.eclipse.jgit.lib.Ref>getTags()Deprecated.FilegetWorkTree()booleanhasObject(org.eclipse.jgit.lib.AnyObjectId objectId)Deprecated.voidincrementOpen()booleanisBare()org.eclipse.jgit.dircache.DirCachelockDirCache()org.eclipse.jgit.lib.ObjectInserternewObjectInserter()org.eclipse.jgit.lib.ObjectReadernewObjectReader()voidnotifyIndexChanged(boolean internal)org.eclipse.jgit.lib.ObjectLoaderopen(org.eclipse.jgit.lib.AnyObjectId objectId)org.eclipse.jgit.lib.ObjectLoaderopen(org.eclipse.jgit.lib.AnyObjectId objectId, int typeHint)org.eclipse.jgit.revwalk.RevCommitparseCommit(org.eclipse.jgit.lib.AnyObjectId id)org.eclipse.jgit.lib.Refpeel(org.eclipse.jgit.lib.Ref ref)Deprecated.org.eclipse.jgit.lib.ObjectIdreadCherryPickHead()StringreadCommitEditMsg()org.eclipse.jgit.dircache.DirCachereadDirCache()StringreadMergeCommitMsg()List<org.eclipse.jgit.lib.ObjectId>readMergeHeads()org.eclipse.jgit.lib.ObjectIdreadOrigHead()List<org.eclipse.jgit.lib.RebaseTodoLine>readRebaseTodo(String path, boolean includeComments)org.eclipse.jgit.lib.ObjectIdreadRevertHead()StringreadSquashCommitMsg()org.eclipse.jgit.lib.RefRenamerenameRef(String fromRef, String toRef)org.eclipse.jgit.lib.ObjectIdresolve(String revstr)voidscanForRepoChanges()voidsetGitwebDescription(String description)StringshortenRemoteBranchName(String refName)Stringsimplify(String revstr)org.eclipse.jgit.lib.RefUpdateupdateRef(String ref)org.eclipse.jgit.lib.RefUpdateupdateRef(String ref, boolean detach)voidwriteCherryPickHead(org.eclipse.jgit.lib.ObjectId head)voidwriteCommitEditMsg(String msg)voidwriteMergeCommitMsg(String msg)voidwriteMergeHeads(List<? extends org.eclipse.jgit.lib.ObjectId> heads)voidwriteOrigHead(org.eclipse.jgit.lib.ObjectId head)voidwriteRebaseTodoFile(String path, List<org.eclipse.jgit.lib.RebaseTodoLine> steps, boolean append)voidwriteRevertHead(org.eclipse.jgit.lib.ObjectId head)voidwriteSquashCommitMsg(String msg)
-
-
-
Method Detail
-
delegate
public org.eclipse.jgit.lib.Repository delegate()
Returns the wrappedRepositoryinstance.
-
create
public void create(boolean bare) throws IOException- Specified by:
createin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
getIdentifier
public String getIdentifier()
- Specified by:
getIdentifierin classorg.eclipse.jgit.lib.Repository
-
getObjectDatabase
public org.eclipse.jgit.lib.ObjectDatabase getObjectDatabase()
- Specified by:
getObjectDatabasein classorg.eclipse.jgit.lib.Repository
-
getRefDatabase
public org.eclipse.jgit.lib.RefDatabase getRefDatabase()
- Specified by:
getRefDatabasein classorg.eclipse.jgit.lib.Repository
-
getConfig
public org.eclipse.jgit.lib.StoredConfig getConfig()
- Specified by:
getConfigin classorg.eclipse.jgit.lib.Repository
-
createAttributesNodeProvider
public org.eclipse.jgit.attributes.AttributesNodeProvider createAttributesNodeProvider()
- Specified by:
createAttributesNodeProviderin classorg.eclipse.jgit.lib.Repository
-
scanForRepoChanges
public void scanForRepoChanges() throws IOException- Specified by:
scanForRepoChangesin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
notifyIndexChanged
public void notifyIndexChanged(boolean internal)
- Specified by:
notifyIndexChangedin classorg.eclipse.jgit.lib.Repository
-
getReflogReader
public org.eclipse.jgit.lib.ReflogReader getReflogReader(String refName) throws IOException
- Specified by:
getReflogReaderin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
getListenerList
public org.eclipse.jgit.events.ListenerList getListenerList()
- Overrides:
getListenerListin classorg.eclipse.jgit.lib.Repository
-
fireEvent
public void fireEvent(org.eclipse.jgit.events.RepositoryEvent<?> event)
- Overrides:
fireEventin classorg.eclipse.jgit.lib.Repository
-
create
public void create() throws IOException- Overrides:
createin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
getDirectory
public File getDirectory()
- Overrides:
getDirectoryin classorg.eclipse.jgit.lib.Repository
-
newObjectInserter
public org.eclipse.jgit.lib.ObjectInserter newObjectInserter()
- Overrides:
newObjectInserterin classorg.eclipse.jgit.lib.Repository
-
newObjectReader
public org.eclipse.jgit.lib.ObjectReader newObjectReader()
- Overrides:
newObjectReaderin classorg.eclipse.jgit.lib.Repository
-
getFS
public org.eclipse.jgit.util.FS getFS()
- Overrides:
getFSin classorg.eclipse.jgit.lib.Repository
-
hasObject
@Deprecated public boolean hasObject(org.eclipse.jgit.lib.AnyObjectId objectId)
Deprecated.- Overrides:
hasObjectin classorg.eclipse.jgit.lib.Repository
-
open
public org.eclipse.jgit.lib.ObjectLoader open(org.eclipse.jgit.lib.AnyObjectId objectId, int typeHint) throws org.eclipse.jgit.errors.MissingObjectException, org.eclipse.jgit.errors.IncorrectObjectTypeException, IOException- Overrides:
openin classorg.eclipse.jgit.lib.Repository- Throws:
org.eclipse.jgit.errors.MissingObjectExceptionorg.eclipse.jgit.errors.IncorrectObjectTypeExceptionIOException
-
incrementOpen
public void incrementOpen()
- Overrides:
incrementOpenin classorg.eclipse.jgit.lib.Repository
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classorg.eclipse.jgit.lib.Repository
-
getFullBranch
public String getFullBranch() throws IOException
- Overrides:
getFullBranchin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
getBranch
public String getBranch() throws IOException
- Overrides:
getBranchin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
getAllRefs
@Deprecated public Map<String,org.eclipse.jgit.lib.Ref> getAllRefs()
Deprecated.- Overrides:
getAllRefsin classorg.eclipse.jgit.lib.Repository
-
getTags
@Deprecated public Map<String,org.eclipse.jgit.lib.Ref> getTags()
Deprecated.- Overrides:
getTagsin classorg.eclipse.jgit.lib.Repository
-
lockDirCache
public org.eclipse.jgit.dircache.DirCache lockDirCache() throws org.eclipse.jgit.errors.NoWorkTreeException, org.eclipse.jgit.errors.CorruptObjectException, IOException- Overrides:
lockDirCachein classorg.eclipse.jgit.lib.Repository- Throws:
org.eclipse.jgit.errors.NoWorkTreeExceptionorg.eclipse.jgit.errors.CorruptObjectExceptionIOException
-
autoGC
public void autoGC(org.eclipse.jgit.lib.ProgressMonitor monitor)
- Overrides:
autoGCin classorg.eclipse.jgit.lib.Repository
-
getAdditionalHaves
public Set<org.eclipse.jgit.lib.ObjectId> getAdditionalHaves() throws IOException
- Overrides:
getAdditionalHavesin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
getAllRefsByPeeledObjectId
public Map<org.eclipse.jgit.lib.AnyObjectId,Set<org.eclipse.jgit.lib.Ref>> getAllRefsByPeeledObjectId() throws IOException
- Overrides:
getAllRefsByPeeledObjectIdin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
getIndexFile
public File getIndexFile() throws org.eclipse.jgit.errors.NoWorkTreeException
- Overrides:
getIndexFilein classorg.eclipse.jgit.lib.Repository- Throws:
org.eclipse.jgit.errors.NoWorkTreeException
-
getRepositoryState
public org.eclipse.jgit.lib.RepositoryState getRepositoryState()
- Overrides:
getRepositoryStatein classorg.eclipse.jgit.lib.Repository
-
isBare
public boolean isBare()
- Overrides:
isBarein classorg.eclipse.jgit.lib.Repository
-
getWorkTree
public File getWorkTree() throws org.eclipse.jgit.errors.NoWorkTreeException
- Overrides:
getWorkTreein classorg.eclipse.jgit.lib.Repository- Throws:
org.eclipse.jgit.errors.NoWorkTreeException
-
getRemoteName
public String getRemoteName(String refName)
- Overrides:
getRemoteNamein classorg.eclipse.jgit.lib.Repository
-
getGitwebDescription
public String getGitwebDescription() throws IOException
- Overrides:
getGitwebDescriptionin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
getRemoteNames
public Set<String> getRemoteNames()
- Overrides:
getRemoteNamesin classorg.eclipse.jgit.lib.Repository
-
open
public org.eclipse.jgit.lib.ObjectLoader open(org.eclipse.jgit.lib.AnyObjectId objectId) throws org.eclipse.jgit.errors.MissingObjectException, IOException- Overrides:
openin classorg.eclipse.jgit.lib.Repository- Throws:
org.eclipse.jgit.errors.MissingObjectExceptionIOException
-
updateRef
public org.eclipse.jgit.lib.RefUpdate updateRef(String ref) throws IOException
- Overrides:
updateRefin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
updateRef
public org.eclipse.jgit.lib.RefUpdate updateRef(String ref, boolean detach) throws IOException
- Overrides:
updateRefin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
renameRef
public org.eclipse.jgit.lib.RefRename renameRef(String fromRef, String toRef) throws IOException
- Overrides:
renameRefin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
resolve
public org.eclipse.jgit.lib.ObjectId resolve(String revstr) throws org.eclipse.jgit.errors.AmbiguousObjectException, org.eclipse.jgit.errors.IncorrectObjectTypeException, org.eclipse.jgit.errors.RevisionSyntaxException, IOException
- Overrides:
resolvein classorg.eclipse.jgit.lib.Repository- Throws:
org.eclipse.jgit.errors.AmbiguousObjectExceptionorg.eclipse.jgit.errors.IncorrectObjectTypeExceptionorg.eclipse.jgit.errors.RevisionSyntaxExceptionIOException
-
simplify
public String simplify(String revstr) throws org.eclipse.jgit.errors.AmbiguousObjectException, IOException
- Overrides:
simplifyin classorg.eclipse.jgit.lib.Repository- Throws:
org.eclipse.jgit.errors.AmbiguousObjectExceptionIOException
-
peel
@Deprecated public org.eclipse.jgit.lib.Ref peel(org.eclipse.jgit.lib.Ref ref)
Deprecated.- Overrides:
peelin classorg.eclipse.jgit.lib.Repository
-
parseCommit
public org.eclipse.jgit.revwalk.RevCommit parseCommit(org.eclipse.jgit.lib.AnyObjectId id) throws org.eclipse.jgit.errors.IncorrectObjectTypeException, IOException, org.eclipse.jgit.errors.MissingObjectException- Overrides:
parseCommitin classorg.eclipse.jgit.lib.Repository- Throws:
org.eclipse.jgit.errors.IncorrectObjectTypeExceptionIOExceptionorg.eclipse.jgit.errors.MissingObjectException
-
readDirCache
public org.eclipse.jgit.dircache.DirCache readDirCache() throws org.eclipse.jgit.errors.NoWorkTreeException, org.eclipse.jgit.errors.CorruptObjectException, IOException- Overrides:
readDirCachein classorg.eclipse.jgit.lib.Repository- Throws:
org.eclipse.jgit.errors.NoWorkTreeExceptionorg.eclipse.jgit.errors.CorruptObjectExceptionIOException
-
shortenRemoteBranchName
public String shortenRemoteBranchName(String refName)
- Overrides:
shortenRemoteBranchNamein classorg.eclipse.jgit.lib.Repository
-
setGitwebDescription
public void setGitwebDescription(String description) throws IOException
- Overrides:
setGitwebDescriptionin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
readMergeCommitMsg
public String readMergeCommitMsg() throws IOException, org.eclipse.jgit.errors.NoWorkTreeException
- Overrides:
readMergeCommitMsgin classorg.eclipse.jgit.lib.Repository- Throws:
IOExceptionorg.eclipse.jgit.errors.NoWorkTreeException
-
writeMergeCommitMsg
public void writeMergeCommitMsg(String msg) throws IOException
- Overrides:
writeMergeCommitMsgin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
readCommitEditMsg
public String readCommitEditMsg() throws IOException, org.eclipse.jgit.errors.NoWorkTreeException
- Overrides:
readCommitEditMsgin classorg.eclipse.jgit.lib.Repository- Throws:
IOExceptionorg.eclipse.jgit.errors.NoWorkTreeException
-
writeCommitEditMsg
public void writeCommitEditMsg(String msg) throws IOException
- Overrides:
writeCommitEditMsgin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
readMergeHeads
public List<org.eclipse.jgit.lib.ObjectId> readMergeHeads() throws IOException, org.eclipse.jgit.errors.NoWorkTreeException
- Overrides:
readMergeHeadsin classorg.eclipse.jgit.lib.Repository- Throws:
IOExceptionorg.eclipse.jgit.errors.NoWorkTreeException
-
writeMergeHeads
public void writeMergeHeads(List<? extends org.eclipse.jgit.lib.ObjectId> heads) throws IOException
- Overrides:
writeMergeHeadsin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
readCherryPickHead
public org.eclipse.jgit.lib.ObjectId readCherryPickHead() throws IOException, org.eclipse.jgit.errors.NoWorkTreeException- Overrides:
readCherryPickHeadin classorg.eclipse.jgit.lib.Repository- Throws:
IOExceptionorg.eclipse.jgit.errors.NoWorkTreeException
-
readRevertHead
public org.eclipse.jgit.lib.ObjectId readRevertHead() throws IOException, org.eclipse.jgit.errors.NoWorkTreeException- Overrides:
readRevertHeadin classorg.eclipse.jgit.lib.Repository- Throws:
IOExceptionorg.eclipse.jgit.errors.NoWorkTreeException
-
writeCherryPickHead
public void writeCherryPickHead(org.eclipse.jgit.lib.ObjectId head) throws IOException- Overrides:
writeCherryPickHeadin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
writeRevertHead
public void writeRevertHead(org.eclipse.jgit.lib.ObjectId head) throws IOException- Overrides:
writeRevertHeadin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
writeOrigHead
public void writeOrigHead(org.eclipse.jgit.lib.ObjectId head) throws IOException- Overrides:
writeOrigHeadin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
readOrigHead
public org.eclipse.jgit.lib.ObjectId readOrigHead() throws IOException, org.eclipse.jgit.errors.NoWorkTreeException- Overrides:
readOrigHeadin classorg.eclipse.jgit.lib.Repository- Throws:
IOExceptionorg.eclipse.jgit.errors.NoWorkTreeException
-
readSquashCommitMsg
public String readSquashCommitMsg() throws IOException
- Overrides:
readSquashCommitMsgin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
writeSquashCommitMsg
public void writeSquashCommitMsg(String msg) throws IOException
- Overrides:
writeSquashCommitMsgin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
readRebaseTodo
public List<org.eclipse.jgit.lib.RebaseTodoLine> readRebaseTodo(String path, boolean includeComments) throws IOException
- Overrides:
readRebaseTodoin classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
writeRebaseTodoFile
public void writeRebaseTodoFile(String path, List<org.eclipse.jgit.lib.RebaseTodoLine> steps, boolean append) throws IOException
- Overrides:
writeRebaseTodoFilein classorg.eclipse.jgit.lib.Repository- Throws:
IOException
-
convertRefStorage
public void convertRefStorage(String format, boolean writeLogs, boolean backup) throws IOException
Converts between ref storage formats.- Parameters:
format- the format to convert to, either "reftable" or "refdir"writeLogs- whether to write reflogsbackup- whether to make a backup of the old data- Throws:
IOException- on I/O problems.
-
-