Examples of GitContext


Examples of io.fabric8.api.GitContext

                public Version call(Git git, GitContext context) throws Exception {
                    String revision = git.getRepository().getRefDatabase().getRef(versionId).getObjectId().getName();
                    return loadVersion(git, context, versionId, revision);
                }
            };
            GitContext context = new GitContext();
            return executeInternal(context, null, gitop);
        }
View Full Code Here

Examples of io.fabric8.api.GitContext

                            doPullInternal(context, getCredentialsProvider(), false);
                        }
                        return null;
                    }
                };
                executeInternal(new GitContext(), null, gitop);
            } finally {
                writeLock.unlock();
            }
        }
View Full Code Here

Examples of io.fabric8.api.GitContext

        return version;
    }

    @Override
    public void deleteVersion(String versionId) {
        deleteVersion(new GitContext(), versionId);
    }
View Full Code Here

Examples of io.fabric8.api.GitContext

    private <T> T executeWrite(GitOperation<T> operation) {
        return executeInternal(newGitWriteContext(), null, operation);
    }

    private GitContext newGitReadContext() {
        return new GitContext();
    }
View Full Code Here

Examples of io.fabric8.api.GitContext

    private GitContext newGitReadContext() {
        return new GitContext();
    }

    private GitContext newGitWriteContext() {
        return new GitContext().requireCommit().requirePush();
    }
View Full Code Here

Examples of io.fabric8.api.GitContext

    }

    private void doPullInternal() {
        LockHandle writeLock = aquireWriteLock();
        try {
           doPullInternal(new GitContext(), getCredentialsProvider(), true);
        } catch (Throwable e) {
            LOGGER.debug("Error during pull due " + e.getMessage(), e);
            LOGGER.warn("Error during pull due " + e.getMessage() + ". This exception is ignored.");
        } finally {
            writeLock.unlock();
View Full Code Here

Examples of io.fabric8.api.GitContext

    }

    @Override
    public Iterable<PushResult> doPush(Git git) throws Exception {
        assertValid();
        return gitDataStore.get().doPush(git, new GitContext());
    }
View Full Code Here

Examples of io.fabric8.api.GitContext

        }
        GitHelpers.createOrCheckoutBranch(git, branch, "origin");
    }

    private <T> T gitReadOperation(GitOperation<T> gitop) {
        GitContext context = new GitContext();
        return gitDataStore.get().gitOperation(context, gitop, null);
    }
View Full Code Here

Examples of io.fabric8.api.GitContext

        GitContext context = new GitContext();
        return gitDataStore.get().gitOperation(context, gitop, null);
    }

    private <T> T gitWriteOperation(PersonIdent personIdent, GitOperation<T> gitop) {
        GitContext context = new GitContext().requireCommit().requirePush();
        return gitDataStore.get().gitOperation(context, gitop, personIdent);
    }
View Full Code Here

Examples of io.fabric8.api.GitContext

        GitOperation<Profile> gitop = new GitOperation<Profile>() {
            public Profile call(Git git, GitContext context) throws Exception {
                return profileRegistry.getProfile(versionId, "prfB");
            }
        };
        GitContext context = new GitContext().requirePull();
        Profile profile = gitDataStore.gitOperation(context, gitop, null);
       
        Assert.assertEquals("1.0", profile.getVersion());
        Assert.assertEquals("prfB", profile.getId());
        Assert.assertEquals("bbb", profile.getAttributes().get("foo"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.