Search in sources :

Example 56 with GitFlowRepository

use of org.eclipse.egit.gitflow.GitFlowRepository in project egit by eclipse.

the class GitFlowLightweightDecorator method getRepository.

@Nullable
private static GitFlowRepository getRepository(Object element) {
    GitFlowRepository repository = null;
    if (element instanceof GitFlowRepository) {
        repository = (GitFlowRepository) element;
    }
    if (element instanceof RepositoryNode) {
        RepositoryNode node = (RepositoryNode) element;
        Repository repo = node.getObject();
        if (repo != null) {
            repository = new GitFlowRepository(repo);
        }
    }
    return repository;
}
Also used : GitFlowRepository(org.eclipse.egit.gitflow.GitFlowRepository) Repository(org.eclipse.jgit.lib.Repository) RepositoryNode(org.eclipse.egit.ui.internal.repository.tree.RepositoryNode) GitFlowRepository(org.eclipse.egit.gitflow.GitFlowRepository) Nullable(org.eclipse.jgit.annotations.Nullable)

Example 57 with GitFlowRepository

use of org.eclipse.egit.gitflow.GitFlowRepository in project egit by eclipse.

the class AbstractFeatureOperationTest method init.

protected GitFlowRepository init(String initalCommit) throws Exception {
    testRepository.createInitialCommit(initalCommit);
    Repository repository = testRepository.getRepository();
    new InitOperation(repository).execute(null);
    return new GitFlowRepository(repository);
}
Also used : GitFlowRepository(org.eclipse.egit.gitflow.GitFlowRepository) Repository(org.eclipse.jgit.lib.Repository) GitFlowRepository(org.eclipse.egit.gitflow.GitFlowRepository)

Aggregations

GitFlowRepository (org.eclipse.egit.gitflow.GitFlowRepository)57 Repository (org.eclipse.jgit.lib.Repository)35 Test (org.junit.Test)33 RevCommit (org.eclipse.jgit.revwalk.RevCommit)19 OperationCanceledException (org.eclipse.core.runtime.OperationCanceledException)7 BranchOperation (org.eclipse.egit.core.op.BranchOperation)7 IOException (java.io.IOException)6 CoreException (org.eclipse.core.runtime.CoreException)6 Shell (org.eclipse.swt.widgets.Shell)6 IJobManager (org.eclipse.core.runtime.jobs.IJobManager)5 WrongGitFlowStateException (org.eclipse.egit.gitflow.WrongGitFlowStateException)5 File (java.io.File)4 Ref (org.eclipse.jgit.lib.Ref)4 GitFlowConfig (org.eclipse.egit.gitflow.GitFlowConfig)3 IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)3 ExecutionException (org.eclipse.core.commands.ExecutionException)2 MultiStatus (org.eclipse.core.runtime.MultiStatus)2 InitParameters (org.eclipse.egit.gitflow.InitParameters)2 FeatureBranchSelectionDialog (org.eclipse.egit.gitflow.ui.internal.dialogs.FeatureBranchSelectionDialog)2 InputDialog (org.eclipse.jface.dialogs.InputDialog)2