]> source.dussan.org Git - jgit.git/commitdiff
Externalize parsing exception message for RebaseCommand#Action 15/5515/1
authorTomasz Zarna <Tomasz.Zarna@pl.ibm.com>
Mon, 2 Apr 2012 09:36:29 +0000 (11:36 +0200)
committerTomasz Zarna <Tomasz.Zarna@pl.ibm.com>
Mon, 2 Apr 2012 09:36:29 +0000 (11:36 +0200)
Change-Id: Id0d7801e4de98bf118dbecadf623c9ffd7ab7554

org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java

index 0554efacd7c877857612bb36df8eeb41755a50fd..93392e2026af825898b0461ba7ad40751847d8d4 100644 (file)
@@ -476,6 +476,7 @@ unexpectedOddResult=odd: {0} + {1} - {2}
 unexpectedRefReport={0}: unexpected ref report: {1}
 unexpectedReportLine=unexpected report line: {0}
 unexpectedReportLine2={0} unexpected report line: {1}
+unknownOrUnsupportedCommand=Unknown or unsupported command "{0}", only "{1}" is allowed.
 unknownDIRCVersion=Unknown DIRC version {0}
 unknownHost=unknown host
 unknownIndexVersionOrCorruptIndex=Unknown index version (or corrupt index): {0}
index 7765c5d67f469ecc2425bcde400d5a4027ca3a8c..aa6572600c43c22bb128348079cdc19e52342320 100644 (file)
@@ -955,11 +955,9 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
                static Action parse(String token) {
                        if (token.equals("pick") || token.equals("p"))
                                return PICK;
-                       throw new JGitInternalException(
-                                       MessageFormat
-                                                       .format(
-                                                                       "Unknown or unsupported command \"{0}\", only  \"pick\" is allowed",
-                                                                       token));
+                       throw new JGitInternalException(MessageFormat.format(
+                                       JGitText.get().unknownOrUnsupportedCommand, token,
+                                       PICK.toToken()));
                }
        }
 
index c9f5d338f73d54b07b0bc86c7b93797f17fdd26c..bcc9589da3a7d190b3dd687800c733919c853d49 100644 (file)
@@ -536,6 +536,7 @@ public class JGitText extends TranslationBundle {
        /***/ public String unexpectedRefReport;
        /***/ public String unexpectedReportLine;
        /***/ public String unexpectedReportLine2;
+       /***/ public String unknownOrUnsupportedCommand;
        /***/ public String unknownDIRCVersion;
        /***/ public String unknownHost;
        /***/ public String unknownIndexVersionOrCorruptIndex;