Lines 231-236
public class HgCommand {
Link Here
|
231 |
private static final String HG_CANNOT_RUN_ERR = "Cannot run program"; // NOI18N |
231 |
private static final String HG_CANNOT_RUN_ERR = "Cannot run program"; // NOI18N |
232 |
private static final String HG_ABORT_ERR = "abort: "; // NOI18N |
232 |
private static final String HG_ABORT_ERR = "abort: "; // NOI18N |
233 |
private static final String HG_ABORT_PUSH_ERR = "abort: push creates new remote branches!"; // NOI18N |
233 |
private static final String HG_ABORT_PUSH_ERR = "abort: push creates new remote branches!"; // NOI18N |
|
|
234 |
private static final String HG_ABORT_NO_FILES_TO_COPY_ERR = "abort: no files to copy"; // NOI18N |
234 |
|
235 |
|
235 |
private static final String HG_NO_CHANGE_NEEDED_ERR = "no change needed"; // NOI18N |
236 |
private static final String HG_NO_CHANGE_NEEDED_ERR = "no change needed"; // NOI18N |
236 |
private static final String HG_NO_ROLLBACK_ERR = "no rollback information available"; // NOI18N |
237 |
private static final String HG_NO_ROLLBACK_ERR = "no rollback information available"; // NOI18N |
Lines 1281-1287
public class HgCommand {
Link Here
|
1281 |
List<String> list = exec(command); |
1282 |
List<String> list = exec(command); |
1282 |
if (!list.isEmpty() && |
1283 |
if (!list.isEmpty() && |
1283 |
isErrorAbort(list.get(list.size() -1))) { |
1284 |
isErrorAbort(list.get(list.size() -1))) { |
1284 |
handleError(command, list, NbBundle.getMessage(HgCommand.class, "MSG_RENAME_FAILED")); |
1285 |
if (!bAfter || !isErrorAbortNoFilesToCopy(list.get(list.size() -1))) { |
|
|
1286 |
handleError(command, list, NbBundle.getMessage(HgCommand.class, "MSG_RENAME_FAILED")); |
1287 |
} |
1285 |
} |
1288 |
} |
1286 |
} |
1289 |
} |
1287 |
|
1290 |
|
Lines 2382-2387
public class HgCommand {
Link Here
|
2382 |
return msg.indexOf(HG_ABORT_PUSH_ERR) > -1; // NOI18N |
2385 |
return msg.indexOf(HG_ABORT_PUSH_ERR) > -1; // NOI18N |
2383 |
} |
2386 |
} |
2384 |
|
2387 |
|
|
|
2388 |
public static boolean isErrorAbortNoFilesToCopy(String msg) { |
2389 |
return msg.indexOf(HG_ABORT_NO_FILES_TO_COPY_ERR) > -1; // NOI18N |
2390 |
} |
2391 |
|
2385 |
private static boolean isErrorNoChangeNeeded(String msg) { |
2392 |
private static boolean isErrorNoChangeNeeded(String msg) { |
2386 |
return msg.indexOf(HG_NO_CHANGE_NEEDED_ERR) > -1; // NOI18N |
2393 |
return msg.indexOf(HG_NO_CHANGE_NEEDED_ERR) > -1; // NOI18N |
2387 |
} |
2394 |
} |