Hi Team,
I was glad to see on the feature list that monotone is supported, but 
disappointed that it didn't work for me with monotone 1.0.

"--no-format-dates" was added in 0.45 (released just after initial monotone 
support in OpenGrok), and ensures the output is in the expected ISO format.

--- a/src/org/opensolaris/opengrok/history/MonotoneRepository.java
+++ b/src/org/opensolaris/opengrok/history/MonotoneRepository.java
@@ -126,6 +126,7 @@ public class MonotoneRepository extends Repository {
 
         cmd.add("--no-graph");
         cmd.add("--no-merges");
+        cmd.add("--no-format-dates");
         cmd.add(filename);
 
         return new Executor(cmd, new File(directoryName));


Next, loosen the required amounts of dashes.

--- a/src/org/opensolaris/opengrok/history/MonotoneHistoryParser.java
+++ b/src/org/opensolaris/opengrok/history/MonotoneHistoryParser.java
@@ -101,7 +101,9 @@ class MonotoneHistoryParser implements 
Executor.StreamHandler {
         int state = 0;
         while ((s = in.readLine()) != null) {
             s = s.trim();
-            if 
("-----------------------------------------------------------------".equals(s)) 
{
+            // Later versions of monotone (such as 1.0) output even more 
dashes so lets require
+            // the minimum amount for maximum compatibility between monotone 
versions.
+            if 
(s.startsWith("-----------------------------------------------------------------"))
 {
                 if (entry != null && state > 2) {
                     entries.add(entry);
                 }



Also, the use of "--reallyquiet" is deprecated as of monotone 0.99, but I've 
left that for the moment. The supported alternative to "--reallyquiet" which is 
"--quiet --quiet", so that could be applied in the future when OpenGrok would 
like to drop support for older versions.

These patches now require monotone 0.45 or later and as an example Debian 
Squeeze ships monotone 0.48.

Cheers
Richard

ps. Thanks for the simple build process, and help about JFlex from `ant`.
_______________________________________________
opengrok-dev mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opengrok-dev

Reply via email to