本文整理了Java中org.eclipse.jgit.lib.Repository.getRepositoryState
方法的一些代码示例,展示了Repository.getRepositoryState
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getRepositoryState
方法的具体详情如下:
包路径:org.eclipse.jgit.lib.Repository
类名称:Repository
方法名:getRepositoryState
[英]Get the repository state
[中]
代码示例来源:origin: jphp-group/jphp
@Signature
public RepositoryState getState() {
return getWrappedObject().getRepository().getRepositoryState();
}
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
throw new WrongRepositoryStateException(MessageFormat.format(
JGitText.get().wrongRepositoryState, repo
.getRepositoryState().name()));
switch (repo.getRepositoryState()) {
case REBASING_INTERACTIVE:
case REBASING:
throw new WrongRepositoryStateException(MessageFormat.format(
JGitText.get().wrongRepositoryState, repo
.getRepositoryState().name()));
switch (repo.getRepositoryState()) {
case SAFE:
if (this.upstreamCommit == null)
throw new WrongRepositoryStateException(MessageFormat.format(
JGitText.get().wrongRepositoryState, repo
.getRepositoryState().name()));
代码示例来源:origin: org.eclipse.egit/ui
/**
* @param repository
* to check
* @return true if an empty commit without files is allowed in the
* current state
*/
public static boolean isCommitWithoutFilesAllowed(Repository repository) {
RepositoryState state = repository.getRepositoryState();
return state == RepositoryState.MERGING_RESOLVED;
}
代码示例来源:origin: org.eclipse.egit/ui
private boolean isInRebasingState(Repository repo) {
if (repo == null)
return false;
RepositoryState state = repo.getRepositoryState();
return state.isRebasing();
}
代码示例来源:origin: org.eclipse.egit/ui
/**
* @return true if amending is allowed
*/
public boolean amendAllowed() {
return previousCommit != null && repository.getRepositoryState().canAmend();
}
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
RepositoryState state = repo.getRepositoryState();
final boolean merging = state.equals(RepositoryState.MERGING)
|| state.equals(RepositoryState.MERGING_RESOLVED);
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
if (!repo.getRepositoryState().equals(RepositoryState.SAFE))
throw new WrongRepositoryStateException(MessageFormat.format(
JGitText.get().cannotPullOnARepoWithState, repo
.getRepositoryState().name()));
代码示例来源:origin: org.eclipse.egit/ui
public void run() {
MessageDialog.openError(getShell(),
UIText.BranchAction_cannotCheckout, NLS.bind(
UIText.BranchAction_repositoryState,
repository.getRepositoryState()
.getDescription()));
}
});
代码示例来源:origin: org.eclipse.egit/ui
private void fillValues(final Repository repository) throws IOException {
gitDir.setText(repository.getDirectory().getAbsolutePath());
branch.setText(repository.getBranch());
workDir.setText(repository.getWorkTree().getAbsolutePath());
state.setText(repository.getRepositoryState().getDescription());
}
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
RepositoryState state = repo.getRepositoryState();
if (!state.canCommit())
throw new WrongRepositoryStateException(MessageFormat.format(
代码示例来源:origin: org.eclipse.egit/ui
@Override
public boolean isEnabled() {
Repository[] repositories = getRepositories();
if (repositories.length == 0)
return false;
for (Repository repository : repositories) {
if (!repository.getRepositoryState().equals(RepositoryState.SAFE))
return false;
}
return true;
}
代码示例来源:origin: org.eclipse.egit/ui
@Override
public boolean isEnabled() {
Repository repo = getRepository();
return repo != null
&& repo.getRepositoryState() == RepositoryState.SAFE
&& isLocalBranchCheckedout(repo);
}
}
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
&& repo.getRepositoryState() != RepositoryState.SAFE)
throw new WrongRepositoryStateException(MessageFormat.format(
JGitText.get().stashApplyOnUnsafeRepository,
repo.getRepositoryState()));
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
checkCallable();
RepositoryState state = repo.getRepositoryState();
processOptions(state);
代码示例来源:origin: org.eclipse.egit/ui
@Override
public boolean isEnabled() {
final Repository repository = getRepository(getPage());
if (repository == null)
return false;
return repository.getRepositoryState().equals(RepositoryState.SAFE);
}
代码示例来源:origin: org.eclipse.egit/ui
@Override
public boolean isEnabled() {
final Repository repository = getRepository(getPage());
if (repository == null)
return false;
return repository.getRepositoryState().equals(RepositoryState.SAFE);
}
代码示例来源:origin: org.eclipse.egit/ui
@Override
public boolean isEnabled() {
final Repository repository = getRepository(getPage());
if (repository == null)
return false;
return repository.getRepositoryState().equals(RepositoryState.SAFE);
}
代码示例来源:origin: org.eclipse.egit/ui
private static String getRepositoryName(Repository repository) {
String repoName = Activator.getDefault().getRepositoryUtil()
.getRepositoryName(repository);
RepositoryState state = repository.getRepositoryState();
if (state != RepositoryState.SAFE)
return repoName + '|' + state.getDescription();
else
return repoName;
}
代码示例来源:origin: org.eclipse.egit/ui
private static String getRepositoryName(Repository repository) {
String repoName = Activator.getDefault().getRepositoryUtil()
.getRepositoryName(repository);
RepositoryState state = repository.getRepositoryState();
if (state != RepositoryState.SAFE)
return repoName + '|' + state.getDescription();
else
return repoName;
}
代码示例来源:origin: org.eclipse.egit/ui
static String getRepositoryName(Repository repository) {
String repoName = Activator.getDefault().getRepositoryUtil()
.getRepositoryName(repository);
RepositoryState state = repository.getRepositoryState();
if (state != RepositoryState.SAFE)
return repoName + '|' + state.getDescription();
else
return repoName;
}
内容来源于网络,如有侵权,请联系作者删除!