org.eclipse.jgit.api.errors.ConcurrentRefUpdateException Java Examples

The following examples show how to use org.eclipse.jgit.api.errors.ConcurrentRefUpdateException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: gradle-gitsemver   Author: palantir   File: TagBasedVersionFactoryTest.java    License: Apache License 2.0 5 votes vote down vote up
@Before
public void createVersionFactory() throws IOException, NoHeadException,
        NoMessageException, UnmergedPathsException,
        ConcurrentRefUpdateException, WrongRepositoryStateException,
        GitAPIException {
    repo = createRepository();
    git = initializeGitFlow(repo);
    versionFactory = new TagBasedVersionFactory();
}
 
Example #2
Source Project: gradle-gitsemver   Author: palantir   File: TagBasedVersionFactoryTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testHeadPointsAtStable() throws ConcurrentRefUpdateException,
        InvalidTagNameException, NoHeadException, GitAPIException,
        NoWorkTreeException, MissingObjectException,
        IncorrectObjectTypeException, IOException {
    tag("v1.0.0");
    validateStableTag("1.0.0");
}
 
Example #3
Source Project: gradle-gitsemver   Author: palantir   File: TagBasedVersionFactoryTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testHeadPointsAtStableWhenUsingPrefix() throws ConcurrentRefUpdateException,
        InvalidTagNameException, NoHeadException, GitAPIException,
        NoWorkTreeException, MissingObjectException,
        IncorrectObjectTypeException, IOException {
    versionFactory = new TagBasedVersionFactory("myPrefix");
    tag("myPrefix-v1.0.0");
    validateStableTag("1.0.0");
}
 
Example #4
Source Project: gradle-gitsemver   Author: palantir   File: TagBasedVersionFactoryTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testHeadPointsOneAboveStable()
        throws ConcurrentRefUpdateException, InvalidTagNameException,
        NoHeadException, GitAPIException, NoWorkTreeException,
        MissingObjectException, IncorrectObjectTypeException, IOException {
    tag("v1.0.0");
    RevCommit head = makeCommit();
    validateUnstable("1.0.0", 1, head, Dirty.NO, DOT);
}
 
Example #5
Source Project: gradle-gitsemver   Author: palantir   File: TagBasedVersionFactoryTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testCommitCount() throws NoHeadException, NoMessageException,
        UnmergedPathsException, ConcurrentRefUpdateException,
        WrongRepositoryStateException, GitAPIException,
        NoWorkTreeException, IOException {
    tag("v0.1.1-rc");
    makeCommit();
    makeCommit();
    RevCommit head = makeCommit();
    validateUnstable("0.1.1-rc", 3, head, Dirty.NO, DOT);
}
 
Example #6
Source Project: gradle-gitsemver   Author: palantir   File: TagBasedVersionFactoryTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testVUnnecessary() throws ConcurrentRefUpdateException,
        InvalidTagNameException, NoHeadException, GitAPIException,
        NoWorkTreeException, IOException {
    makeCommit();
    tag("0.1.0");
    validateStableTag("0.1.0");
}
 
Example #7
Source Project: gradle-gitsemver   Author: palantir   File: TagBasedVersionFactoryTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testUnstableIsDirty() throws ConcurrentRefUpdateException,
        InvalidTagNameException, NoHeadException, GitAPIException,
        NoWorkTreeException, MissingObjectException,
        IncorrectObjectTypeException, IOException {
    RevCommit commit = makeCommit();
    tag("0.1.0-dev");
    dirtyRepo();
    validateUnstable("0.1.0-dev", 0, commit, Dirty.YES, DOT);
}
 
Example #8
Source Project: gradle-gitsemver   Author: palantir   File: TagBasedVersionFactoryTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testOrdering() throws ConcurrentRefUpdateException,
        InvalidTagNameException, NoHeadException, GitAPIException,
        NoWorkTreeException, MissingObjectException,
        IncorrectObjectTypeException, IOException {
    tag("3.0.0");
    makeCommit();
    RevCommit head = makeCommit();
    tag("1.0.0");
    validateUnstable("3.0.0", 2, head, Dirty.NO, DASH);
}
 
Example #9
Source Project: juneau   Author: apache   File: GitControl.java    License: Apache License 2.0 4 votes vote down vote up
public void commitToRepo(String message) throws IOException, NoHeadException, NoMessageException,
		ConcurrentRefUpdateException, JGitInternalException, WrongRepositoryStateException, GitAPIException {
	git.commit().setMessage(message).call();
}
 
Example #10
Source Project: gradle-gitsemver   Author: palantir   File: TagBasedVersionFactoryTest.java    License: Apache License 2.0 4 votes vote down vote up
private Ref tag(String tagName) throws ConcurrentRefUpdateException,
        InvalidTagNameException, NoHeadException, GitAPIException {
    return git.tag().setMessage("blah").setName(tagName).call();
}
 
Example #11
Source Project: gradle-gitsemver   Author: palantir   File: TagBasedVersionFactoryTest.java    License: Apache License 2.0 4 votes vote down vote up
private RevCommit makeCommit() throws NoHeadException, NoMessageException,
        UnmergedPathsException, ConcurrentRefUpdateException,
        WrongRepositoryStateException, GitAPIException {
    return git.commit().setCommitter(COMMITTER).setMessage("some commit").call();
}