Browse Source

Use JGitText.refAlreadyExists instead of "ref exists"

Change-Id: I113bcf82c6292db5269271f799d09c80acc40bcd
stable-1.1
Tomasz Zarna 13 years ago
parent
commit
c35c23db8d
  1. 2
      org.eclipse.jgit/resources/org/eclipse/jgit/JGitText.properties
  2. 2
      org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java
  3. 2
      org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java
  4. 2
      org.eclipse.jgit/src/org/eclipse/jgit/api/RenameBranchCommand.java
  5. 3
      org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java

2
org.eclipse.jgit/resources/org/eclipse/jgit/JGitText.properties

@ -359,7 +359,7 @@ rawLogMessageDoesNotParseAsLogEntry=Raw log message does not parse as log entry
readTimedOut=Read timed out readTimedOut=Read timed out
readingObjectsFromLocalRepositoryFailed=reading objects from local repository failed: {0} readingObjectsFromLocalRepositoryFailed=reading objects from local repository failed: {0}
receivingObjects=Receiving objects receivingObjects=Receiving objects
refAlreadExists=Ref {0} already exists refAlreadyExists=Ref {0} already exists
refNotResolved=Ref {0} can not be resolved refNotResolved=Ref {0} can not be resolved
refUpdateReturnCodeWas=RefUpdate return code was: {0} refUpdateReturnCodeWas=RefUpdate return code was: {0}
reflogsNotYetSupportedByRevisionParser=reflogs not yet supported by revision parser reflogsNotYetSupportedByRevisionParser=reflogs not yet supported by revision parser

2
org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java

@ -419,7 +419,7 @@ public class JGitText extends TranslationBundle {
/***/ public String readTimedOut; /***/ public String readTimedOut;
/***/ public String readingObjectsFromLocalRepositoryFailed; /***/ public String readingObjectsFromLocalRepositoryFailed;
/***/ public String receivingObjects; /***/ public String receivingObjects;
/***/ public String refAlreadExists; /***/ public String refAlreadyExists;
/***/ public String refNotResolved; /***/ public String refNotResolved;
/***/ public String refUpdateReturnCodeWas; /***/ public String refUpdateReturnCodeWas;
/***/ public String reflogsNotYetSupportedByRevisionParser; /***/ public String reflogsNotYetSupportedByRevisionParser;

2
org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java

@ -130,7 +130,7 @@ public class CreateBranchCommand extends GitCommand<Ref> {
&& refToCheck.getName().startsWith(Constants.R_HEADS); && refToCheck.getName().startsWith(Constants.R_HEADS);
if (!force && exists) if (!force && exists)
throw new RefAlreadyExistsException(MessageFormat.format( throw new RefAlreadyExistsException(MessageFormat.format(
JGitText.get().refAlreadExists, name)); JGitText.get().refAlreadyExists, name));
ObjectId startAt = getStartPoint(); ObjectId startAt = getStartPoint();
String startPointFullName = null; String startPointFullName = null;

2
org.eclipse.jgit/src/org/eclipse/jgit/api/RenameBranchCommand.java

@ -106,7 +106,7 @@ public class RenameBranchCommand extends GitCommand<Ref> {
String fullNewName; String fullNewName;
if (repo.getRef(newName) != null) if (repo.getRef(newName) != null)
throw new RefAlreadyExistsException(MessageFormat.format( throw new RefAlreadyExistsException(MessageFormat.format(
JGitText.get().refAlreadExists, newName)); JGitText.get().refAlreadyExists, newName));
if (oldName != null) { if (oldName != null) {
Ref ref = repo.getRef(oldName); Ref ref = repo.getRef(oldName);
if (ref == null) if (ref == null)

3
org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java

@ -947,7 +947,8 @@ public class ReceivePack {
// A well behaved client shouldn't have sent us a // A well behaved client shouldn't have sent us a
// create command for a ref we advertised to it. // create command for a ref we advertised to it.
// //
cmd.setResult(Result.REJECTED_OTHER_REASON, "ref exists"); cmd.setResult(Result.REJECTED_OTHER_REASON, MessageFormat
.format(JGitText.get().refAlreadyExists, ref));
continue; continue;
} }
} }

Loading…
Cancel
Save