Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.TagCommand.call()


      if (objectId != null) {
        RevObject revObj = getCommit(repository, objectId);
        tagCommand.setObjectId(revObj);
      }
      tagCommand.setName(tag);
      Ref call = tagCommand.call();
      return call != null ? true : false;
    } catch (Exception e) {
      error(e, repository, "Failed to create tag {1} in repository {0}", objectId, tag);
    }
    return false;
View Full Code Here


      if (objectId != null) {
        RevObject revObj = getCommit(repository, objectId);
        tagCommand.setObjectId(revObj);
      }
      tagCommand.setName(tag);
      Ref call = tagCommand.call();
      return call != null ? true : false;
    } catch (Exception e) {
      error(e, repository, "Failed to create tag {1} in repository {0}", objectId, tag);
    }
    return false;
View Full Code Here

      if (object != null) {
        RevWalk walk = new RevWalk(db);
        command.setObjectId(walk.parseAny(object));
      }
      try {
        command.call();
      } catch (RefAlreadyExistsException e) {
        throw die(MessageFormat.format(CLIText.get().tagAlreadyExists,
            tagName));
      }
    } else {
View Full Code Here

        throw die(MessageFormat.format(CLIText.get().tagAlreadyExists,
            tagName));
      }
    } else {
      ListTagCommand command = git.tagList();
      List<Ref> list = command.call();
      for (Ref ref : list) {
        outw.println(Repository.shortenRefName(ref.getName()));
      }
    }
  }
View Full Code Here

   public static List<Ref> getTags(final Git repo) throws JGitInternalException, ConcurrentRefUpdateException,
            InvalidTagNameException, NoHeadException
   {
      TagCommand tagCommand = repo.tag();
      RevTag revTag = tagCommand.call();
      String tagName = revTag.getTagName();

      return null;
   }
}
View Full Code Here

      TagCommand tagCommand = git.tag();
      tagCommand.setName(tagName);
      tagCommand.setMessage(tagMessage);
      tagCommand.setForceUpdate(true);
      tagCommand.setObjectId(revCommit);
      tagCommand.call();
    }
    git.getRepository().close();
    return revCommit.getId().getName();
  }
}
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.