Package org.eclipse.egit.core.op

Examples of org.eclipse.egit.core.op.TagOperation


    tag.setTagger(personIdent);
    tag.setMessage(NLS.bind(
        UIText.FetchGerritChangePage_GeneratedTagMessage,
        spec.getSource()));
    tag.setObjectId(commit);
    new TagOperation(repository, tag, false).execute(monitor);
    monitor.worked(1);
  }
View Full Code Here


      tag.setTagger(personIdent);
      tag.setMessage(dialog.getTagMessage());
      tag.setObjectId(commit.getRevCommit());

      try {
        new TagOperation(repository, tag,
            dialog.shouldOverWriteTag())
            .execute(new NullProgressMonitor());
      } catch (CoreException e) {
        throw new ExecutionException(e.getMessage(), e);
      }
View Full Code Here

    final boolean shouldMoveTag = dialog.shouldOverWriteTag();

    Job tagJob = new Job(tagJobName) {
      protected IStatus run(IProgressMonitor monitor) {
        try {
          new TagOperation(repo, tag, shouldMoveTag).execute(monitor);
        } catch (CoreException e) {
          return Activator.createErrorStatus(
              UIText.TagAction_taggingFailed, e);
        } finally {
          GitLightweightDecorator.refresh();
View Full Code Here

    TagBuilder tag = new TagBuilder();
    tag.setTag("SomeTag");
    tag.setTagger(RawParseUtils.parsePersonIdent(TestUtil.TESTAUTHOR));
    tag.setMessage("I'm just a little tag");
    tag.setObjectId(repo.resolve(repo.getFullBranch()), Constants.OBJ_COMMIT);
    TagOperation top = new TagOperation(repo, tag, false);
    top.execute(null);
    touchAndSubmit(null);
  }
View Full Code Here

    newTag.setTag("TheNewTag");
    newTag.setMessage("Well, I'm the tag");
    newTag.setTagger(RawParseUtils.parsePersonIdent(TestUtils.AUTHOR));
    newTag.setObjectId(repository1.getRepository()
        .resolve("refs/heads/master"), Constants.OBJ_COMMIT);
    TagOperation top = new TagOperation(repository1.getRepository(),
        newTag, false);
    top.execute(new NullProgressMonitor());
    assertFalse("Tags should not be empty", repository1.getRepository()
        .getTags().isEmpty());

    try {
      top.execute(null);
      fail("Expected Exception not thrown");
    } catch (CoreException e) {
      // expected
    }

    top = new TagOperation(repository1.getRepository(), newTag, true);
    try {
      top.execute(null);
      fail("Expected Exception not thrown");
    } catch (CoreException e) {
      // expected
    }
    Ref tagRef = repository1.getRepository().getTags().get("TheNewTag");
    RevWalk walk = new RevWalk(repository1.getRepository());
    RevTag tag = walk.parseTag(
        repository1.getRepository().resolve(tagRef.getName()));

    newTag.setMessage("Another message");
    assertFalse("Messages should differ", tag.getFullMessage().equals(
        newTag.getMessage()));
    top.execute(null);
    tag = walk.parseTag(
        repository1.getRepository().resolve(tagRef.getName()));
    assertTrue("Messages be same", tag.getFullMessage().equals(
        newTag.getMessage()));
  }
View Full Code Here

    tag.setTagger(RawParseUtils.parsePersonIdent(TestUtil.TESTAUTHOR));
    tag.setMessage("I'm just a little tag");
    tag.setObjectId(repo.resolve(repo.getFullBranch()),
        Constants.OBJ_COMMIT);
    commitOfTag = tag.getObjectId();
    TagOperation top = new TagOperation(repo, tag, false);
    top.execute(null);
    touchAndSubmit(null);

    RepositoriesViewLabelProvider provider = GitRepositoriesViewTestUtils
        .createLabelProvider();
    // LOCAL_BRANCHES = provider.getText(new LocalNode(new RepositoryNode(
View Full Code Here

    tag.setTagger(personIdent);
    tag.setMessage(dialog.getTagMessage());
    tag.setObjectId(commitId, Constants.OBJ_COMMIT);

    try {
      new TagOperation(repo, tag, dialog.shouldOverWriteTag())
          .execute(new NullProgressMonitor());
    } catch (CoreException e) {
      throw new ExecutionException(e.getMessage(), e);
    }
View Full Code Here

    tag.setTag("SomeTag");
    tag.setTagger(RawParseUtils.parsePersonIdent(TestUtil.TESTAUTHOR));
    tag.setMessage("I'm just a little tag");
    tag.setObjectId(repo.resolve(repo.getFullBranch()),
        Constants.OBJ_COMMIT);
    TagOperation top = new TagOperation(repo, tag, false);
    top.execute(null);
    touchAndSubmit(null);

    RepositoriesViewLabelProvider provider = GitRepositoriesViewTestUtils
        .createLabelProvider();
    LOCAL_BRANCHES = provider.getText(new LocalNode(new RepositoryNode(
View Full Code Here

TOP

Related Classes of org.eclipse.egit.core.op.TagOperation

Copyright © 2018 www.massapicom. 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.