Differential D4028 Diff 14692 java/src/main/java/org/softwareheritage/graph/experiments/forks/FindCommonAncestor.java
Changeset View
Changeset View
Standalone View
Standalone View
java/src/main/java/org/softwareheritage/graph/experiments/forks/FindCommonAncestor.java
Show All 13 Lines | private void load_graph(String graphBasename) throws IOException { | ||||
System.err.println("Loading graph " + graphBasename + " ..."); | System.err.println("Loading graph " + graphBasename + " ..."); | ||||
this.graph = new Graph(graphBasename); | this.graph = new Graph(graphBasename); | ||||
System.err.println("Graph loaded."); | System.err.println("Graph loaded."); | ||||
} | } | ||||
private static JSAPResult parse_args(String[] args) { | private static JSAPResult parse_args(String[] args) { | ||||
JSAPResult config = null; | JSAPResult config = null; | ||||
try { | try { | ||||
SimpleJSAP jsap = new SimpleJSAP( | SimpleJSAP jsap = new SimpleJSAP(FindCommonAncestor.class.getName(), "", | ||||
FindCommonAncestor.class.getName(), | |||||
"", | |||||
new Parameter[] { | new Parameter[]{ | ||||
new FlaggedOption("edgesFmt", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, | new FlaggedOption("edgesFmt", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, 'e', | ||||
'e', "edges", "Edges constraints"), | "edges", "Edges constraints"), | ||||
new FlaggedOption("graphPath", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, | new FlaggedOption("graphPath", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, 'g', | ||||
'g', "graph", "Basename of the compressed graph"), | "graph", "Basename of the compressed graph"),}); | ||||
} | |||||
); | |||||
config = jsap.parse(args); | config = jsap.parse(args); | ||||
if (jsap.messagePrinted()) { | if (jsap.messagePrinted()) { | ||||
System.exit(1); | System.exit(1); | ||||
} | } | ||||
} catch (JSAPException e) { | } catch (JSAPException e) { | ||||
e.printStackTrace(); | e.printStackTrace(); | ||||
} | } | ||||
Show All 27 Lines |