public class FileTreeIteratorWithTimeControl
extends org.eclipse.jgit.treewalk.FileTreeIterator
FileTreeIterator used in tests which allows to specify explicitly
what will be returned by getEntryLastModified(). This allows to
write tests where certain files have to have the same modification time.
This iterator is configured by a list of strictly increasing long values t(0), t(1), ..., t(n). For each file with a modification between t(x) and t(x+1) [ t(x) <= time < t(x+1) ] this iterator will report t(x). For files with a modification time smaller t(0) a modification time of 0 is returned. For files with a modification time greater or equal t(n) t(n) will be returned.
This class was written especially to test racy-git problems
org.eclipse.jgit.treewalk.FileTreeIterator.DefaultFileModeStrategy, org.eclipse.jgit.treewalk.FileTreeIterator.FileEntry, org.eclipse.jgit.treewalk.FileTreeIterator.FileModeStrategy, org.eclipse.jgit.treewalk.FileTreeIterator.NoGitlinksStrategy| Constructor and Description |
|---|
FileTreeIteratorWithTimeControl(File f,
org.eclipse.jgit.util.FS fs,
TreeSet<Long> modTimes) |
FileTreeIteratorWithTimeControl(org.eclipse.jgit.treewalk.FileTreeIterator p,
File f,
org.eclipse.jgit.util.FS fs,
TreeSet<Long> modTimes) |
FileTreeIteratorWithTimeControl(org.eclipse.jgit.treewalk.FileTreeIterator p,
Repository repo,
TreeSet<Long> modTimes) |
FileTreeIteratorWithTimeControl(Repository repo,
TreeSet<Long> modTimes) |
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.jgit.treewalk.AbstractTreeIterator |
createSubtreeIterator(ObjectReader reader) |
long |
getEntryLastModified() |
getDirectory, getEntryFile, idSubmodule, readSymlinkTargetback, compareMetadata, current, eof, first, getCleanFilterCommand, getEntryAttributesNode, getEntryContentLength, getEntryLength, getEolStreamType, getIndexFileMode, getOptions, hasId, idBuffer, idOffset, idSubmodule, init, initRootIterator, isEntryIgnored, isEntryIgnored, isModeDifferent, isModified, isWorkTree, next, openEntryStream, reset, setDirCacheIteratorcreateEmptyTreeIterator, createSubtreeIterator, ensurePathCapacity, findFile, findFile, getEntryFileMode, getEntryObjectId, getEntryObjectId, getEntryPathBuffer, getEntryPathHashCode, getEntryPathLength, getEntryPathString, getEntryRawMode, getName, getNameLength, getNameOffset, growPath, idEqual, needsStopWalk, pathCompare, pathCompare, skip, stopWalk, toStringpublic FileTreeIteratorWithTimeControl(org.eclipse.jgit.treewalk.FileTreeIterator p,
Repository repo,
TreeSet<Long> modTimes)
public FileTreeIteratorWithTimeControl(org.eclipse.jgit.treewalk.FileTreeIterator p,
File f,
org.eclipse.jgit.util.FS fs,
TreeSet<Long> modTimes)
public FileTreeIteratorWithTimeControl(Repository repo, TreeSet<Long> modTimes)
public org.eclipse.jgit.treewalk.AbstractTreeIterator createSubtreeIterator(ObjectReader reader)
createSubtreeIterator in class org.eclipse.jgit.treewalk.FileTreeIteratorpublic long getEntryLastModified()
getEntryLastModified in class org.eclipse.jgit.treewalk.WorkingTreeIteratorCopyright © 2017 Eclipse JGit Project. All rights reserved.