Update of /cvsroot/zipdiff/zipdiff/src/main/zipdiff
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3759/src/main/zipdiff
Modified Files:
Main.java
Log Message:
Index: Main.java
===================================================================
RCS file: /cvsroot/zipdiff/zipdiff/src/main/zipdiff/Main.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Main.java 27 Jun 2004 20:31:10 -0000 1.9
--- Main.java 27 Jun 2004 20:47:50 -0000 1.10
***************
*** 31,35 ****
private static final String OPTION_REGEX = "regex";
private static final String OPTION_EXIT_WITH_ERROR_ON_DIFF = "exitwitherrorondifference";
! private static final String OPTION_DONT_SHOW_DIFFERENCES = "dontshowdifferences";
private static final Options options;
--- 31,35 ----
private static final String OPTION_REGEX = "regex";
private static final String OPTION_EXIT_WITH_ERROR_ON_DIFF = "exitwitherrorondifference";
! private static final String OPTION_VERBOSE = "verbose";
private static final Options options;
***************
*** 83,92 ****
"if a difference is found then exit with error " + EXITCODE_DIFF);
! Option dontShowDifferences =
new Option(
! OPTION_DONT_SHOW_DIFFERENCES,
! OPTION_DONT_SHOW_DIFFERENCES,
false,
! "dont show differences between zips");
options.addOption(compareTS);
--- 83,92 ----
"if a difference is found then exit with error " + EXITCODE_DIFF);
! Option verboseOption =
new Option(
! OPTION_VERBOSE,
! OPTION_VERBOSE,
false,
! "verbose mode");
options.addOption(compareTS);
***************
*** 97,101 ****
options.addOption(ignoreCVSFilesOption);
options.addOption(exitWithError);
! options.addOption(dontShowDifferences);
options.addOption(outputFileOption);
}
--- 97,101 ----
options.addOption(ignoreCVSFilesOption);
options.addOption(exitWithError);
! options.addOption(verboseOption);
options.addOption(outputFileOption);
}
***************
*** 201,216 ****
}
! boolean exitWithErrorOnDif = false;
if (line.hasOption(OPTION_EXIT_WITH_ERROR_ON_DIFF)) {
! exitWithErrorOnDif = true;
}
- boolean dontShowDifferences = true;
- if (line.hasOption(OPTION_DONT_SHOW_DIFFERENCES)) {
- dontShowDifferences = true;
- }
-
Differences d = calc.getDifferences();
-
if (line.hasOption(OPTION_OUTPUT_FILE))
--- 201,210 ----
}
! boolean exitWithErrorOnDiff = false;
if (line.hasOption(OPTION_EXIT_WITH_ERROR_ON_DIFF)) {
! exitWithErrorOnDiff = true;
}
Differences d = calc.getDifferences();
if (line.hasOption(OPTION_OUTPUT_FILE))
***************
*** 222,231 ****
if (d.hasDifferences()) {
! if (!dontShowDifferences){
! // bit of reverse logic so as not to break original functionality.
System.out.println(d);
System.out.println(d.getFilename1() + " and " + d.getFilename2() + " are different.");
}
! if (exitWithErrorOnDif) {
System.exit(EXITCODE_DIFF);
}
--- 216,224 ----
if (d.hasDifferences()) {
! if (line.hasOption(OPTION_VERBOSE)) {
System.out.println(d);
System.out.println(d.getFilename1() + " and " + d.getFilename2() + " are different.");
}
! if (exitWithErrorOnDiff) {
System.exit(EXITCODE_DIFF);
}
|