Package org.eclipse.jgit.api.errors

Examples of org.eclipse.jgit.api.errors.RefAlreadyExistsException


    try {
      Ref refToCheck = repo.getRef(name);
      boolean exists = refToCheck != null
          && refToCheck.getName().startsWith(Constants.R_HEADS);
      if (!force && exists)
        throw new RefAlreadyExistsException(MessageFormat.format(
            JGitText.get().refAlreadyExists, name));

      ObjectId startAt = getStartPoint();
      String startPointFullName = null;
      if (startPoint != null) {
View Full Code Here


    try {
      String fullOldName;
      String fullNewName;
      if (repo.getRef(newName) != null)
        throw new RefAlreadyExistsException(MessageFormat.format(
            JGitText.get().refAlreadyExists, newName));
      if (oldName != null) {
        Ref ref = repo.getRef(oldName);
        if (ref == null)
          throw new RefNotFoundException(MessageFormat.format(
View Full Code Here

          case LOCK_FAILURE:
            throw new ConcurrentRefUpdateException(
                JGitText.get().couldNotLockHEAD,
                tagRef.getRef(), updateResult);
          case REJECTED:
            throw new RefAlreadyExistsException(
                MessageFormat.format(
                    JGitText.get().tagAlreadyExists,
                    newTag.toString()));
          default:
            throw new JGitInternalException(MessageFormat.format(
View Full Code Here

    try {
      String fullOldName;
      String fullNewName;
      if (repo.getRef(newName) != null)
        throw new RefAlreadyExistsException(MessageFormat.format(
            JGitText.get().refAlreadyExists1, newName));
      if (oldName != null) {
        Ref ref = repo.getRef(oldName);
        if (ref == null)
          throw new RefNotFoundException(MessageFormat.format(
View Full Code Here

    try {
      Ref refToCheck = repo.getRef(name);
      boolean exists = refToCheck != null
          && refToCheck.getName().startsWith(Constants.R_HEADS);
      if (!force && exists)
        throw new RefAlreadyExistsException(MessageFormat.format(
            JGitText.get().refAlreadyExists1, name));

      ObjectId startAt = getStartPoint();
      String startPointFullName = null;
      if (startPoint != null) {
View Full Code Here

    try {
      Ref refToCheck = repo.getRef(name);
      boolean exists = refToCheck != null
          && refToCheck.getName().startsWith(Constants.R_HEADS);
      if (!force && exists)
        throw new RefAlreadyExistsException(MessageFormat.format(
            JGitText.get().refAlreadExists, name));

      ObjectId startAt = getStartPoint();
      String startPointFullName = null;
      if (startPoint != null) {
View Full Code Here

    try {
      String fullOldName;
      String fullNewName;
      if (repo.getRef(newName) != null)
        throw new RefAlreadyExistsException(MessageFormat.format(
            JGitText.get().refAlreadExists, newName));
      if (oldName != null) {
        Ref ref = repo.getRef(oldName);
        if (ref == null)
          throw new RefNotFoundException(MessageFormat.format(
View Full Code Here

    case LOCK_FAILURE:
      throw new ConcurrentRefUpdateException(
          JGitText.get().couldNotLockHEAD, tagRef.getRef(),
          updateResult);
    case REJECTED:
      throw new RefAlreadyExistsException(MessageFormat.format(
          JGitText.get().tagAlreadyExists, newTagToString));
    default:
      throw new JGitInternalException(MessageFormat.format(
          JGitText.get().updatingRefFailed, refName, newTagToString,
          updateResult));
View Full Code Here

    try {
      Ref refToCheck = repo.getRef(name);
      boolean exists = refToCheck != null
          && refToCheck.getName().startsWith(Constants.R_HEADS);
      if (!force && exists)
        throw new RefAlreadyExistsException(MessageFormat.format(
            JGitText.get().refAlreadyExists1, name));

      ObjectId startAt = getStartPointObjectId();
      String startPointFullName = null;
      if (startPoint != null) {
View Full Code Here

    try {
      String fullOldName;
      String fullNewName;
      if (repo.getRef(newName) != null)
        throw new RefAlreadyExistsException(MessageFormat.format(
            JGitText.get().refAlreadyExists1, newName));
      if (oldName != null) {
        Ref ref = repo.getRef(oldName);
        if (ref == null)
          throw new RefNotFoundException(MessageFormat.format(
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.api.errors.RefAlreadyExistsException

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.