[Unison-hackers] unison 2.13.16 output patch

Joseph Dunn jdunn14 at hotpop.com
Mon Sep 26 23:07:18 EDT 2005


Alright, another attempt at sending this (by the way,
http://www.cis.upenn.edu/~bcpierce/unison/status.html incorrectly
refers to unison-hackers at yahoogroups.com)

I was using the textui and discovered that the terse option drops some
necessary newlines in the output.  For example, before my patch output
looks like:
[jdunn at porkrind ~]$ ./unison-2.13.16-linux-text starcraft -batch -terse -path .mozilla
Contacting server...

local          starcraft...
changed  <-?-> changed    .mozilla/default/u8gzcu6e.slt/XUL.mfasl  changed  <-?-> changed    .mozilla/default/u8gzcu6e.slt/cookies.txt  changed  <-?-> changed   .mozilla/default/u8gzcu6e.slt/history.dat  No updates to propagate

After the patch:
[jdunn at porkrind ~]$ unison starcraft -batch -terse -path .mozilla
Contacting server...

local          starcraft...
changed  <-?-> changed    .mozilla/default/u8gzcu6e.slt/XUL.mfasl
changed  <-?-> changed    .mozilla/default/u8gzcu6e.slt/cookies.txt
changed  <-?-> changed    .mozilla/default/u8gzcu6e.slt/history.dat
No updates to propagate

The patch is as follows:
-----------------------------------------------------------------
diff -Naur unison-2.13.16.new/uitext.ml unison-2.13.16/uitext.ml
--- unison-2.13.16.new/uitext.ml	2005-06-02 09:59:21.000000000 -0600
+++ unison-2.13.16/uitext.ml	2005-09-16 14:35:27.000000000 -0600
@@ -222,8 +222,11 @@
                   "from "^host1^" to "^host2,
                   "from "^host2^" to "^host1
               in
-              if Prefs.read Globals.batch && not (Prefs.read Trace.terse) then
-                (display "\n"; displayDetails ri);
+              if Prefs.read Globals.batch then begin
+                display "\n";
+                if not (Prefs.read Trace.terse) then
+                  displayDetails ri
+              end;
               selectAction
                 (if Prefs.read Globals.batch then Some " " else None)
                 [((if !dir=Conflict && not (Prefs.read Globals.batch)
-----------------------------------------------------------------
Does this make sense?

On a different note, I have a patch that seems necessary to make
STATIC=true work on my machine:
-----------------------------------------------------------------
diff -Naur unison-2.13.16/Makefile.OCaml unison-2.13.16.new/Makefile.OCaml
--- unison-2.13.16/Makefile.OCaml       2005-06-27 11:38:25.000000000 -0600
+++ unison-2.13.16.new/Makefile.OCaml   2005-09-16 14:19:54.000000000 -0600
@@ -330,7 +330,7 @@

 $(NAME)$(EXEC_EXT): $(CAMLOBJS) $(COBJS)
        @echo Linking $@
-       $(CAMLC) -verbose $(CAMLFLAGS) -o $@ $(CFLAGS) $(CAMLLIBS) $(CLIBS) $^
+       $(CAMLC) -verbose $(CAMLFLAGS) -o $@ $(CFLAGS) $(CAMLLIBS) $^ $(CLIBS) $(STATICLIBS)

 # Unfortunately -output-obj does not put .o files into the output, only .cmx
 # files, so we have to use $(LD) to take care of COBJS.
-----------------------------------------------------------------

-Joseph Dunn



More information about the Unison-hackers mailing list