Add $NON-NLS to suppress "Non-externalized string literal" warnings
Change-Id: I3e6f83ad2bc7d493e2c1ab5a8c60affa2b49c386 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
This commit is contained in:
parent
d1e821ec3f
commit
9ddc0ed83d
|
@ -129,20 +129,20 @@ private static String longTypeOf(ObjectReader reader,
|
||||||
final TrackingRefUpdate u) {
|
final TrackingRefUpdate u) {
|
||||||
final RefUpdate.Result r = u.getResult();
|
final RefUpdate.Result r = u.getResult();
|
||||||
if (r == RefUpdate.Result.LOCK_FAILURE)
|
if (r == RefUpdate.Result.LOCK_FAILURE)
|
||||||
return "[lock fail]";
|
return "[lock fail]"; //$NON-NLS-1$
|
||||||
if (r == RefUpdate.Result.IO_FAILURE)
|
if (r == RefUpdate.Result.IO_FAILURE)
|
||||||
return "[i/o error]";
|
return "[i/o error]"; //$NON-NLS-1$
|
||||||
if (r == RefUpdate.Result.REJECTED)
|
if (r == RefUpdate.Result.REJECTED)
|
||||||
return "[rejected]";
|
return "[rejected]"; //$NON-NLS-1$
|
||||||
if (ObjectId.zeroId().equals(u.getNewObjectId()))
|
if (ObjectId.zeroId().equals(u.getNewObjectId()))
|
||||||
return "[deleted]";
|
return "[deleted]"; //$NON-NLS-1$
|
||||||
|
|
||||||
if (r == RefUpdate.Result.NEW) {
|
if (r == RefUpdate.Result.NEW) {
|
||||||
if (u.getRemoteName().startsWith(Constants.R_HEADS))
|
if (u.getRemoteName().startsWith(Constants.R_HEADS))
|
||||||
return "[new branch]";
|
return "[new branch]"; //$NON-NLS-1$
|
||||||
else if (u.getLocalName().startsWith(Constants.R_TAGS))
|
else if (u.getLocalName().startsWith(Constants.R_TAGS))
|
||||||
return "[new tag]";
|
return "[new tag]"; //$NON-NLS-1$
|
||||||
return "[new]";
|
return "[new]"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r == RefUpdate.Result.FORCED) {
|
if (r == RefUpdate.Result.FORCED) {
|
||||||
|
@ -158,7 +158,7 @@ else if (u.getLocalName().startsWith(Constants.R_TAGS))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r == RefUpdate.Result.NO_CHANGE)
|
if (r == RefUpdate.Result.NO_CHANGE)
|
||||||
return "[up to date]";
|
return "[up to date]"; //$NON-NLS-1$
|
||||||
return "[" + r.name() + "]"; //$NON-NLS-1$//$NON-NLS-2$
|
return "[" + r.name() + "]"; //$NON-NLS-1$//$NON-NLS-2$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ protected void run() throws Exception {
|
||||||
list();
|
list();
|
||||||
else
|
else
|
||||||
throw new NotSupportedException(
|
throw new NotSupportedException(
|
||||||
"only --list option is currently supported");
|
"only --list option is currently supported"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
private void list() throws IOException, ConfigInvalidException {
|
private void list() throws IOException, ConfigInvalidException {
|
||||||
|
|
|
@ -324,7 +324,7 @@ private boolean showNotes(RevCommit c, NoteMap map, String label,
|
||||||
return false;
|
return false;
|
||||||
if (emptyLine)
|
if (emptyLine)
|
||||||
outw.println();
|
outw.println();
|
||||||
outw.print("Notes");
|
outw.print("Notes"); //$NON-NLS-1$
|
||||||
if (label != null) {
|
if (label != null) {
|
||||||
outw.print(" ("); //$NON-NLS-1$
|
outw.print(" ("); //$NON-NLS-1$
|
||||||
outw.print(label);
|
outw.print(label);
|
||||||
|
|
|
@ -182,15 +182,15 @@ private void printRefUpdateResult(final ObjectReader reader,
|
||||||
switch (rru.getStatus()) {
|
switch (rru.getStatus()) {
|
||||||
case OK:
|
case OK:
|
||||||
if (rru.isDelete())
|
if (rru.isDelete())
|
||||||
printUpdateLine('-', "[deleted]", null, remoteName, null);
|
printUpdateLine('-', "[deleted]", null, remoteName, null); //$NON-NLS-1$
|
||||||
else {
|
else {
|
||||||
final Ref oldRef = result.getAdvertisedRef(remoteName);
|
final Ref oldRef = result.getAdvertisedRef(remoteName);
|
||||||
if (oldRef == null) {
|
if (oldRef == null) {
|
||||||
final String summary;
|
final String summary;
|
||||||
if (remoteName.startsWith(Constants.R_TAGS))
|
if (remoteName.startsWith(Constants.R_TAGS))
|
||||||
summary = "[new tag]";
|
summary = "[new tag]"; //$NON-NLS-1$
|
||||||
else
|
else
|
||||||
summary = "[new branch]";
|
summary = "[new branch]"; //$NON-NLS-1$
|
||||||
printUpdateLine('*', summary, srcRef, remoteName, null);
|
printUpdateLine('*', summary, srcRef, remoteName, null);
|
||||||
} else {
|
} else {
|
||||||
boolean fastForward = rru.isFastForward();
|
boolean fastForward = rru.isFastForward();
|
||||||
|
@ -206,16 +206,16 @@ private void printRefUpdateResult(final ObjectReader reader,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NON_EXISTING:
|
case NON_EXISTING:
|
||||||
printUpdateLine('X', "[no match]", null, remoteName, null);
|
printUpdateLine('X', "[no match]", null, remoteName, null); //$NON-NLS-1$
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case REJECTED_NODELETE:
|
case REJECTED_NODELETE:
|
||||||
printUpdateLine('!', "[rejected]", null, remoteName,
|
printUpdateLine('!', "[rejected]", null, remoteName, //$NON-NLS-1$
|
||||||
CLIText.get().remoteSideDoesNotSupportDeletingRefs);
|
CLIText.get().remoteSideDoesNotSupportDeletingRefs);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case REJECTED_NONFASTFORWARD:
|
case REJECTED_NONFASTFORWARD:
|
||||||
printUpdateLine('!', "[rejected]", srcRef, remoteName,
|
printUpdateLine('!', "[rejected]", srcRef, remoteName, //$NON-NLS-1$
|
||||||
CLIText.get().nonFastForward);
|
CLIText.get().nonFastForward);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -223,22 +223,22 @@ private void printRefUpdateResult(final ObjectReader reader,
|
||||||
final String message = MessageFormat.format(
|
final String message = MessageFormat.format(
|
||||||
CLIText.get().remoteRefObjectChangedIsNotExpectedOne,
|
CLIText.get().remoteRefObjectChangedIsNotExpectedOne,
|
||||||
safeAbbreviate(reader, rru.getExpectedOldObjectId()));
|
safeAbbreviate(reader, rru.getExpectedOldObjectId()));
|
||||||
printUpdateLine('!', "[rejected]", srcRef, remoteName, message);
|
printUpdateLine('!', "[rejected]", srcRef, remoteName, message); //$NON-NLS-1$
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case REJECTED_OTHER_REASON:
|
case REJECTED_OTHER_REASON:
|
||||||
printUpdateLine('!', "[remote rejected]", srcRef, remoteName, rru
|
printUpdateLine('!', "[remote rejected]", srcRef, remoteName, rru //$NON-NLS-1$
|
||||||
.getMessage());
|
.getMessage());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UP_TO_DATE:
|
case UP_TO_DATE:
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printUpdateLine('=', "[up to date]", srcRef, remoteName, null);
|
printUpdateLine('=', "[up to date]", srcRef, remoteName, null); //$NON-NLS-1$
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NOT_ATTEMPTED:
|
case NOT_ATTEMPTED:
|
||||||
case AWAITING_REPORT:
|
case AWAITING_REPORT:
|
||||||
printUpdateLine('?', "[unexpected push-process behavior]", srcRef,
|
printUpdateLine('?', "[unexpected push-process behavior]", srcRef, //$NON-NLS-1$
|
||||||
remoteName, rru.getMessage());
|
remoteName, rru.getMessage());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ protected void run() throws Exception {
|
||||||
if (hard)
|
if (hard)
|
||||||
mode = selectMode(mode, ResetType.HARD);
|
mode = selectMode(mode, ResetType.HARD);
|
||||||
if (mode == null)
|
if (mode == null)
|
||||||
throw die("no reset mode set");
|
throw die("no reset mode set"); //$NON-NLS-1$
|
||||||
command.setMode(mode);
|
command.setMode(mode);
|
||||||
}
|
}
|
||||||
command.call();
|
command.call();
|
||||||
|
@ -98,7 +98,7 @@ protected void run() throws Exception {
|
||||||
|
|
||||||
private static ResetType selectMode(ResetType mode, ResetType want) {
|
private static ResetType selectMode(ResetType mode, ResetType want) {
|
||||||
if (mode != null)
|
if (mode != null)
|
||||||
throw die("reset modes are mutually exclusive, select one");
|
throw die("reset modes are mutually exclusive, select one"); //$NON-NLS-1$
|
||||||
return want;
|
return want;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,7 @@ protected boolean requiresRepository() {
|
||||||
protected void run() throws Exception {
|
protected void run() throws Exception {
|
||||||
mxBean = ManagementFactory.getThreadMXBean();
|
mxBean = ManagementFactory.getThreadMXBean();
|
||||||
if (!mxBean.isCurrentThreadCpuTimeSupported())
|
if (!mxBean.isCurrentThreadCpuTimeSupported())
|
||||||
throw die("Current thread CPU time not supported on this JRE");
|
throw die("Current thread CPU time not supported on this JRE"); //$NON-NLS-1$
|
||||||
|
|
||||||
if (gitDirs.isEmpty()) {
|
if (gitDirs.isEmpty()) {
|
||||||
RepositoryBuilder rb = new RepositoryBuilder() //
|
RepositoryBuilder rb = new RepositoryBuilder() //
|
||||||
|
@ -248,18 +248,18 @@ public int compare(Test a, Test b) {
|
||||||
File parent = directory.getParentFile();
|
File parent = directory.getParentFile();
|
||||||
if (name.equals(Constants.DOT_GIT) && parent != null)
|
if (name.equals(Constants.DOT_GIT) && parent != null)
|
||||||
name = parent.getName();
|
name = parent.getName();
|
||||||
outw.println(name + ": start at " + startId.name());
|
outw.println(name + ": start at " + startId.name()); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
outw.format(" %12d files, %8d commits\n", valueOf(files),
|
outw.format(" %12d files, %8d commits\n", valueOf(files), //$NON-NLS-1$
|
||||||
valueOf(commits));
|
valueOf(commits));
|
||||||
outw.format(" N=%10d min lines, %8d max lines\n", valueOf(minN),
|
outw.format(" N=%10d min lines, %8d max lines\n", valueOf(minN), //$NON-NLS-1$
|
||||||
valueOf(maxN));
|
valueOf(maxN));
|
||||||
|
|
||||||
outw.format("%-25s %12s ( %12s %12s )\n", //
|
outw.format("%-25s %12s ( %12s %12s )\n", //$NON-NLS-1$
|
||||||
"Algorithm", "Time(ns)", "Time(ns) on", "Time(ns) on");
|
"Algorithm", "Time(ns)", "Time(ns) on", "Time(ns) on"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||||
outw.format("%-25s %12s ( %12s %12s )\n", //
|
outw.format("%-25s %12s ( %12s %12s )\n", //$NON-NLS-1$
|
||||||
"", "", "N=" + minN, "N=" + maxN);
|
"", "", "N=" + minN, "N=" + maxN); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||||
outw.println("-----------------------------------------------------" //$NON-NLS-1$
|
outw.println("-----------------------------------------------------" //$NON-NLS-1$
|
||||||
+ "----------------"); //$NON-NLS-1$
|
+ "----------------"); //$NON-NLS-1$
|
||||||
|
|
||||||
|
@ -335,9 +335,9 @@ private List<Test> init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
throw die("Cannot determine names", e);
|
throw die("Cannot determine names", e); //$NON-NLS-1$
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
throw die("Cannot determine names", e);
|
throw die("Cannot determine names", e); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
return all;
|
return all;
|
||||||
|
|
|
@ -167,7 +167,7 @@ private void recreateCommitGraph() throws IOException {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pm.beginTask("Rewriting commits", queue.size());
|
pm.beginTask("Rewriting commits", queue.size()); //$NON-NLS-1$
|
||||||
try (ObjectInserter oi = db.newObjectInserter()) {
|
try (ObjectInserter oi = db.newObjectInserter()) {
|
||||||
final ObjectId emptyTree = oi.insert(Constants.OBJ_TREE,
|
final ObjectId emptyTree = oi.insert(Constants.OBJ_TREE,
|
||||||
new byte[] {});
|
new byte[] {});
|
||||||
|
@ -203,7 +203,7 @@ private void recreateCommitGraph() throws IOException {
|
||||||
newc.setAuthor(new PersonIdent(me, new Date(t.commitTime)));
|
newc.setAuthor(new PersonIdent(me, new Date(t.commitTime)));
|
||||||
newc.setCommitter(newc.getAuthor());
|
newc.setCommitter(newc.getAuthor());
|
||||||
newc.setParentIds(newParents);
|
newc.setParentIds(newParents);
|
||||||
newc.setMessage("ORIGINAL " + t.oldId.name() + "\n"); //$NON-NLS-2$
|
newc.setMessage("ORIGINAL " + t.oldId.name() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
t.newId = oi.insert(newc);
|
t.newId = oi.insert(newc);
|
||||||
rewrites.put(t.oldId, t.newId);
|
rewrites.put(t.oldId, t.newId);
|
||||||
pm.update(1);
|
pm.update(1);
|
||||||
|
|
|
@ -87,9 +87,9 @@ protected void run() throws Exception {
|
||||||
long size = reader.getObjectSize(obj, obj.getType());
|
long size = reader.getObjectSize(obj, obj.getType());
|
||||||
try {
|
try {
|
||||||
if (BinaryDelta.getResultSize(delta) != size)
|
if (BinaryDelta.getResultSize(delta) != size)
|
||||||
throw die("Object " + obj.name() + " is not a delta");
|
throw die("Object " + obj.name() + " is not a delta"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
} catch (ArrayIndexOutOfBoundsException bad) {
|
} catch (ArrayIndexOutOfBoundsException bad) {
|
||||||
throw die("Object " + obj.name() + " is not a delta");
|
throw die("Object " + obj.name() + " is not a delta"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
|
|
||||||
outw.println(BinaryDelta.format(delta));
|
outw.println(BinaryDelta.format(delta));
|
||||||
|
|
|
@ -349,10 +349,10 @@ private void run(Repository db) throws Exception {
|
||||||
name = parent.getName();
|
name = parent.getName();
|
||||||
outw.println(name + ":"); //$NON-NLS-1$
|
outw.println(name + ":"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
outw.format(" %6d files; %5d avg. unique lines/file\n", //
|
outw.format(" %6d files; %5d avg. unique lines/file\n", //$NON-NLS-1$
|
||||||
valueOf(fileCnt), //
|
valueOf(fileCnt), //
|
||||||
valueOf(lineCnt / fileCnt));
|
valueOf(lineCnt / fileCnt));
|
||||||
outw.format("%-20s %-15s %9s\n", "Hash", "Fold", "Max Len");
|
outw.format("%-20s %-15s %9s\n", "Hash", "Fold", "Max Len"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||||
outw.println("-----------------------------------------------"); //$NON-NLS-1$
|
outw.println("-----------------------------------------------"); //$NON-NLS-1$
|
||||||
String lastHashName = null;
|
String lastHashName = null;
|
||||||
for (Function fun : all) {
|
for (Function fun : all) {
|
||||||
|
@ -405,9 +405,9 @@ private List<Function> init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
throw new RuntimeException("Cannot determine names", e);
|
throw new RuntimeException("Cannot determine names", e); //$NON-NLS-1$
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
throw new RuntimeException("Cannot determine names", e);
|
throw new RuntimeException("Cannot determine names", e); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Function> all = new ArrayList<Function>();
|
List<Function> all = new ArrayList<Function>();
|
||||||
|
|
|
@ -715,7 +715,7 @@ public String toPrivateASCIIString() {
|
||||||
*/
|
*/
|
||||||
public String getHumanishName() throws IllegalArgumentException {
|
public String getHumanishName() throws IllegalArgumentException {
|
||||||
String s = getPath();
|
String s = getPath();
|
||||||
if ("/".equals(s) || "".equals(s)) //$NON-NLS-1$
|
if ("/".equals(s) || "".equals(s)) //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
s = getHost();
|
s = getHost();
|
||||||
if (s == null) // $NON-NLS-1$
|
if (s == null) // $NON-NLS-1$
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
|
|
Loading…
Reference in New Issue