From alan.schmitt at polytechnique.org Mon May 3 11:11:16 2010 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Mon, 3 May 2010 17:11:16 +0200 Subject: [Unison-hackers] A couple minor points (to add to the TODO list?) Message-ID: Hi, Going through some old emails, I found the following suggestions. a) make the destination directory for the CL version selectable (instead of dumping it in the middle of a systems directory :-)) something like /usr/local/bin or whatever might frequently be more suitable b) I use unison (up to now) only from the command line and it's used from within scripts or Makefiles. it is therefore unfortenuate that by default the GUI pops up and one has to use `unison -ui text' to avoid this. it would seem better to have it the other way round, i.e. to make the CLI the default and to require `unison -ui graphic' to start up the GUI from the command line (I would argue that people using the GUI regularily will start it anyway by double clicking the app) I think they are fairly reasonable and could be at least recorded in a TODO file. What's the procedure to edit this file? Can I do it myself (putting the points in the relevant sections, with only one star each)? Thanks, Alan From bcpierce at cis.upenn.edu Mon May 3 11:13:21 2010 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Mon, 3 May 2010 11:13:21 -0400 Subject: [Unison-hackers] A couple minor points (to add to the TODO list?) In-Reply-To: References: Message-ID: <4E2A6439-68DE-4DC4-8AFD-FC4B64C956F6@cis.upenn.edu> Yes, feel free to edit the TODO file... - B On May 3, 2010, at 11:11 AM, Alan Schmitt wrote: > Hi, > > Going through some old emails, I found the following suggestions. > > a) make the destination directory for the CL version selectable > (instead of dumping it in the middle of a systems directory :-)) > something like /usr/local/bin or whatever might frequently be more suitable > b) I use unison (up to now) only from the command line and it's used > from within scripts or Makefiles. it is therefore unfortenuate > that by default the GUI pops up and one has to use `unison -ui > text' to avoid this. it would seem better to have it the other way > round, i.e. > to make the > CLI the default and to require `unison -ui graphic' to start up > the GUI from the command line (I would argue that people using > the GUI regularily will start it anyway by double clicking the app) > > I think they are fairly reasonable and could be at least recorded in a > TODO file. What's the procedure to edit this file? Can I do it myself > (putting the points in the relevant sections, with only one star > each)? > > Thanks, > > Alan > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From vouillon at seas.upenn.edu Tue May 4 11:50:26 2010 From: vouillon at seas.upenn.edu (vouillon@seas.upenn.edu) Date: Tue, 4 May 2010 11:50:26 -0400 Subject: [Unison-hackers] [unison-svn] r443 - branches/2.40/src Message-ID: <201005041550.o44FoRJs020203@yaws.seas.upenn.edu> Author: vouillon Date: 2010-05-04 11:50:26 -0400 (Tue, 04 May 2010) New Revision: 443 Modified: branches/2.40/src/RECENTNEWS branches/2.40/src/mkProjectInfo.ml branches/2.40/src/recon.ml branches/2.40/src/uicommon.ml branches/2.40/src/unicode.ml Log: Branch 2.40: * Fix to Unicode case sensitive mode (call the right function for comparing file names). * "prefer = older/newer" now propagates deletions when there is no conflict Modified: branches/2.40/src/RECENTNEWS =================================================================== --- branches/2.40/src/RECENTNEWS 2010-04-22 21:53:50 UTC (rev 442) +++ branches/2.40/src/RECENTNEWS 2010-05-04 15:50:26 UTC (rev 443) @@ -1,6 +1,15 @@ CHANGES FROM VERSION 2.40.16 Branch 2.40: +* Fix to Unicode case sensitive mode (call the right function for + comparing file names). +* "prefer = older/newer" now propagates deletions when there is no + conflict + +------------------------------- +CHANGES FROM VERSION 2.40.16 + +Branch 2.40: * Fixed Unicode decomposition tables * Removed wrongly added trunk directory Modified: branches/2.40/src/mkProjectInfo.ml =================================================================== --- branches/2.40/src/mkProjectInfo.ml 2010-04-22 21:53:50 UTC (rev 442) +++ branches/2.40/src/mkProjectInfo.ml 2010-05-04 15:50:26 UTC (rev 443) @@ -115,3 +115,4 @@ + Modified: branches/2.40/src/recon.ml =================================================================== --- branches/2.40/src/recon.ml 2010-04-22 21:53:50 UTC (rev 442) +++ branches/2.40/src/recon.ml 2010-05-04 15:50:26 UTC (rev 443) @@ -34,21 +34,22 @@ diff.direction <- Replica2ToReplica1 else if dir=`Merge then begin if Globals.shouldMerge ri.path1 then diff.direction <- Merge - end else (* dir = `Older or dir = `Newer *) - if rc1.status<>`Deleted && rc2.status<>`Deleted then begin - let comp = Props.time rc1.desc -. Props.time rc2.desc in - let comp = if dir=`Newer then -. comp else comp in - if comp = 0.0 then - () - else if comp<0.0 then - diff.direction <- Replica1ToReplica2 - else - diff.direction <- Replica2ToReplica1 - end else if rc1.status=`Deleted && dir=`Newer then begin - diff.direction <- Replica2ToReplica1 - end else if rc2.status=`Deleted && dir=`Newer then begin - diff.direction <- Replica1ToReplica2 - end + end else begin (* dir = `Older or dir = `Newer *) + match rc1.status, rc2.status with + `Deleted, _ -> + if default=Conflict then + diff.direction <- Replica2ToReplica1 + | _, `Deleted -> + if default=Conflict then + diff.direction <- Replica1ToReplica2 + | _ -> + let comp = Props.time rc1.desc -. Props.time rc2.desc in + let comp = if dir=`Newer then -. comp else comp in + if comp<0.0 then + diff.direction <- Replica1ToReplica2 + else + diff.direction <- Replica2ToReplica1 + end | _ -> () Modified: branches/2.40/src/uicommon.ml =================================================================== --- branches/2.40/src/uicommon.ml 2010-04-22 21:53:50 UTC (rev 442) +++ branches/2.40/src/uicommon.ml 2010-05-04 15:50:26 UTC (rev 443) @@ -435,13 +435,15 @@ (* ---- *) (*FIX: remove when Unison version > 2.40 *) -let _ = Remote.registerRootCmd "unicodeCaseSensitive" (fun _ -> Lwt.return ()) +let _ = +Remote.registerRootCmd "hasUnicodeCaseSensitive" (fun _ -> Lwt.return ()) let supportUnicodeCaseSensitive () = if Uutil.myMajorVersion > "2.40" (* The test is correct until 2.99... *) then Lwt.return true else begin Globals.allRootsMap - (fun r -> Remote.commandAvailable r "unicodeCaseSensitive") >>= fun l -> + (fun r -> Remote.commandAvailable r "hasUnicodeCaseSensitive") + >>= fun l -> Lwt.return (List.for_all (fun x -> x) l) end Modified: branches/2.40/src/unicode.ml =================================================================== --- branches/2.40/src/unicode.ml 2010-04-22 21:53:50 UTC (rev 442) +++ branches/2.40/src/unicode.ml 2010-05-04 15:50:26 UTC (rev 443) @@ -1071,7 +1071,7 @@ end let case_sensitive_compare s s' = - compare_rec s s' 0 (min (String.length s) (String.length s')) + compare_cs_rec s s' 0 (min (String.length s) (String.length s')) (****) From schmitta at seas.upenn.edu Thu May 6 05:28:05 2010 From: schmitta at seas.upenn.edu (schmitta@seas.upenn.edu) Date: Thu, 6 May 2010 05:28:05 -0400 Subject: [Unison-hackers] [unison-svn] r444 - trunk/src Message-ID: <201005060928.o469S5RD001978@yaws.seas.upenn.edu> Author: schmitta Date: 2010-05-06 05:28:05 -0400 (Thu, 06 May 2010) New Revision: 444 Modified: trunk/src/TODO.txt Log: Some suggestions from Joerg von den Hoff Modified: trunk/src/TODO.txt =================================================================== --- trunk/src/TODO.txt 2010-05-04 15:50:26 UTC (rev 443) +++ trunk/src/TODO.txt 2010-05-06 09:28:05 UTC (rev 444) @@ -227,7 +227,12 @@ should strip symbols from binary files in 'make exportnative' +* [Joerg von den Hoff, 2009] OS X: make the destination directory for the CL + version selectable (instead of dumping it in the middle of a systems + directory :-)) something like /usr/local/bin or whatever might frequently be + more suitable + * DOCUMENTATION * ============= @@ -503,6 +508,14 @@ messages in the text ui. See Dale Worley's message for a detailed proposal. +* [Joerg von den Hoff, 2009] I use unison (up to now) only from the command + line and it's used from within scripts or Makefiles. it is therefore + unfortunate that by default the GUI pops up and one has to use `unison -ui + text' to avoid this. it would seem better to have it the other way round, + i.e., to make the CLI the default and to require `unison -ui graphic' to + start up the GUI from the command line (I would argue that people using the + GUI regularly will start it anyway by double clicking the app) + Would be nice to have the Unison log file relative to my home directory, like this logfile = ~/.unision/log From alan.schmitt at polytechnique.org Thu May 6 05:33:05 2010 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Thu, 6 May 2010 11:33:05 +0200 Subject: [Unison-hackers] Command line arguments and OS X GUI Message-ID: Hello, I'm going through minor things in my Unison todo stuff, and I just noticed a small note to say in the tutorial that (at least for OS X), the tutorial should be run in text mode. I just saw that we say "You can force the text interface even if graphical is the default by adding {\tt -ui text}. The other command-line arguments to both versions are identical." Does this mean that the other GUI versions (windows and GTK) accept command line arguments? If so, I would propose a footnote that says that at the moment, the OS X GUI does not accept any command line argument. Otherwise, I would remove the text that say that any GUI version accept these arguments. Alan From alan.schmitt at polytechnique.org Thu May 6 06:33:13 2010 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Thu, 6 May 2010 12:33:13 +0200 Subject: [Unison-hackers] tiny bug: permanently ignoring path and profiles with no final end of line Message-ID: I discovered this one recently: when "permanently ignoring" something, if the profile under consideration does not end with a newline, then the added preference is put at the end of the line and pollutes it. I suggest modifying the code of Prefs.addline (line 472 of prefs.ml) to add an extra "\n" before the line is written. Pro: we will always create a parsable profile from a parsable one Con: we will have empty lines (since we add one a newline after as well) We could also only add the newline before, and not after. I don't know if it's bad practice to have files with no final newline. This is where this is used (so the impact should be minimal): $ grep Prefs.add * uicommon.ml: let r = Prefs.add "ignore" theRegExp in uicommon.ml: ignore (Prefs.add "root" r1); uicommon.ml: ignore (Prefs.add "root" r2) uicommon.ml: Prefs.addComment "Unison preferences file"; uimacbridge.ml: Prefs.addComment "Unison preferences file"; uimacbridge.ml: Prefs.addComment "Unison preferences file"; (* Creates the file, assumes it doesn't exist *) uimacbridge.ml: ignore (Prefs.add "root" r1); uimacbridge.ml: ignore (Prefs.add "root" r2);; uimacbridgenew.ml: Prefs.addComment "Unison preferences file"; uimacbridgenew.ml: Prefs.addComment "Unison preferences file"; (* Creates the file, assumes it doesn't exist *) uimacbridgenew.ml: ignore (Prefs.add "root" r1); uimacbridgenew.ml: ignore (Prefs.add "root" r2);; Thoughts? Alan From bcpierce at cis.upenn.edu Thu May 6 08:42:44 2010 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Thu, 6 May 2010 08:42:44 -0400 Subject: [Unison-hackers] Command line arguments and OS X GUI In-Reply-To: References: Message-ID: > I'm going through minor things in my Unison todo stuff, and I just > noticed a small note to say in the tutorial that (at least for OS X), > the tutorial should be run in text mode. I just saw that we say "You > can force the text interface even if graphical is the default by > adding {\tt -ui text}. The other command-line arguments to both > versions are identical." Does this mean that the other GUI versions > (windows and GTK) accept command line arguments? > > If so, I would propose a footnote that says that at the moment, the OS > X GUI does not accept any command line argument. Otherwise, I would > remove the text that say that any GUI version accept these arguments. Doesn't it? For me, executing the "internal" binary like this ~/current/unison/trunk/src/uimacnew/build/Default/Unison.app/Contents/MacOS/Unison accepts cl arguments just fine... - B From bcpierce at cis.upenn.edu Thu May 6 08:58:22 2010 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Thu, 6 May 2010 08:58:22 -0400 Subject: [Unison-hackers] tiny bug: permanently ignoring path and profiles with no final end of line In-Reply-To: References: Message-ID: <9856081A-3723-4DB9-B717-9A9BC3952567@cis.upenn.edu> Would it be hard to just check whether the final character in the file is a newline? - B On May 6, 2010, at 6:33 AM, Alan Schmitt wrote: > I discovered this one recently: when "permanently ignoring" something, > if the profile under consideration does not end with a newline, then > the added preference is put at the end of the line and pollutes it. > > I suggest modifying the code of Prefs.addline (line 472 of prefs.ml) > to add an extra "\n" before the line is written. > > Pro: we will always create a parsable profile from a parsable one > Con: we will have empty lines (since we add one a newline after as well) > > We could also only add the newline before, and not after. I don't know > if it's bad practice to have files with no final newline. > > This is where this is used (so the impact should be minimal): > > $ grep Prefs.add * > uicommon.ml: let r = Prefs.add "ignore" theRegExp in > uicommon.ml: ignore (Prefs.add "root" r1); > uicommon.ml: ignore (Prefs.add "root" r2) > uicommon.ml: Prefs.addComment "Unison preferences file"; > uimacbridge.ml: Prefs.addComment "Unison preferences file"; > uimacbridge.ml: Prefs.addComment "Unison preferences file"; (* > Creates the file, assumes it doesn't exist *) > uimacbridge.ml: ignore (Prefs.add "root" r1); > uimacbridge.ml: ignore (Prefs.add "root" r2);; > uimacbridgenew.ml: Prefs.addComment "Unison preferences file"; > uimacbridgenew.ml: Prefs.addComment "Unison preferences file"; (* > Creates the file, assumes it doesn't exist *) > uimacbridgenew.ml: ignore (Prefs.add "root" r1); > uimacbridgenew.ml: ignore (Prefs.add "root" r2);; > > Thoughts? > > Alan > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From alan.schmitt at polytechnique.org Thu May 6 09:51:52 2010 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Thu, 6 May 2010 15:51:52 +0200 Subject: [Unison-hackers] tiny bug: permanently ignoring path and profiles with no final end of line In-Reply-To: <9856081A-3723-4DB9-B717-9A9BC3952567@cis.upenn.edu> References: <9856081A-3723-4DB9-B717-9A9BC3952567@cis.upenn.edu> Message-ID: On Thu, May 6, 2010 at 2:58 PM, Benjamin Pierce wrote: > Would it be hard to just check whether the final character in the file is a newline? This is what I wanted to do initially, but as we open the file in append mode, it's going to require some extra code. (The more I think about it, the more I'm convinced the best solution is to put a newline, then the configuration line without a newline.) Alan From bcpierce at cis.upenn.edu Thu May 6 11:27:58 2010 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Thu, 6 May 2010 11:27:58 -0400 Subject: [Unison-hackers] tiny bug: permanently ignoring path and profiles with no final end of line In-Reply-To: References: <9856081A-3723-4DB9-B717-9A9BC3952567@cis.upenn.edu> Message-ID: Fine. - Benjamin On May 6, 2010, at 9:51 AM, Alan Schmitt wrote: > On Thu, May 6, 2010 at 2:58 PM, Benjamin Pierce > wrote: >> Would it be hard to just check whether the final character in the >> file is a newline? > > This is what I wanted to do initially, but as we open the file in > append mode, it's going to require some extra code. (The more I think > about it, the more I'm convinced the best solution is to put a > newline, then the configuration line without a newline.) > > Alan > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From alan.schmitt at polytechnique.org Fri May 7 04:09:26 2010 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Fri, 7 May 2010 10:09:26 +0200 Subject: [Unison-hackers] Fwd: unison In-Reply-To: References: Message-ID: I've just received this message. It's very strange that the version reported includes a (platform dependent) end of line. Is this a (known) bug? Alan ---------- Forwarded message ---------- From: Wail Gueaieb Date: Fri, May 7, 2010 at 7:27 AM Subject: unison To: alan.schmitt at polytechnique.org Hi Alan, I am trying to synchronize a linux machine with my Windows laptop using unison 2.32.52 (the latest stable version). So I download the windows executable file from your web site (http://alan.petitepomme.net/unison/index.html) and a linux executable file from another site (same version: 2.32.52). Now, when I try to run unison, I get the following error message: Fatal error: Received unexpected header from the server: ?expected "Unison 2.32\n" but received "Unison 2.32\r\n\000\000\000\000", which differs at "Unison 2.32\r". This can happen because you have different versions of Unison installed on the client and server machines, or because your connection is failing and somebody is printing an error message, or because your remote login shell is printing something itself before starting Unison. I find this very strange since the error message confirms that both client and server run version 2.32 of unison. Can you spot anything fishy? Thanks. -- Wail From schmitta at seas.upenn.edu Fri May 7 07:13:51 2010 From: schmitta at seas.upenn.edu (schmitta@seas.upenn.edu) Date: Fri, 7 May 2010 07:13:51 -0400 Subject: [Unison-hackers] [unison-svn] r445 - trunk/src/ubase Message-ID: <201005071113.o47BDpZi030902@yaws.seas.upenn.edu> Author: schmitta Date: 2010-05-07 07:13:51 -0400 (Fri, 07 May 2010) New Revision: 445 Modified: trunk/src/ubase/prefs.ml Log: Lines added in profile files by unison always start at a new line Modified: trunk/src/ubase/prefs.ml =================================================================== --- trunk/src/ubase/prefs.ml 2010-05-06 09:28:05 UTC (rev 444) +++ trunk/src/ubase/prefs.ml 2010-05-07 11:13:51 UTC (rev 445) @@ -482,8 +482,8 @@ let ochan = System.open_out_gen [Open_wronly; Open_creat; Open_append] 0o600 filename in + output_string ochan "\n"; output_string ochan l; - output_string ochan "\n"; close_out ochan; resultmsg with From alan.schmitt at polytechnique.org Fri May 7 07:14:30 2010 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Fri, 7 May 2010 13:14:30 +0200 Subject: [Unison-hackers] tiny bug: permanently ignoring path and profiles with no final end of line In-Reply-To: References: <9856081A-3723-4DB9-B717-9A9BC3952567@cis.upenn.edu> Message-ID: I've committed this. Do I need to do something special to have the change appearing in the changelog (or will it grab it from the svn commit message)? Alan From list-ener at strank.info Fri May 7 07:17:41 2010 From: list-ener at strank.info (Stefan Rank) Date: Fri, 07 May 2010 13:17:41 +0200 Subject: [Unison-hackers] Command line arguments and OS X GUI In-Reply-To: References: Message-ID: <4BE3F6D5.1090000@strank.info> on Thursday 2010-05-06 14:42 Benjamin Pierce said the following: >> I'm going through minor things in my Unison todo stuff, and I just >> noticed a small note to say in the tutorial that (at least for OS X), >> the tutorial should be run in text mode. I just saw that we say "You >> can force the text interface even if graphical is the default by >> adding {\tt -ui text}. The other command-line arguments to both >> versions are identical." Does this mean that the other GUI versions >> (windows and GTK) accept command line arguments? I can confirm that all GUI versions I have access to (Mac OS, Linux-GTK, Windows) do accept command line arguments. (As Benjamin notes below, it's the binary that accepts arguments, not the .app on the Mac. There is generally no way to supply arguments other than filenames to a .app ... ) cheers, stefan PS: Since I use the GUI version regularly from the command-line, I would also vote against the idea recently added to TODO.txt in r444, i.e. I would prefer to *not* make the text-ui the default on the command-line. >> If so, I would propose a footnote that says that at the moment, the OS >> X GUI does not accept any command line argument. Otherwise, I would >> remove the text that say that any GUI version accept these arguments. > > Doesn't it? For me, executing the "internal" binary like this > > ~/current/unison/trunk/src/uimacnew/build/Default/Unison.app/Contents/MacOS/Unison > > accepts cl arguments just fine... From alan.schmitt at polytechnique.org Fri May 7 07:18:25 2010 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Fri, 7 May 2010 13:18:25 +0200 Subject: [Unison-hackers] Command line arguments and OS X GUI In-Reply-To: References: Message-ID: On Thu, May 6, 2010 at 2:42 PM, Benjamin Pierce wrote: > Doesn't it? ?For me, executing the "internal" binary like this > > ?~/current/unison/trunk/src/uimacnew/build/Default/Unison.app/Contents/MacOS/Unison > > accepts cl arguments just fine... I just tried as described in the tutorial: unison a.tmp b.tmp and I get the profile chooser. Is it working for you? Alan From list-ener at strank.info Fri May 7 07:35:32 2010 From: list-ener at strank.info (Stefan Rank) Date: Fri, 07 May 2010 13:35:32 +0200 Subject: [Unison-hackers] Command line arguments and OS X GUI In-Reply-To: References: Message-ID: <4BE3FB04.3030100@strank.info> on Friday 2010-05-07 13:18 Alan Schmitt said the following: > On Thu, May 6, 2010 at 2:42 PM, Benjamin Pierce wrote: >> Doesn't it? For me, executing the "internal" binary like this >> >> ~/current/unison/trunk/src/uimacnew/build/Default/Unison.app/Contents/MacOS/Unison >> >> accepts cl arguments just fine... > > I just tried as described in the tutorial: > unison a.tmp b.tmp > and I get the profile chooser. > > Is it working for you? What is the output of:: which -a unison for you? The unison binary that can be installed via the menu option of the macnew GUI (to /usr/bin/unison) calls the internal Unison (capital U) and accepts command-line arguments here. Maybe this should be mentioned in the tutorial? cheers, stefan From alan.schmitt at polytechnique.org Fri May 7 07:31:32 2010 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Fri, 7 May 2010 13:31:32 +0200 Subject: [Unison-hackers] Command line arguments and OS X GUI In-Reply-To: <4BE3F6D5.1090000@strank.info> References: <4BE3F6D5.1090000@strank.info> Message-ID: On Fri, May 7, 2010 at 1:17 PM, Stefan Rank wrote: > I can confirm that all GUI versions I have access to (Mac OS, Linux-GTK, > Windows) do accept command line arguments. > > (As Benjamin notes below, it's the binary that accepts arguments, not > the .app on the Mac. There is generally no way to supply arguments other > than filenames to a .app ... ) I've tried both the command line utility, and the contents of the Unison.app package as described above, and although I can give a profile name, I cannot run the tutorial as described in the manual (http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#tutorial). But maybe it's local to my machine. > PS: Since I use the GUI version regularly from the command-line, I would > also vote against the idea recently added to TODO.txt in r444, i.e. I > would prefer to *not* make the text-ui the default on the command-line. I guess this is a situation where both defaults make sense. I don't care either way. (But if it's clear it's not going to change, we should remove it from the TODO file.) Alan From alan.schmitt at polytechnique.org Fri May 7 08:00:52 2010 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Fri, 7 May 2010 14:00:52 +0200 Subject: [Unison-hackers] Command line arguments and OS X GUI In-Reply-To: <4BE3FB04.3030100@strank.info> References: <4BE3FB04.3030100@strank.info> Message-ID: On Fri, May 7, 2010 at 1:35 PM, Stefan Rank wrote: > What is the output of:: > > ? which -a unison > > for you? /usr/bin/unison /Users/schmitta/bin/unison > The unison binary that can be installed via the menu option of the > macnew GUI (to /usr/bin/unison) calls the internal Unison (capital U) > and accepts command-line arguments here. Yes. And this is where things fail. When I call: /usr/bin/unison a.tmp b.tmp as specified in the tutorial, I get the profile chooser. (The other unison, in my ~/bin directory, is a text only version and works fine.) Note that this has been reported several times by OS X users: some (most?) command line options work, but specifying the roots like above does not. Alan From list-ener at strank.info Fri May 7 08:45:58 2010 From: list-ener at strank.info (Stefan Rank) Date: Fri, 07 May 2010 14:45:58 +0200 Subject: [Unison-hackers] Command line arguments and OS X GUI In-Reply-To: References: <4BE3FB04.3030100@strank.info> Message-ID: <4BE40B86.7030609@strank.info> on Friday 2010-05-07 14:00 Alan Schmitt said the following: > On Fri, May 7, 2010 at 1:35 PM, Stefan Rank wrote: >> The unison binary that can be installed via the menu option of the >> macnew GUI (to /usr/bin/unison) calls the internal Unison (capital U) >> and accepts command-line arguments here. > > Yes. And this is where things fail. When I call: > /usr/bin/unison a.tmp b.tmp > as specified in the tutorial, I get the profile chooser. (The other > unison, in my ~/bin directory, is a text only version and works fine.) > > Note that this has been reported several times by OS X users: some > (most?) command line options work, but specifying the roots like above > does not. Yes, you're right. (Sorry for not trying exactly what you suggested right at the beginning...) I just never realised since I am always using profiles, only changing options, but not directly specifying roots. It also accepts the version:: unison -root a -root b which has the same problem, but it gives an error if you try:: unison -root /Applications/Unison.app/Contents/MacOS/Unison: option `-root' needs an argument. so the option parsing seems to be ok. I would guess the feature is simply missing from the Mac GUI? stefan From Jerome.Vouillon at pps.jussieu.fr Fri May 7 09:53:47 2010 From: Jerome.Vouillon at pps.jussieu.fr (Jerome Vouillon) Date: Fri, 7 May 2010 15:53:47 +0200 Subject: [Unison-hackers] Fwd: unison In-Reply-To: References: Message-ID: <20100507135347.GA19192@pps.jussieu.fr> > Fatal error: Received unexpected header from the server: > ?expected "Unison 2.32\n" but received "Unison 2.32\r\n\000\000\000\000", > which differs at "Unison 2.32\r". Apparently, your ssh client does not provide a transparent binary connection between the Unison client and server: it inserts a carriage return character '\r' before each newline character '\n'. You should try a different ssh client. -- Jerome From bcpierce at cis.upenn.edu Fri May 7 10:26:17 2010 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Fri, 7 May 2010 10:26:17 -0400 Subject: [Unison-hackers] tiny bug: permanently ignoring path and profiles with no final end of line In-Reply-To: References: <9856081A-3723-4DB9-B717-9A9BC3952567@cis.upenn.edu> Message-ID: Use "make checking" instead of committing directly... - Benjamin On May 7, 2010, at 7:14 AM, Alan Schmitt wrote: > I've committed this. Do I need to do something special to have the > change appearing in the changelog (or will it grab it from the svn > commit message)? > > Alan > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From schmitta at seas.upenn.edu Fri May 7 10:53:11 2010 From: schmitta at seas.upenn.edu (schmitta@seas.upenn.edu) Date: Fri, 7 May 2010 10:53:11 -0400 Subject: [Unison-hackers] [unison-svn] r446 - trunk/src Message-ID: <201005071453.o47ErBFK002900@yaws.seas.upenn.edu> Author: schmitta Date: 2010-05-07 10:53:11 -0400 (Fri, 07 May 2010) New Revision: 446 Modified: trunk/src/RECENTNEWS trunk/src/mkProjectInfo.ml Log: Doing the "make checkin" by hand, will not forget to use it next time Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2010-05-07 11:13:51 UTC (rev 445) +++ trunk/src/RECENTNEWS 2010-05-07 14:53:11 UTC (rev 446) @@ -1,5 +1,10 @@ CHANGES FROM VERSION 2.40.16 +Lines added in profile files by unison always start at a new line + +------------------------------- +CHANGES FROM VERSION 2.40.16 + * Fix to Unicode case sensitive mode (call the right function for comparing file names). * "prefer = older/newer" now propagates deletions when there is no Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2010-05-07 11:13:51 UTC (rev 445) +++ trunk/src/mkProjectInfo.ml 2010-05-07 14:53:11 UTC (rev 446) @@ -116,3 +116,4 @@ + From vouillon at seas.upenn.edu Thu May 20 05:08:30 2010 From: vouillon at seas.upenn.edu (vouillon@seas.upenn.edu) Date: Thu, 20 May 2010 05:08:30 -0400 Subject: [Unison-hackers] [unison-svn] r447 - branches/2.40/src Message-ID: <201005200908.o4K98UAt016129@yaws.seas.upenn.edu> Author: vouillon Date: 2010-05-20 05:08:30 -0400 (Thu, 20 May 2010) New Revision: 447 Modified: branches/2.40/src/RECENTNEWS branches/2.40/src/mkProjectInfo.ml branches/2.40/src/uicommon.ml branches/2.40/src/unicode.ml Log: * One more fix to Unicode case sensitive mode Modified: branches/2.40/src/RECENTNEWS =================================================================== --- branches/2.40/src/RECENTNEWS 2010-05-07 14:53:11 UTC (rev 446) +++ branches/2.40/src/RECENTNEWS 2010-05-20 09:08:30 UTC (rev 447) @@ -1,5 +1,10 @@ CHANGES FROM VERSION 2.40.16 +* One more fix to Unicode case sensitive mode + +------------------------------- +CHANGES FROM VERSION 2.40.16 + Branch 2.40: * Fix to Unicode case sensitive mode (call the right function for comparing file names). Modified: branches/2.40/src/mkProjectInfo.ml =================================================================== --- branches/2.40/src/mkProjectInfo.ml 2010-05-07 14:53:11 UTC (rev 446) +++ branches/2.40/src/mkProjectInfo.ml 2010-05-20 09:08:30 UTC (rev 447) @@ -116,3 +116,4 @@ + Modified: branches/2.40/src/uicommon.ml =================================================================== --- branches/2.40/src/uicommon.ml 2010-05-07 14:53:11 UTC (rev 446) +++ branches/2.40/src/uicommon.ml 2010-05-20 09:08:30 UTC (rev 447) @@ -436,13 +436,13 @@ (*FIX: remove when Unison version > 2.40 *) let _ = -Remote.registerRootCmd "hasUnicodeCaseSensitive" (fun _ -> Lwt.return ()) +Remote.registerRootCmd "_unicodeCaseSensitive_" (fun _ -> Lwt.return ()) let supportUnicodeCaseSensitive () = if Uutil.myMajorVersion > "2.40" (* The test is correct until 2.99... *) then Lwt.return true else begin Globals.allRootsMap - (fun r -> Remote.commandAvailable r "hasUnicodeCaseSensitive") + (fun r -> Remote.commandAvailable r "_unicodeCaseSensitive_") >>= fun l -> Lwt.return (List.for_all (fun x -> x) l) end Modified: branches/2.40/src/unicode.ml =================================================================== --- branches/2.40/src/unicode.ml 2010-05-07 14:53:11 UTC (rev 446) +++ branches/2.40/src/unicode.ml 2010-05-20 09:08:30 UTC (rev 447) @@ -1067,7 +1067,7 @@ let v = compare c c' in if v <> 0 then v else compare_cs_rec s s' (i + 1) l end else - compare s s' + compare (decompose s) (decompose s') end let case_sensitive_compare s s' = From vouillon at seas.upenn.edu Thu May 20 05:09:24 2010 From: vouillon at seas.upenn.edu (vouillon@seas.upenn.edu) Date: Thu, 20 May 2010 05:09:24 -0400 Subject: [Unison-hackers] [unison-svn] r448 - trunk/src Message-ID: <201005200909.o4K99OMj016147@yaws.seas.upenn.edu> Author: vouillon Date: 2010-05-20 05:09:24 -0400 (Thu, 20 May 2010) New Revision: 448 Modified: trunk/src/RECENTNEWS trunk/src/mkProjectInfo.ml trunk/src/uicommon.ml trunk/src/unicode.ml Log: * One more fix to Unicode case sensitive mode Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2010-05-20 09:08:30 UTC (rev 447) +++ trunk/src/RECENTNEWS 2010-05-20 09:09:24 UTC (rev 448) @@ -1,5 +1,10 @@ CHANGES FROM VERSION 2.40.16 +* One more fix to Unicode case sensitive mode + +------------------------------- +CHANGES FROM VERSION 2.40.16 + Lines added in profile files by unison always start at a new line ------------------------------- Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2010-05-20 09:08:30 UTC (rev 447) +++ trunk/src/mkProjectInfo.ml 2010-05-20 09:09:24 UTC (rev 448) @@ -117,3 +117,4 @@ + Modified: trunk/src/uicommon.ml =================================================================== --- trunk/src/uicommon.ml 2010-05-20 09:08:30 UTC (rev 447) +++ trunk/src/uicommon.ml 2010-05-20 09:09:24 UTC (rev 448) @@ -435,13 +435,15 @@ (* ---- *) (*FIX: remove when Unison version > 2.40 *) -let _ = Remote.registerRootCmd "unicodeCaseSensitive" (fun _ -> Lwt.return ()) +let _ = +Remote.registerRootCmd "_unicodeCaseSensitive_" (fun _ -> Lwt.return ()) let supportUnicodeCaseSensitive () = if Uutil.myMajorVersion > "2.40" (* The test is correct until 2.99... *) then Lwt.return true else begin Globals.allRootsMap - (fun r -> Remote.commandAvailable r "unicodeCaseSensitive") >>= fun l -> + (fun r -> Remote.commandAvailable r "_unicodeCaseSensitive_") + >>= fun l -> Lwt.return (List.for_all (fun x -> x) l) end Modified: trunk/src/unicode.ml =================================================================== --- trunk/src/unicode.ml 2010-05-20 09:08:30 UTC (rev 447) +++ trunk/src/unicode.ml 2010-05-20 09:09:24 UTC (rev 448) @@ -1067,7 +1067,7 @@ let v = compare c c' in if v <> 0 then v else compare_cs_rec s s' (i + 1) l end else - compare s s' + compare (decompose s) (decompose s') end let case_sensitive_compare s s' = From bcpierce at seas.upenn.edu Thu May 27 23:15:14 2010 From: bcpierce at seas.upenn.edu (bcpierce@seas.upenn.edu) Date: Thu, 27 May 2010 23:15:14 -0400 Subject: [Unison-hackers] [unison-svn] r449 - in trunk/src: . lwt system ubase Message-ID: <201005280315.o4S3FFCF026299@yaws.seas.upenn.edu> Author: bcpierce Date: 2010-05-27 23:15:14 -0400 (Thu, 27 May 2010) New Revision: 449 Modified: trunk/src/Makefile trunk/src/RECENTNEWS trunk/src/abort.ml trunk/src/bytearray.ml trunk/src/bytearray.mli trunk/src/bytearray_stubs.c trunk/src/case.ml trunk/src/case.mli trunk/src/checksum.ml trunk/src/checksum.mli trunk/src/clroot.ml trunk/src/clroot.mli trunk/src/common.ml trunk/src/common.mli trunk/src/copy.ml trunk/src/external.ml trunk/src/external.mli trunk/src/fileinfo.ml trunk/src/fileinfo.mli trunk/src/files.ml trunk/src/files.mli trunk/src/fileutil.ml trunk/src/fileutil.mli trunk/src/fingerprint.ml trunk/src/fingerprint.mli trunk/src/fs.ml trunk/src/fs.mli trunk/src/fspath.ml trunk/src/fspath.mli trunk/src/globals.ml trunk/src/globals.mli trunk/src/linkgtk.ml trunk/src/linkgtk2.ml trunk/src/linktext.ml trunk/src/lock.ml trunk/src/lock.mli trunk/src/lwt/pqueue.ml trunk/src/lwt/pqueue.mli trunk/src/main.ml trunk/src/mkProjectInfo.ml trunk/src/name.ml trunk/src/name.mli trunk/src/os.ml trunk/src/os.mli trunk/src/osx.ml trunk/src/osx.mli trunk/src/path.ml trunk/src/path.mli trunk/src/pixmaps.ml trunk/src/pred.ml trunk/src/pred.mli trunk/src/props.ml trunk/src/props.mli trunk/src/recon.ml trunk/src/recon.mli trunk/src/remote.ml trunk/src/remote.mli trunk/src/sortri.ml trunk/src/sortri.mli trunk/src/stasher.ml trunk/src/strings.mli trunk/src/system.ml trunk/src/system.mli trunk/src/system/system_generic.ml trunk/src/system/system_intf.ml trunk/src/system/system_win.ml trunk/src/terminal.ml trunk/src/test.ml trunk/src/test.mli trunk/src/transfer.ml trunk/src/transfer.mli trunk/src/transport.ml trunk/src/transport.mli trunk/src/tree.ml trunk/src/tree.mli trunk/src/ubase/proplist.ml trunk/src/ubase/proplist.mli trunk/src/ubase/rx.ml trunk/src/ubase/rx.mli trunk/src/ubase/safelist.ml trunk/src/ubase/safelist.mli trunk/src/ubase/trace.ml trunk/src/ubase/trace.mli trunk/src/ubase/uarg.ml trunk/src/ubase/util.ml trunk/src/ubase/util.mli trunk/src/ui.mli trunk/src/uicommon.ml trunk/src/uicommon.mli trunk/src/uigtk2.ml trunk/src/uigtk2.mli trunk/src/uitext.ml trunk/src/uitext.mli trunk/src/unicode.ml trunk/src/unicode.mli trunk/src/update.ml trunk/src/update.mli trunk/src/uutil.ml trunk/src/uutil.mli trunk/src/xferhint.ml trunk/src/xferhint.mli Log: * Progress on filesystem watching (see uitext.ml) * Update copyright dates, while I'm thinking about it :-) Modified: trunk/src/Makefile =================================================================== --- trunk/src/Makefile 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/Makefile 2010-05-28 03:15:14 UTC (rev 449) @@ -210,8 +210,8 @@ # For developers runtest: - $(MAKE) all NATIVE=false DEBUG=true - ./unison test + $(MAKE) NATIVE=false DEBUG=true text + bash ./unison test repeattest: $(MAKE) all NATIVE=false DEBUG=true UISTYLE=text Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/RECENTNEWS 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,27 @@ CHANGES FROM VERSION 2.40.16 +* Progress on filesystem watching (see uitext.ml) + +* Update copyright dates, while I'm thinking about it :-) + + + + + +------------------------------- +CHANGES FROM VERSION 2.40.16 + +* Progress on filesystem watching (see uitext.ml) + +* Update copyright dates, while I'm thinking about it :-) + + + + + +------------------------------- +CHANGES FROM VERSION 2.40.16 + * One more fix to Unicode case sensitive mode ------------------------------- Modified: trunk/src/abort.ml =================================================================== --- trunk/src/abort.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/abort.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/abort.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/bytearray.ml =================================================================== --- trunk/src/bytearray.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/bytearray.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/bytearray.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/bytearray.mli =================================================================== --- trunk/src/bytearray.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/bytearray.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/bytearray.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) type t = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t Modified: trunk/src/bytearray_stubs.c =================================================================== --- trunk/src/bytearray_stubs.c 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/bytearray_stubs.c 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ /* Unison file synchronizer: src/bytearray_stubs.c */ -/* Copyright 1999-2009 (see COPYING for details) */ +/* Copyright 1999-2010 (see COPYING for details) */ #include Modified: trunk/src/case.ml =================================================================== --- trunk/src/case.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/case.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/case.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/case.mli =================================================================== --- trunk/src/case.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/case.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/case.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) val caseInsensitiveMode : [`True|`False|`Default] Prefs.t val unicodeEncoding : bool Prefs.t Modified: trunk/src/checksum.ml =================================================================== --- trunk/src/checksum.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/checksum.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/checksum.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/checksum.mli =================================================================== --- trunk/src/checksum.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/checksum.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/checksum.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) type t = int type u = int array Modified: trunk/src/clroot.ml =================================================================== --- trunk/src/clroot.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/clroot.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/clroot.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/clroot.mli =================================================================== --- trunk/src/clroot.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/clroot.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/clroot.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* Command-line roots *) type clroot = Modified: trunk/src/common.ml =================================================================== --- trunk/src/common.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/common.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/common.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/common.mli =================================================================== --- trunk/src/common.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/common.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/common.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (***************************************************************************) (* COMMON TYPES USED BY ALL MODULES *) Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/copy.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/copy.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/external.ml =================================================================== --- trunk/src/external.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/external.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/external.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/external.mli =================================================================== --- trunk/src/external.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/external.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/external.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) val runExternalProgram : string -> (Unix.process_status * string) Lwt.t val readChannelTillEof : in_channel -> string Modified: trunk/src/fileinfo.ml =================================================================== --- trunk/src/fileinfo.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/fileinfo.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fileinfo.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/fileinfo.mli =================================================================== --- trunk/src/fileinfo.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/fileinfo.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fileinfo.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) type typ = [`ABSENT | `FILE | `DIRECTORY | `SYMLINK] val type2string : typ -> string Modified: trunk/src/files.ml =================================================================== --- trunk/src/files.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/files.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/files.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/files.mli =================================================================== --- trunk/src/files.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/files.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/files.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* As usual, these functions should only be called by the client (i.e., in *) (* the same address space as the user interface). *) Modified: trunk/src/fileutil.ml =================================================================== --- trunk/src/fileutil.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/fileutil.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fileutil.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/fileutil.mli =================================================================== --- trunk/src/fileutil.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/fileutil.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fileutil.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* Convert backslashes in a string to forward slashes. Useful in Windows. *) val backslashes2forwardslashes : string -> string Modified: trunk/src/fingerprint.ml =================================================================== --- trunk/src/fingerprint.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/fingerprint.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fingerprint.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/fingerprint.mli =================================================================== --- trunk/src/fingerprint.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/fingerprint.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fingerprint.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) type t Modified: trunk/src/fs.ml =================================================================== --- trunk/src/fs.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/fs.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fs.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/fs.mli =================================================================== --- trunk/src/fs.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/fs.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fs.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* Operations on fspaths *) Modified: trunk/src/fspath.ml =================================================================== --- trunk/src/fspath.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/fspath.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/fspath.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/fspath.mli =================================================================== --- trunk/src/fspath.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/fspath.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,7 +1,7 @@ (* Unison file synchronizer: src/fspath.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) -(* Defines an abstract type of absolute filenames (fspaths) *) +(* Defines an abstract type of absolute filenames (fspaths) *) type t Modified: trunk/src/globals.ml =================================================================== --- trunk/src/globals.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/globals.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/globals.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/globals.mli =================================================================== --- trunk/src/globals.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/globals.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/globals.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* Global variables and functions needed by top-level modules and user *) (* interfaces *) Modified: trunk/src/linkgtk.ml =================================================================== --- trunk/src/linkgtk.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/linkgtk.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/linkgtk.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/linkgtk2.ml =================================================================== --- trunk/src/linkgtk2.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/linkgtk2.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/linkgtk2.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/linktext.ml =================================================================== --- trunk/src/linktext.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/linktext.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/linktext.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/lock.ml =================================================================== --- trunk/src/lock.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/lock.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/lock.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/lock.mli =================================================================== --- trunk/src/lock.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/lock.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/lock.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* A simple utility module for setting and releasing inter-process locks using entries in the filesystem. *) Modified: trunk/src/lwt/pqueue.ml =================================================================== --- trunk/src/lwt/pqueue.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/lwt/pqueue.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/lwt/pqueue.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/lwt/pqueue.mli =================================================================== --- trunk/src/lwt/pqueue.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/lwt/pqueue.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/lwt/pqueue.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) module type OrderedType = sig Modified: trunk/src/main.ml =================================================================== --- trunk/src/main.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/main.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/main.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/mkProjectInfo.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -97,24 +97,3 @@ Printf.printf "VERSION=%d.%d.%d\n" majorVersion minorVersion pointVersion;; Printf.printf "NAME=%s\n" projectName;; - - - - - - - - - - - - - - - - - - - - - Modified: trunk/src/name.ml =================================================================== --- trunk/src/name.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/name.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/name.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/name.mli =================================================================== --- trunk/src/name.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/name.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/name.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) type t Modified: trunk/src/os.ml =================================================================== --- trunk/src/os.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/os.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/os.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/os.mli =================================================================== --- trunk/src/os.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/os.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/os.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) val myCanonicalHostName : string Modified: trunk/src/osx.ml =================================================================== --- trunk/src/osx.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/osx.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/osx.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/osx.mli =================================================================== --- trunk/src/osx.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/osx.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/osx.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) val init : bool -> unit val isMacOSX : bool Modified: trunk/src/path.ml =================================================================== --- trunk/src/path.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/path.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/path.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/path.mli =================================================================== --- trunk/src/path.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/path.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/path.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* Abstract type of relative pathnames *) type 'a path Modified: trunk/src/pixmaps.ml =================================================================== --- trunk/src/pixmaps.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/pixmaps.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/pixmaps.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/pred.ml =================================================================== --- trunk/src/pred.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/pred.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/pred.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/pred.mli =================================================================== --- trunk/src/pred.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/pred.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/pred.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* Predicates over paths. Modified: trunk/src/props.ml =================================================================== --- trunk/src/props.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/props.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/props.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/props.mli =================================================================== --- trunk/src/props.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/props.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/props.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* File properties: time, permission, length, etc. *) Modified: trunk/src/recon.ml =================================================================== --- trunk/src/recon.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/recon.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/recon.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/recon.mli =================================================================== --- trunk/src/recon.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/recon.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/recon.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) val reconcileAll : ?allowPartial:bool (* whether we allow partial synchronization Modified: trunk/src/remote.ml =================================================================== --- trunk/src/remote.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/remote.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/remote.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/remote.mli =================================================================== --- trunk/src/remote.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/remote.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/remote.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) module Thread : sig val unwindProtect : (unit -> 'a Lwt.t) -> (exn -> unit Lwt.t) -> 'a Lwt.t Modified: trunk/src/sortri.ml =================================================================== --- trunk/src/sortri.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/sortri.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/sortri.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/sortri.mli =================================================================== --- trunk/src/sortri.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/sortri.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/sortri.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* Sort a list of recon items according to the current setting of various preferences (defined in sort.ml, and accessible from the Modified: trunk/src/stasher.ml =================================================================== --- trunk/src/stasher.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/stasher.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,6 +1,6 @@ (* Unison file synchronizer: src/stasher.ml *) (* $I2: Last modified by lescuyer *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/strings.mli =================================================================== --- trunk/src/strings.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/strings.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,4 +1,4 @@ (* Unison file synchronizer: src/strings.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) val docs : (string * (string * string)) list Modified: trunk/src/system/system_generic.ml =================================================================== --- trunk/src/system/system_generic.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/system/system_generic.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/system/system_generic.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/system/system_intf.ml =================================================================== --- trunk/src/system/system_intf.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/system/system_intf.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/system/system_intf.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/system/system_win.ml =================================================================== --- trunk/src/system/system_win.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/system/system_win.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/system/system_win.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/system.ml =================================================================== --- trunk/src/system.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/system.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/system.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/system.mli =================================================================== --- trunk/src/system.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/system.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/system.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* Operations on filesystem path *) Modified: trunk/src/terminal.ml =================================================================== --- trunk/src/terminal.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/terminal.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/terminal.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/test.ml =================================================================== --- trunk/src/test.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/test.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/test.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/test.mli =================================================================== --- trunk/src/test.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/test.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/test.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* Internal self-tests *) Modified: trunk/src/transfer.ml =================================================================== --- trunk/src/transfer.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/transfer.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/transfer.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/transfer.mli =================================================================== --- trunk/src/transfer.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/transfer.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/transfer.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* Rsync : general algorithm description Modified: trunk/src/transport.ml =================================================================== --- trunk/src/transport.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/transport.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/transport.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/transport.mli =================================================================== --- trunk/src/transport.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/transport.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/transport.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* Executes the actions implied by the reconItem list. *) val transportItem : Modified: trunk/src/tree.ml =================================================================== --- trunk/src/tree.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/tree.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/tree.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/tree.mli =================================================================== --- trunk/src/tree.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/tree.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/tree.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* An ('a, 'b) t is a tree with 'a-labeled arcs and 'b-labeled nodes. *) (* Labeling for the internal nodes is optional *) Modified: trunk/src/ubase/proplist.ml =================================================================== --- trunk/src/ubase/proplist.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/ubase/proplist.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/proplist.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/ubase/proplist.mli =================================================================== --- trunk/src/ubase/proplist.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/ubase/proplist.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/proplist.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) type 'a key type t Modified: trunk/src/ubase/rx.ml =================================================================== --- trunk/src/ubase/rx.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/ubase/rx.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/rx.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/ubase/rx.mli =================================================================== --- trunk/src/ubase/rx.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/ubase/rx.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/rx.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) type t Modified: trunk/src/ubase/safelist.ml =================================================================== --- trunk/src/ubase/safelist.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/ubase/safelist.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/safelist.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/ubase/safelist.mli =================================================================== --- trunk/src/ubase/safelist.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/ubase/safelist.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/safelist.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* All functions here are tail recursive and will work for arbitrary sized lists (unlike some of the standard ones). The intention is that Modified: trunk/src/ubase/trace.ml =================================================================== --- trunk/src/ubase/trace.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/ubase/trace.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/trace.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/ubase/trace.mli =================================================================== --- trunk/src/ubase/trace.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/ubase/trace.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/trace.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* ---------------------------------------------------------------------- *) (* Debugging support *) Modified: trunk/src/ubase/uarg.ml =================================================================== --- trunk/src/ubase/uarg.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/ubase/uarg.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/uarg.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* by Xavier Leroy, projet Cristal, INRIA Rocquencourt *) (* Slightly modified by BCP, July 1999 *) Modified: trunk/src/ubase/util.ml =================================================================== --- trunk/src/ubase/util.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/ubase/util.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/util.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/ubase/util.mli =================================================================== --- trunk/src/ubase/util.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/ubase/util.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ubase/util.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* Miscellaneous utility functions and datatypes *) Modified: trunk/src/ui.mli =================================================================== --- trunk/src/ui.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/ui.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/ui.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* The module Ui provides only the user interface signature. Implementations are provided by Uitext and Uitk. *) Modified: trunk/src/uicommon.ml =================================================================== --- trunk/src/uicommon.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/uicommon.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uicommon.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/uicommon.mli =================================================================== --- trunk/src/uicommon.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/uicommon.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uicommon.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* Kinds of UI *) type interface = Modified: trunk/src/uigtk2.ml =================================================================== --- trunk/src/uigtk2.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/uigtk2.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uigtk2.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/uigtk2.mli =================================================================== --- trunk/src/uigtk2.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/uigtk2.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,4 +1,4 @@ (* Unison file synchronizer: src/uigtk2.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) module Body : Uicommon.UI Modified: trunk/src/uitext.ml =================================================================== --- trunk/src/uitext.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/uitext.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uitext.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,7 +15,6 @@ along with this program. If not, see . *) - open Common open Lwt @@ -697,65 +696,109 @@ (exitStatus, failedPaths) end -let watchinterval = 10 +(* ----------------- Filesystem watching mode ---------------- *) +(* FIX: we should check that the child process has not died and restart it if so... *) + +let watchinterval = 5 + +let watcherTemp r n = + let s = n ^ (Update.archiveHash (Fspath.canonize (Some r))) in + Os.fileInUnisonDir s + (* Fspath.toSysPath + (Fspath.concat r (Os.tempPath r (Path.child Path.empty (Name.fromString s)))) *) + +let watchercmd r = + (* FIX: need to include --follow and path parameters *) + (* FIX -- need to find the program using watcherosx preference *) + let root = Common.root2string r in + let changefile = watcherTemp root "changes" in + let statefile = watcherTemp root "state" in + let cmd = Printf.sprintf "fsmonitor.py --outfile %s --statefile %s %s\n" + (System.fspathToPrintString changefile) + (System.fspathToPrintString statefile) + root in + debug (fun() -> Util.msg "change command: %s\n" cmd); + (changefile,cmd) + +module RootMap = Map.Make (struct type t = Common.root let compare = Pervasives.compare end) +type watcherinfo = {file: System.fspath; + ch:Pervasives.in_channel option ref; + chars: string ref; + lines: string list ref} +let watchers : watcherinfo RootMap.t ref = ref RootMap.empty + (* FIX; Using string concatenation to accumulate characters is pretty inefficient! *) -let charsRead = ref "" -let linesRead = ref [] -let watcherchan = ref None +let getAvailableLinesFromWatcher wi = + let ch = match !(wi.ch) with Some(c) -> c | None -> assert false in + let rec loop () = + match try Some(input_char ch) with End_of_file -> None with + None -> + let res = !(wi.lines) in + wi.lines := []; + res + | Some(c) -> + if c = '\n' then begin + wi.lines := !(wi.chars) :: !(wi.lines); + wi.chars := ""; + loop () + end else begin + wi.chars := (!(wi.chars)) ^ (String.make 1 c); + loop () + end in + loop () -let suckOnWatcherFileLocal n = +let suckOnWatcherFileLocal r = Util.convertUnixErrorsToFatal - ("Reading changes from watcher process in file " ^ - System.fspathToPrintString n) + "Reading changes from watcher process " (fun () -> - (* The main loop, invoked from two places below *) - let rec loop ch = - match try Some(input_char ch) with End_of_file -> None with - None -> - let res = !linesRead in - linesRead := []; - res - | Some(c) -> - if c = '\n' then begin - linesRead := !charsRead - :: !linesRead; - charsRead := ""; - loop ch - end else begin - charsRead := (!charsRead) ^ (String.make 1 c); - loop ch - end in - (* Make sure there's a file to watch, then read from it *) - match !watcherchan with - None -> - if System.file_exists n then begin - let ch = System.open_in_bin n in - watcherchan := Some(ch); - loop ch - end else [] - | Some(ch) -> loop ch - ) + (* Make sure there's a watcher running *) + try + let wi = RootMap.find r !watchers in + if !(wi.ch) = None then + (* Watcher channel not built yet *) + if System.file_exists wi.file then begin + (* Build it and go *) + let c = System.open_in_bin wi.file in + wi.ch := Some(c); + getAvailableLinesFromWatcher wi + end else begin + (* Wait for change file to be built *) + debug (fun() -> Util.msg + "Waiting for change file %s\n" (System.fspathToPrintString wi.file)); + [] + end + else + (* Watcher running and channel built: go ahead and read *) + getAvailableLinesFromWatcher wi + with Not_found -> begin + (* Watcher process not running *) + let (changefile,cmd) = watchercmd r in + debug (fun() -> Util.msg "Starting watcher on root %s\n" (Common.root2string r)); + let _ = System.open_process_in cmd in + let wi = {file = changefile; ch = ref None; lines = ref []; chars = ref ""} in + watchers := RootMap.add r wi !watchers; + [] + end) -let suckOnWatcherFileRoot: Common.root -> System.fspath -> (string list) Lwt.t = +let suckOnWatcherFileRoot: Common.root -> Common.root -> (string list) Lwt.t = Remote.registerRootCmd "suckOnWatcherFile" - (fun (fspath, n) -> - Lwt.return (suckOnWatcherFileLocal n)) + (fun (fspath, r) -> + Lwt.return (suckOnWatcherFileLocal r)) -let suckOnWatcherFiles n = +let suckOnWatcherFiles () = Safelist.concat (Lwt_unix.run ( - Globals.allRootsMap (fun r -> suckOnWatcherFileRoot r n))) + Globals.allRootsMap (fun r -> suckOnWatcherFileRoot r r))) let synchronizePathsFromFilesystemWatcher () = - let watcherfilename = System.fspathFromString "" in - (* STOPPED HERE -- need to find the program using watcherosx preference - and invoke it (on both hosts, if there are two!) using a redirect to - get the output into a temp file... *) + (* Make sure the confirmbigdeletes preference is turned off. If it's on, then + deletions will fail because every deletion is a "big deletion"! *) + Prefs.set Globals.confirmBigDeletes false; let rec loop failedPaths = - let newpaths = suckOnWatcherFiles watcherfilename in + let newpaths = suckOnWatcherFiles () in if newpaths <> [] then display (Printf.sprintf "Changed paths:\n %s\n" (String.concat "\n " newpaths)); @@ -774,6 +817,8 @@ end in loop [] +(* ----------------- Repetition ---------------- *) + let synchronizeUntilNoFailures () = let initValueOfPathsPreference = Prefs.read Globals.paths in let rec loop triesLeft = @@ -809,6 +854,8 @@ synchronizeUntilDone () end +(* ----------------- Startup ---------------- *) + let start interface = if interface <> Uicommon.Text then Util.msg "This Unison binary only provides the text GUI...\n"; Modified: trunk/src/uitext.mli =================================================================== --- trunk/src/uitext.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/uitext.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,4 +1,4 @@ (* Unison file synchronizer: src/uitext.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) module Body : Uicommon.UI Modified: trunk/src/unicode.ml =================================================================== --- trunk/src/unicode.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/unicode.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/unicode.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/unicode.mli =================================================================== --- trunk/src/unicode.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/unicode.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/unicode.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) exception Invalid Modified: trunk/src/update.ml =================================================================== --- trunk/src/update.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/update.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/update.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/update.mli =================================================================== --- trunk/src/update.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/update.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/update.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) module NameMap : Map.S with type key = Name.t @@ -77,3 +77,8 @@ (* (For breaking the dependency loop between update.ml and stasher.ml...) *) val setStasherFun : (Fspath.t -> Path.local -> unit) -> unit + +(* Conjoin the canonical name of the current host and the canonical + presentation of the current fspath with the list of names/fspaths of + all the roots and the current archive format *) +val archiveHash : Fspath.t -> string Modified: trunk/src/uutil.ml =================================================================== --- trunk/src/uutil.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/uutil.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uutil.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/uutil.mli =================================================================== --- trunk/src/uutil.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/uutil.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/uutil.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* This module collects a number of low-level, Unison-specific utility functions. It is kept separate from the Util module so that that module Modified: trunk/src/xferhint.ml =================================================================== --- trunk/src/xferhint.ml 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/xferhint.ml 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/xferhint.ml *) -(* Copyright 1999-2009, Benjamin C. Pierce +(* Copyright 1999-2010, Benjamin C. Pierce This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/xferhint.mli =================================================================== --- trunk/src/xferhint.mli 2010-05-20 09:09:24 UTC (rev 448) +++ trunk/src/xferhint.mli 2010-05-28 03:15:14 UTC (rev 449) @@ -1,5 +1,5 @@ (* Unison file synchronizer: src/xferhint.mli *) -(* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *) +(* Copyright 1999-2010, Benjamin C. Pierce (see COPYING for details) *) (* This module maintains a cache that can be used to map an Os.fingerprint to a (Fspath.t * Path.t) naming a file that *may* From daniel.blueman at gmail.com Fri May 28 10:13:40 2010 From: daniel.blueman at gmail.com (Daniel J Blueman) Date: Fri, 28 May 2010 15:13:40 +0100 Subject: [Unison-hackers] [patch] high system time with BTRFS and compression... In-Reply-To: References: Message-ID: With unison 2.27.57 on Linux (Ubuntu 10.04 x86-64, client and server), performing synchronisation with a BTRFS filesystem with compression enabled takes higher system time, due to many threads performing smaller (~4K) synchronous reads. Increasing the buffer size to 64K helps alleviate this, and will provide a smaller win on other filesystems. Also, on faster networks with larger MTU, 64K read/write to the socket provides more throughput. Please consider and thanks, ?Daniel diff -ur unison-2.27.57/remote.ml unison-2.27.57-new/remote.ml --- unison-2.27.57/remote.ml ? ?2008-01-18 13:53:35.000000000 +0000 +++ unison-2.27.57-new/remote.ml ? ? ? ?2010-05-26 12:49:00.146269467 +0100 @@ -79,7 +79,7 @@ ?let receivedBytes = ref 0. ?let emittedBytes = ref 0. -let inputBuffer_size = 8192 +let inputBuffer_size = 65536 ?let fill_inputBuffer conn = ? assert (conn.inputLength = 0); @@ -127,7 +127,7 @@ ?(****) -let outputBuffer_size = 8192 +let outputBuffer_size = 65536 ?let rec send_output conn = ? catch_io_errors diff -ur unison-2.27.57/transfer.ml unison-2.27.57-new/transfer.ml --- unison-2.27.57/transfer.ml ?2007-04-02 04:03:20.000000000 +0100 +++ unison-2.27.57-new/transfer.ml ? ? ?2010-05-26 12:51:12.676894227 +0100 @@ -234,8 +234,8 @@ ?let send infd length showProgress transmit = ? debug (fun() -> Util.msg "sending file\n"); ? let timer = Trace.startTimer "Sending file using generic transmission" in - ?let bufSz = 8192 in - ?let bufSzFS = Uutil.Filesize.ofInt 8192 in + ?let bufSz = 65536 in + ?let bufSzFS = Uutil.Filesize.ofInt 65536 in ? let buf = String.create bufSz in ? let q = makeQueue length in ? let rec sendSlice length = @@ -298,14 +298,14 @@ ? (*** PREPROCESS ***) ? (* Preprocess buffer size *) - ?let preproBufSize = 8192 + ?let preproBufSize = 65536 ? (* Incrementally build arg by executing f on successive blocks (of size ? ? ?'blockSize') of the input stream (pointed by 'infd'). ? ? ?The procedure uses a buffer of size 'bufferSize' to load the input, ? ? ?and eventually handles the buffer update. *) ? let blockIter infd f arg maxCount = - ? ?let bufferSize = 8192 + blockSize in + ? ?let bufferSize = 65536 + blockSize in ? ? let buffer = String.create bufferSize in ? ? let rec iter count arg offset length = ? ? ? if count = maxCount then arg else begin @@ -363,7 +363,7 @@ ? (*** DECOMPRESSION ***) ? (* Decompression buffer size *) - ?let decomprBufSize = 8192 + ?let decomprBufSize = 65536 ? (* For each transfer instruction, either output a string or copy one or ? ? ?several blocks from the old file. *) @@ -517,8 +517,8 @@ ? (* Compression buffer size *) ? (* MUST be >= 2 * blockSize *) - ?let comprBufSize = 8192 - ?let comprBufSizeFS = Uutil.Filesize.ofInt 8192 + ?let comprBufSize = 65536 + ?let comprBufSizeFS = Uutil.Filesize.ofInt 65536 ? (* Compress the file using the algorithm described in the header *) ? let rsyncCompress sigs infd srcLength showProgress transmit = -- Daniel J Blueman From bcpierce at seas.upenn.edu Sun May 30 10:03:34 2010 From: bcpierce at seas.upenn.edu (bcpierce@seas.upenn.edu) Date: Sun, 30 May 2010 10:03:34 -0400 Subject: [Unison-hackers] [unison-svn] r450 - trunk/src Message-ID: <201005301403.o4UE3Y3Z025529@yaws.seas.upenn.edu> Author: bcpierce Date: 2010-05-30 10:03:33 -0400 (Sun, 30 May 2010) New Revision: 450 Added: trunk/src/fsmonitor.py Modified: trunk/src/README trunk/src/RECENTNEWS trunk/src/mkProjectInfo.ml trunk/src/uitext.ml Log: * More progress on file watching * Add external fsmonitor.py script to svn repo * If you want to play with the filewatching functionality, here's what you do: - add fsmonitor.py to your search path (or make a symlink to it from somewhere on your search path) on both machines that you're going to synchronize - recompile the text ui ('make text') on both machines - start unison with "-repeat watch" on the command line Modified: trunk/src/README =================================================================== --- trunk/src/README 2010-05-28 03:15:14 UTC (rev 449) +++ trunk/src/README 2010-05-30 14:03:33 UTC (rev 450) @@ -4,7 +4,7 @@ This directory is the source distribution for the unison file synchronizer. -Installation instructions are in the file INSTALL. +Installation instructions are in the file INSTALLATION section of the user manual. License and copying information can be found in the file COPYING Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2010-05-28 03:15:14 UTC (rev 449) +++ trunk/src/RECENTNEWS 2010-05-30 14:03:33 UTC (rev 450) @@ -1,5 +1,20 @@ CHANGES FROM VERSION 2.40.16 +* More progress on file watching +* Add external fsmonitor.py script to svn repo + +* If you want to play with the filewatching functionality, here's + what you do: + - add fsmonitor.py to your search path (or make a symlink to + it from somewhere on your search path) on both machines that + you're going to synchronize + - recompile the text ui ('make text') on both machines + - start unison with "-repeat watch" on the command line + + +------------------------------- +CHANGES FROM VERSION 2.40.16 + * Progress on filesystem watching (see uitext.ml) * Update copyright dates, while I'm thinking about it :-) Added: trunk/src/fsmonitor.py =================================================================== --- trunk/src/fsmonitor.py (rev 0) +++ trunk/src/fsmonitor.py 2010-05-30 14:03:33 UTC (rev 450) @@ -0,0 +1,565 @@ +#!/usr/bin/python + +# a small program to test the possibilities to monitor the file system and +# log changes on Windowsm Linux, and OSX +# +# Originally written by Christoph Gohle (2010) +# Modified by Gene Horodecki for Windows +# Further modified by Benjamin Pierce +# should be distributed under GPL + +import sys +import os +import stat +from optparse import OptionParser +from time import time + +def mydebug(fmt, *args, **kwds): + if not op.debug: + return + + if args: + fmt = fmt % args + + elif kwds: + fmt = fmt % kwds + + print >>sys.stderr, fmt + +def mymesg(fmt, *args, **kwds): + if not op.verbose: + return + + if args: + fmt = fmt % args + + elif kwds: + fmt = fmt % kwds + + print >>sys.stdout, fmt + +def timer_callback(timer, streamRef): + mydebug("CFAbsoluteTimeGetCurrent() => %.3f", CFAbsoluteTimeGetCurrent()) + mydebug("FSEventStreamFlushAsync(streamRef = %s)", streamRef) + FSEventStreamFlushAsync(streamRef) + +def update_changes(result): + mydebug('Update_changes: absresult = %s',result) + #print('absresult',result) + result = [mangle_filename(path) for path in result] + mydebug('Update_changes: mangled = %s',result) + #print('magnled', result) + result = [relpath(op.root,path) for path in result] + #print('relative to root',result) + mydebug('Update_changes: relative to root = %s',result) + + try: + f = open(op.absoutfile,'a') + for path in result: + f.write(path+'\n') + f.close() + except IOError: + mymesg('failed to open log file %s for writing',op.outfile) + +def update_changes_nomangle(result): + # In win32 there are no symlinks, therefore file mangling + # is not required + + mydebug('Changed paths: %s\n',result) + try: + f = open(op.absoutfile,'a') + f.write(result+'\n') + f.close() + except IOError: + mymesg('failed to open log file %s for writing',op.outfile) + +def mangle_filename(path): + """because the FSEvents system returns 'real' paths we have to figure out +if they have been aliased by a symlink and a 'follow' directive in the unison +configuration or from the command line. +This is done here for path. The return value is the path name using symlinks +""" + try: + op.symlinks + except AttributeError: + #lets create a dictionary of symlinks that are treated transparently here + op.symlinks = {} + fl = op.follow + try: + foll = [f.split(' ',1) for f in fl] + except TypeError: + foll = [] + for k,v in foll: + if not k=='Path': + mymesg('We don\'t support anything but path specifications in follow directives. Especially not %s',k) + else: + p = v.strip('{}') + op.symlinks[os.path.realpath(os.path.join(op.root,p))]=p + + #now lets do it + result = path + for key in op.symlinks: + #print path, key + if path.startswith(key): + result = os.path.join(op.root,op.symlinks[key]+path[len(key):]) + #print 'Match!', result + + return result + + +def relpath(root,path): + """returns the path relative to root (which should be absolute) + if it is not a path below root or if root is not absolute it returns None + """ + + if not os.path.isabs(root): + return None + + abspath = os.path.abspath(path) + mydebug('relpath: abspath(%s) = %s', path, abspath) + + #make sure the root and abspath both end with a '/' + if not root[-1]=='/': + root += '/' + if not abspath[-1]=='/': + abspath += '/' + + mydebug('relpath: root = %s', root) + + #print root, abspath + if not abspath[:len(root)]==root: + #print abspath[:len(root)], root + return None + + return abspath[len(root):] + +def my_abspath(path): + """expand path including shell variables and homedir +to the absolute path +""" + return os.path.abspath(os.path.expanduser(os.path.expandvars(path))) + +def conf_parser(conffilepath, delimiter = '=', dic = {}): + """parse the unison configuration file at conffilename and populate a dictionary +with configuration options from there. If dic is a dictionary, these options are added to this +one (can be used to recursively call this function for include statements).""" + try: + conffile = open(conffilepath,'r') + except IOError: + mymesg('could not open configuration file at %s',conffilepath) + return None + + res = dic + + for line in conffile: + line = line.strip() + if len(line)<1 or line[0]=='#': + continue + elif line.startswith('include'): + dn = os.path.dirname(conffilepath) + fn = line.split()[1].strip() + conf_parser(os.path.join(dn,fn), dic = res) + else: + k,v=[s.strip() for s in line.split('=',1)] + if res.has_key(k): + res[k].append(v) + else: + res[k]=[v] + return res + +################################################ +# Linux specific code here +################################################ +if sys.platform.startswith('linux'): + import pyinotify + + class HandleEvents(pyinotify.ProcessEvent): + #def process_IN_CREATE(self, event): + # print "Creating:", event.pathname + + #def process_IN_DELETE(self, event): + # print "Removing:", event.pathname + + #def process_IN_MODIFY(self, event): + # print "Modifying:", event.pathname + + # def process_IN_MOVED_TO(self, event): + # print "Moved to:", event.pathname + + # def process_IN_MOVED_FROM(self, event): + # print "Moved from:", event.pathname + + # def process_IN_ATTRIB(self, event): + # print "attributes:", event.pathname + + def process_default(self, event): + print "Default:", event + update_changes([event.pathname]) + + + def linuxwatcher(): + p = HandleEvents() + wm = pyinotify.WatchManager() # Watch Manager + mask = pyinotify.IN_CREATE | pyinotify.IN_DELETE | pyinotify.IN_MODIFY | pyinotify.IN_ATTRIB | pyinotify.IN_MOVED_TO | pyinotify.IN_MOVED_FROM # watched events + + notifier = pyinotify.Notifier(wm, p) + watches = [wm.add_watch(abspath,mask,rec=True) for abspath in op.abspaths] + print op.abspaths, watches + notifier.loop() + +################################################# +# END Linux specific code +################################################# + +################################################# +# MacOsX specific code +################################################# +if sys.platform == 'darwin': + from FSEvents import * + import objc + + def filelevel_approx(path): + """in order to avoid scanning the entire directory including sub + directories by unison, we have to say which files have changed. Because + this is a stupid program it only checks modification times within the + update interval. in case there are no files modified in this interval, + the entire directory is listed. + A deleted file can not be found like this. Therefore also deletes will + trigger a rescan of the directory (including subdirs) + + The impact of rescans could be limited if one could make + unison work nonrecursively. + """ + result = [] + #make a list of all files in question (all files in path w/o dirs) + try: + names = os.listdir(path) + except os.error, msg: + #path does not exist (anymore?). Add it to the results + mydebug("adding nonexisting path %s for sync",path) + result.append(path) + names = None + + if names: + for nm in names: + full_path = os.path.join(path,nm) + st = os.lstat(full_path) + #see if the dir it was modified recently + if st.st_mtime>time()-float(op.latency): + result.append(full_path) + + if result == []: + result.append(path) + + return result + + + def fsevents_callback(streamRef, clientInfo, numEvents, eventPaths, eventMasks, eventIDs): + mydebug("fsevents_callback(streamRef = %s, clientInfo = %s, numEvents = %s)", streamRef, clientInfo, numEvents) + mydebug("fsevents_callback: FSEventStreamGetLatestEventId(streamRef) => %s", FSEventStreamGetLatestEventId(streamRef)) + mydebug("fsevents_callback: eventpaths = %s",eventPaths) + + full_path = clientInfo + + result = [] + for i in range(numEvents): + path = eventPaths[i] + if path[-1] == '/': + path = path[:-1] + + if eventMasks[i] & kFSEventStreamEventFlagMustScanSubDirs: + recursive = True + + elif eventMasks[i] & kFSEventStreamEventFlagUserDropped: + mymesg("BAD NEWS! We dropped events.") + mymesg("Forcing a full rescan.") + recursive = 1 + path = full_path + + elif eventMasks[i] & kFSEventStreamEventFlagKernelDropped: + mymesg("REALLY BAD NEWS! The kernel dropped events.") + mymesg("Forcing a full rescan.") + recursive = 1 + path = full_path + + else: + recursive = False + + #now we should know what to do: build a file directory list + #I assume here, that unison takes a flag for recursive scans + if recursive: + #we have to check all subdirectories + if isinstance(path,list): + #we have to check all base paths + allpathsrecursive = [p + '\tr'] + result.extend(path) + else: + result.append(path+'\tr') + else: + #just add the path + #result.append(path) + #try to find out what has changed + result.extend(filelevel_approx(path)) + + mydebug('Dirs sent: %s',eventPaths) + update_changes(result) + + try: + f = open(op.absstatus,'w') + f.write('last_item = %d'%eventIDs[-1]) + f.close() + except IOError: + mymesg('failed to open status file %s', op.absstatus) + + def my_FSEventStreamCreate(paths): + if op.verbose: + print 'selected paths are: %s'%paths + + if op.sinceWhen == 'now': + op.sinceWhen = kFSEventStreamEventIdSinceNow + + streamRef = FSEventStreamCreate(kCFAllocatorDefault, + fsevents_callback, + paths, #will this pass properly through? yes it does. + paths, + int(op.sinceWhen), + float(op.latency), + int(op.flags)) + if streamRef is None: + print("ERROR: FSEVentStreamCreate() => NULL") + return None + + if op.verbose: + FSEventStreamShow(streamRef) + + #print ('my_FSE', streamRef) + + return streamRef + + def macosxwatcher(): + #since when? if it is 'now' try to read state + if op.sinceWhen == 'now': + dict = conf_parser(op.absstatus) + if dict and dict.has_key('last_item'): + #print dict['last_item'][-1] + op.sinceWhen = dict['last_item'][-1] + #print op.sinceWhen + + streamRef = my_FSEventStreamCreate(op.abspaths) + #print streamRef + if streamRef is None: + print('failed to get a Stream') + exit(1) + + FSEventStreamScheduleWithRunLoop(streamRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode) + + startedOK = FSEventStreamStart(streamRef) + if not startedOK: + print("failed to start the FSEventStream") + exit(1) + + if op.flush_seconds >= 0: + mydebug("CFAbsoluteTimeGetCurrent() => %.3f", CFAbsoluteTimeGetCurrent()) + + timer = CFRunLoopTimerCreate(None, + CFAbsoluteTimeGetCurrent() + float(op.flush_seconds), + float(op.flush_seconds), + 0, 0, timer_callback, streamRef) + CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, kCFRunLoopDefaultMode) + + try: + CFRunLoopRun() + except KeyboardInterrupt: + mydebug('stop called via Keyboard, cleaning up.') + #Stop / Invalidate / Release + FSEventStreamStop(streamRef) + FSEventStreamInvalidate(streamRef) + FSEventStreamRelease(streamRef) + mydebug('FSEventStream closed') + +################################################# +# END MacOsX specific code +################################################# + +################################################# +# Windows specific code +################################################# +if sys.platform == 'win32': + import win32file + import win32con + import threading + + FILE_LIST_DIRECTORY = 0x0001 + + def win32watcherThread(abspath,file_lock): + dirHandle = win32file.CreateFile ( + abspath, + FILE_LIST_DIRECTORY, + win32con.FILE_SHARE_READ | win32con.FILE_SHARE_WRITE, + None, + win32con.OPEN_EXISTING, + win32con.FILE_FLAG_BACKUP_SEMANTICS, + None + ) + while 1: + results = win32file.ReadDirectoryChangesW ( + dirHandle, + 1024, + True, + win32con.FILE_NOTIFY_CHANGE_FILE_NAME | + win32con.FILE_NOTIFY_CHANGE_DIR_NAME | + win32con.FILE_NOTIFY_CHANGE_ATTRIBUTES | + win32con.FILE_NOTIFY_CHANGE_SIZE | + win32con.FILE_NOTIFY_CHANGE_LAST_WRITE | + win32con.FILE_NOTIFY_CHANGE_SECURITY, + None, + None + ) + for action, file in results: + full_filename = os.path.join (abspath, file) + # This will return 'dir updated' for every file update within dir, but + # we don't want to send unison on a full dir sync in this situation. + if not (os.path.isdir(full_filename) and action == 3): + file_lock.acquire() + update_changes_nomangle(full_filename) + file_lock.release() + + def win32watcher(): + file_lock = threading.Lock() + threads = [ threading.Thread(target=win32watcherThread,args=(abspath,file_lock,)) for abspath in op.abspaths ] + for thread in threads: + thread.setDaemon(True) + thread.start() + + try: + while 1: + pass + except KeyboardInterrupt: + print "Cleaning up." + +################################################# +# END Windows specific code +################################################# + +if __name__=='__main__': + global op + + usage = """usage: %prog [options] root [path] [path]... +This program monitors file system changes on all given (relative to root) paths +and dumps paths (relative to root) files to a file. When launched, this file is +recreated. While running new events are added. This can be read by UNISON +to trigger a sync on these files. If root is a valid unison profile, we attempt +to read all the settings from there.""" + + parser = OptionParser(usage=usage) + parser.add_option("-w", "--sinceWhen", dest="sinceWhen", + help="""starting point for filesystem updates to be captured + Defaults to 'now' in the first run + or the last caputured change""",default = 'now', metavar="SINCEWHEN") + parser.add_option("-l", "--latency", dest="latency", + help="set notification LATENCY in seconds. default 5",default = 5, metavar="LATENCY") + parser.add_option("-f", "--flags", dest="flags", + help="(macosx) set flags (who knows what they mean. defaults to 0",default = 0, metavar="FLAGS") + parser.add_option("-s", "--flushseconds", dest="flush_seconds", + help="(macosx) TIME interval in second until flush is forced. values < 0 turn it off. ",default = 1, metavar="TIME") + parser.add_option("-o", "--outfile", dest="outfile", + help="location of the output file. Defaults to UPATH/changes",default = 'changes', metavar="PATH") + parser.add_option("-t", "--statefile", dest="statefile", + help="(macosx) location of the state file (absolute or relative to UPATH). Defaults to UPATH/state",default = 'state', metavar="PATH") + parser.add_option("-u", "--unisonconfig", dest="uconfdir", + help='path to the unison config directory. default ~/.unison', + default = '~/.unison', metavar = 'UPATH') + parser.add_option("-z", "--follow", dest="follow", + help="define a FOLLOW directive. This is equivalent to the -follow option in unison \ + (except that for now only 'Paths' are supported). This option can appear multiple times. \ + if a unison configuration file is loaded, it takes precedence over this option", + action='append',metavar = 'FOLLOW') + parser.add_option("-q", "--quiet", + action="store_false", dest="verbose", default=True, + help="don't print status messages to stdout") + + parser.add_option("-d", "--debug", + action="store_true", dest="debug", default=False, + help="print debug messages to stderr") + + + (op, args) = parser.parse_args() + + + if len(args)<1: + parser.print_usage() + sys.exit() + + #other paths + op.absuconfdir = my_abspath(op.uconfdir) + op.absstatus = os.path.join(op.absuconfdir,op.statefile) + op.absoutfile = os.path.join(op.absuconfdir,op.outfile) + + + #figure out if the root argument is a valid configuration file name + p = args[0] + fn = '' + if os.path.exists(p) and not os.path.isdir(p): + fn = p + elif os.path.exists(os.path.join(op.absuconfdir,p)): + fn = os.path.join(op.absuconfdir,p) + op.unison_conf = conf_parser(fn) + + #now check for the relevant information + root = None + paths = None + if op.unison_conf and op.unison_conf.has_key('root'): + #find the local root + root = None + paths = None + for r in op.unison_conf['root']: + if r[0]=='/': + root = r + if op.unison_conf.has_key('path'): + paths = op.unison_conf['path'] + if op.unison_conf and op.unison_conf.has_key('follow'): + op.follow = op.unison_conf['follow'] + else: + #see if follows were defined + try: + op.follow + except AttributeError: + op.follow = [] + + if not root: + #no root up to here. get it from args + root = args[0] + + if not paths: + paths = args[1:] + + #absolute paths + op.root = my_abspath(root) + op.abspaths = [os.path.join(root,path) for path in paths] + if op.abspaths == []: + #no paths specified -> make root the path to observe + op.abspaths = [op.root] + #print op.root + #print op.abspaths + + mydebug('options: %s',op) + mydebug('arguments: %s',args) + + #cleaning up the change file + try: + f=open(op.absoutfile,'w') + f.close() + except IOError: + mymesg('failed to open output file. STOP.') + exit(1) + + if sys.platform=='darwin': + macosxwatcher() + elif sys.platform.startswith('linux'): + linuxwatcher() + elif sys.platform.startswith('win32'): + win32watcher() + else: + mymesg('unsupported platform %s',sys.platform) + + Property changes on: trunk/src/fsmonitor.py ___________________________________________________________________ Added: svn:executable + * Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2010-05-28 03:15:14 UTC (rev 449) +++ trunk/src/mkProjectInfo.ml 2010-05-30 14:03:33 UTC (rev 450) @@ -97,3 +97,4 @@ Printf.printf "VERSION=%d.%d.%d\n" majorVersion minorVersion pointVersion;; Printf.printf "NAME=%s\n" projectName;; + Modified: trunk/src/uitext.ml =================================================================== --- trunk/src/uitext.ml 2010-05-28 03:15:14 UTC (rev 449) +++ trunk/src/uitext.ml 2010-05-30 14:03:33 UTC (rev 450) @@ -699,6 +699,8 @@ (* ----------------- Filesystem watching mode ---------------- *) (* FIX: we should check that the child process has not died and restart it if so... *) +(* FIX: also, we should trap fatal errors like losing the connection with the server + and restart if needed (restoring the original paths, etc.) *) let watchinterval = 5 From bcpierce at seas.upenn.edu Sun May 30 10:42:00 2010 From: bcpierce at seas.upenn.edu (bcpierce@seas.upenn.edu) Date: Sun, 30 May 2010 10:42:00 -0400 Subject: [Unison-hackers] [unison-svn] r451 - trunk/src Message-ID: <201005301442.o4UEg0Ur026136@yaws.seas.upenn.edu> Author: bcpierce Date: 2010-05-30 10:42:00 -0400 (Sun, 30 May 2010) New Revision: 451 Modified: trunk/src/RECENTNEWS trunk/src/mkProjectInfo.ml trunk/src/uitext.ml Log: * Unison now passes path arguments and --follow directives to fsmonitor.py. This seems to work except for one small issue with how fsmonitor.py treats --follow directives for directories that don't exist (or maybe this is an issue with how it treats any kind of monitoring when the thing being monitored doesn't exist?). If I create a symlink to a nonexistant directory, give Unison (hence fsmonitor.py) a 'follow' directive for the symlink, start unison, and *then* create the directory, fsmonitor.py misses the change. Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2010-05-30 14:03:33 UTC (rev 450) +++ trunk/src/RECENTNEWS 2010-05-30 14:42:00 UTC (rev 451) @@ -1,5 +1,21 @@ CHANGES FROM VERSION 2.40.16 +* Unison now passes path arguments and --follow directives to + fsmonitor.py. This seems to work except for one small issue with + how fsmonitor.py treats --follow directives for directories that + don't exist (or maybe this is an issue with how it treats any kind + of monitoring when the thing being monitored doesn't exist?). If I + create a symlink to a nonexistant directory, give Unison (hence + fsmonitor.py) a 'follow' directive for the symlink, start unison, and + *then* create the directory, fsmonitor.py misses the change. + + + + + +------------------------------- +CHANGES FROM VERSION 2.40.16 + * More progress on file watching * Add external fsmonitor.py script to svn repo Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2010-05-30 14:03:33 UTC (rev 450) +++ trunk/src/mkProjectInfo.ml 2010-05-30 14:42:00 UTC (rev 451) @@ -98,3 +98,4 @@ Printf.printf "NAME=%s\n" projectName;; + Modified: trunk/src/uitext.ml =================================================================== --- trunk/src/uitext.ml 2010-05-30 14:03:33 UTC (rev 450) +++ trunk/src/uitext.ml 2010-05-30 14:42:00 UTC (rev 451) @@ -707,31 +707,37 @@ let watcherTemp r n = let s = n ^ (Update.archiveHash (Fspath.canonize (Some r))) in Os.fileInUnisonDir s - (* Fspath.toSysPath - (Fspath.concat r (Os.tempPath r (Path.child Path.empty (Name.fromString s)))) *) let watchercmd r = - (* FIX: need to include --follow and path parameters *) + (* FIX: is the quoting of --follow parameters going to work on Win32? *) (* FIX -- need to find the program using watcherosx preference *) let root = Common.root2string r in let changefile = watcherTemp root "changes" in let statefile = watcherTemp root "state" in - let cmd = Printf.sprintf "fsmonitor.py --outfile %s --statefile %s %s\n" - (System.fspathToPrintString changefile) - (System.fspathToPrintString statefile) - root in - debug (fun() -> Util.msg "change command: %s\n" cmd); + let paths = Safelist.map Path.toString (Prefs.read Globals.paths) in + let followpaths = Pred.extern Path.followPred in + let follow = Safelist.map (fun s -> "--follow '"^s^"'") followpaths in + let cmd = Printf.sprintf "fsmonitor.py %s --outfile %s --statefile %s %s %s\n" + root + (System.fspathToPrintString changefile) + (System.fspathToPrintString statefile) + (String.concat " " follow) + (String.concat " " paths) in + debug (fun() -> Util.msg "watchercmd = %s\n" cmd); (changefile,cmd) -module RootMap = Map.Make (struct type t = Common.root let compare = Pervasives.compare end) +module RootMap = Map.Make (struct type t = Common.root + let compare = Pervasives.compare + end) type watcherinfo = {file: System.fspath; ch:Pervasives.in_channel option ref; chars: string ref; lines: string list ref} let watchers : watcherinfo RootMap.t ref = ref RootMap.empty -(* FIX; Using string concatenation to accumulate characters is - pretty inefficient! *) +(* FIX: Using string concatenation to accumulate characters is + a bit inefficient! Not sure how much it matters in the grand scheme, + though... *) let getAvailableLinesFromWatcher wi = let ch = match !(wi.ch) with Some(c) -> c | None -> assert false in let rec loop () = From bcpierce at seas.upenn.edu Sun May 30 11:52:12 2010 From: bcpierce at seas.upenn.edu (bcpierce@seas.upenn.edu) Date: Sun, 30 May 2010 11:52:12 -0400 Subject: [Unison-hackers] [unison-svn] r452 - trunk/src Message-ID: <201005301552.o4UFqDl6027580@yaws.seas.upenn.edu> Author: bcpierce Date: 2010-05-30 11:52:12 -0400 (Sun, 30 May 2010) New Revision: 452 Modified: trunk/src/RECENTNEWS trunk/src/mkProjectInfo.ml trunk/src/uitext.ml Log: * Correct a bug in the watcher startup code for remote sync Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2010-05-30 14:42:00 UTC (rev 451) +++ trunk/src/RECENTNEWS 2010-05-30 15:52:12 UTC (rev 452) @@ -1,5 +1,14 @@ CHANGES FROM VERSION 2.40.16 +* Correct a bug in the watcher startup code for remote sync + + + + + +------------------------------- +CHANGES FROM VERSION 2.40.16 + * Unison now passes path arguments and --follow directives to fsmonitor.py. This seems to work except for one small issue with how fsmonitor.py treats --follow directives for directories that Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2010-05-30 14:42:00 UTC (rev 451) +++ trunk/src/mkProjectInfo.ml 2010-05-30 15:52:12 UTC (rev 452) @@ -99,3 +99,4 @@ + Modified: trunk/src/uitext.ml =================================================================== --- trunk/src/uitext.ml 2010-05-30 14:42:00 UTC (rev 451) +++ trunk/src/uitext.ml 2010-05-30 15:52:12 UTC (rev 452) @@ -612,9 +612,9 @@ displayWhenInteractive "\nProceed with propagating updates? "; selectAction (* BCP: I find it counterintuitive that every other prompt except this one - would expect as a default. But I got talked out of offering a default - here, because of safety considerations (too easy to press one time - too many). *) + would expect as a default. But I got talked out of offering a + default here, because of safety considerations (too easy to press + one time too many). *) (if Prefs.read Globals.batch then Some "y" else None) [(["y";"g"], "Yes: proceed with updates as selected above", @@ -696,11 +696,12 @@ (exitStatus, failedPaths) end +let originalValueOfPathsPreference = ref [] + (* ----------------- Filesystem watching mode ---------------- *) -(* FIX: we should check that the child process has not died and restart it if so... *) -(* FIX: also, we should trap fatal errors like losing the connection with the server - and restart if needed (restoring the original paths, etc.) *) +(* FIX: we should check that the child process has not died and + restart it if so... *) let watchinterval = 5 @@ -711,10 +712,10 @@ let watchercmd r = (* FIX: is the quoting of --follow parameters going to work on Win32? *) (* FIX -- need to find the program using watcherosx preference *) - let root = Common.root2string r in + let root = Fspath.toString (snd r) in let changefile = watcherTemp root "changes" in let statefile = watcherTemp root "state" in - let paths = Safelist.map Path.toString (Prefs.read Globals.paths) in + let paths = Safelist.map Path.toString !originalValueOfPathsPreference in let followpaths = Pred.extern Path.followPred in let follow = Safelist.map (fun s -> "--follow '"^s^"'") followpaths in let cmd = Printf.sprintf "fsmonitor.py %s --outfile %s --statefile %s %s %s\n" @@ -774,7 +775,8 @@ end else begin (* Wait for change file to be built *) debug (fun() -> Util.msg - "Waiting for change file %s\n" (System.fspathToPrintString wi.file)); + "Waiting for change file %s\n" + (System.fspathToPrintString wi.file)); [] end else @@ -783,9 +785,11 @@ with Not_found -> begin (* Watcher process not running *) let (changefile,cmd) = watchercmd r in - debug (fun() -> Util.msg "Starting watcher on root %s\n" (Common.root2string r)); + debug (fun() -> Util.msg + "Starting watcher on root %s\n" (Common.root2string r)); let _ = System.open_process_in cmd in - let wi = {file = changefile; ch = ref None; lines = ref []; chars = ref ""} in + let wi = {file = changefile; ch = ref None; + lines = ref []; chars = ref ""} in watchers := RootMap.add r wi !watchers; [] end) @@ -828,13 +832,12 @@ (* ----------------- Repetition ---------------- *) let synchronizeUntilNoFailures () = - let initValueOfPathsPreference = Prefs.read Globals.paths in let rec loop triesLeft = let (exitStatus,failedPaths) = synchronizeOnce() in if failedPaths <> [] && triesLeft <> 0 then begin loop (triesLeft - 1) end else begin - Prefs.set Globals.paths initValueOfPathsPreference; + Prefs.set Globals.paths !originalValueOfPathsPreference; exitStatus end in loop (Prefs.read Uicommon.retry) @@ -857,14 +860,25 @@ exitStatus else begin (* Do it again *) - Trace.status (Printf.sprintf "\nSleeping for %d seconds...\n" repeatinterval); + Trace.status (Printf.sprintf + "\nSleeping for %d seconds...\n" repeatinterval); Unix.sleep repeatinterval; synchronizeUntilDone () end (* ----------------- Startup ---------------- *) -let start interface = +let handleException e = + restoreTerminal(); + let msg = Uicommon.exn2string e in + Trace.log (msg ^ "\n"); + if not !Trace.sendLogMsgsToStderr then begin + alwaysDisplay "\n"; + alwaysDisplay msg; + alwaysDisplay "\n"; + end + +let rec start interface = if interface <> Uicommon.Text then Util.msg "This Unison binary only provides the text GUI...\n"; begin try @@ -901,6 +915,10 @@ setWarnPrinter(); Trace.statusFormatter := formatStatus; + (* Save away the user's path preferences in case they are needed for + restarting/repeating *) + originalValueOfPathsPreference := Prefs.read Globals.paths; + let exitStatus = synchronizeUntilDone() in (* Put the terminal back in "sane" mode, if necessary, and quit. *) @@ -908,16 +926,22 @@ exit exitStatus with - e -> - restoreTerminal(); - let msg = Uicommon.exn2string e in - Trace.log (msg ^ "\n"); - if not !Trace.sendLogMsgsToStderr then begin - alwaysDisplay "\n"; - alwaysDisplay msg; - alwaysDisplay "\n"; - end; + Sys.Break -> begin + (* If we've been killed, then die *) + handleException Sys.Break; exit Uicommon.fatalExit + end + | e -> begin + (* If any other bad thing happened and the -repeat preference is + set, then restart *) + handleException e; + if Prefs.read Uicommon.repeat <> "" then begin + Util.msg "Restarting in 10 seconds...\n"; + Unix.sleep 10; + start interface + end else + exit Uicommon.fatalExit + end end let defaultUi = Uicommon.Text From geneh at shaw.ca Sun May 30 20:47:56 2010 From: geneh at shaw.ca (Gene Horodecki) Date: Sun, 30 May 2010 19:47:56 -0500 Subject: [Unison-hackers] File watcher: Question about state file Message-ID: <4C03073C.6090209@shaw.ca> What is the --statefile for? I did not implement it in my win32 section. From geneh at shaw.ca Sun May 30 23:14:44 2010 From: geneh at shaw.ca (Gene Horodecki) Date: Sun, 30 May 2010 22:14:44 -0500 Subject: [Unison-hackers] Building unison for windows Message-ID: <4C0329A4.3050104@shaw.ca> Hi there, I have access to Cygwin for building unison but not Visual C++. Does anyone know if building with Cygwin will give me a unison binary that will work in the DOS command line? If not, is there anyone that could do a build of the svn version for me? I'm assuming Visual C++ is not free. From bcpierce at cis.upenn.edu Mon May 31 09:19:17 2010 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Mon, 31 May 2010 09:19:17 -0400 Subject: [Unison-hackers] File watcher: Question about state file In-Reply-To: <4C03073C.6090209@shaw.ca> References: <4C03073C.6090209@shaw.ca> Message-ID: One thing it's used for is to tell the filewatcher when was the last time it was running, so that it can report files changed since then. That is, it will tell Unison not just what files are changing right now, but what files have changed since the last time we ran Unison with "-repeat watch" for these replicas. However, I don't think this scheme is safe -- it could cause us to miss changes if Unison simply trusts it. It is better to start the change detection at the moment where Unison starts up the filewatcher and then make Unison do a full scan of the filesystems itself, to make sure it finds everything that has changed since the last run. So I propose removing the --statefile functionality (assuming that was the only thing Christophe was using it for). - B On May 30, 2010, at 8:47 PM, Gene Horodecki wrote: > What is the --statefile for? I did not implement it in my win32 section. > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From bcpierce at seas.upenn.edu Mon May 31 09:24:33 2010 From: bcpierce at seas.upenn.edu (bcpierce@seas.upenn.edu) Date: Mon, 31 May 2010 09:24:33 -0400 Subject: [Unison-hackers] [unison-svn] r453 - trunk/src Message-ID: <201005311324.o4VDOXMd016250@yaws.seas.upenn.edu> Author: bcpierce Date: 2010-05-31 09:24:33 -0400 (Mon, 31 May 2010) New Revision: 453 Modified: trunk/src/RECENTNEWS trunk/src/mkProjectInfo.ml trunk/src/uitext.ml trunk/src/update.ml Log: * Trim duplicate paths when using "-repeat watch" * Bump version number, since protocol has changed (should have done this a few commits ago) Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2010-05-30 15:52:12 UTC (rev 452) +++ trunk/src/RECENTNEWS 2010-05-31 13:24:33 UTC (rev 453) @@ -1,3 +1,15 @@ +CHANGES FROM VERSION 2.41.-28 + +* Trim duplicate paths when using "-repeat watch" + +* Bump version number, since protocol has changed (should have done + this a few commits ago) + + + + + +------------------------------- CHANGES FROM VERSION 2.40.16 * Correct a bug in the watcher startup code for remote sync Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2010-05-30 15:52:12 UTC (rev 452) +++ trunk/src/mkProjectInfo.ml 2010-05-31 13:24:33 UTC (rev 453) @@ -5,8 +5,8 @@ let projectName = "unison" let majorVersion = 2 -let minorVersion = 40 -let pointVersionOrigin = 409 (* Revision that corresponds to point version 0 *) +let minorVersion = 41 +let pointVersionOrigin = 453 (* Revision that corresponds to point version 0 *) (* Documentation: This is a program to construct a version of the form Major.Minor.Point, @@ -100,3 +100,4 @@ + Modified: trunk/src/uitext.ml =================================================================== --- trunk/src/uitext.ml 2010-05-30 15:52:12 UTC (rev 452) +++ trunk/src/uitext.ml 2010-05-31 13:24:33 UTC (rev 453) @@ -655,7 +655,7 @@ end end -let synchronizeOnce() = +let synchronizeOnce () = let showStatus path = if path = "" then Util.set_infos "" else let max_len = 70 in @@ -673,6 +673,9 @@ if not (Prefs.read Trace.terse) && (Prefs.read Trace.debugmods = []) then Uutil.setUpdateStatusPrinter (Some showStatus); + debug (fun() -> Util.msg "temp: Globals.paths = %s\n" + (String.concat " " + (Safelist.map Path.toString (Prefs.read Globals.paths)))); let updates = Update.findUpdates() in Uutil.setUpdateStatusPrinter None; @@ -703,6 +706,9 @@ (* FIX: we should check that the child process has not died and restart it if so... *) +(* FIX: the names of the paths being watched should get included + in the name of the watcher's state file *) + let watchinterval = 5 let watcherTemp r n = @@ -730,15 +736,27 @@ module RootMap = Map.Make (struct type t = Common.root let compare = Pervasives.compare end) +(* Using string concatenation to accumulate characters is + a bit inefficient, but it's not clear how much it matters in the + grand scheme of things. Current experience suggests that this + implementation performs well enough. *) type watcherinfo = {file: System.fspath; ch:Pervasives.in_channel option ref; chars: string ref; lines: string list ref} let watchers : watcherinfo RootMap.t ref = ref RootMap.empty -(* FIX: Using string concatenation to accumulate characters is - a bit inefficient! Not sure how much it matters in the grand scheme, - though... *) +let trim_duplicates l = + let rec loop l = match l with + [] -> l + | [s] -> l + | s1::s2::rest -> + if Util.startswith s1 s2 || Util.startswith s2 s1 then + loop (s2::rest) + else + s1 :: (loop (s2::rest)) in + loop (Safelist.sort String.compare l) + let getAvailableLinesFromWatcher wi = let ch = match !(wi.ch) with Some(c) -> c | None -> assert false in let rec loop () = @@ -746,7 +764,7 @@ None -> let res = !(wi.lines) in wi.lines := []; - res + trim_duplicates res | Some(c) -> if c = '\n' then begin wi.lines := !(wi.chars) :: !(wi.lines); @@ -779,9 +797,10 @@ (System.fspathToPrintString wi.file)); [] end - else + else begin (* Watcher running and channel built: go ahead and read *) getAvailableLinesFromWatcher wi + end with Not_found -> begin (* Watcher process not running *) let (changefile,cmd) = watchercmd r in @@ -805,14 +824,31 @@ (Lwt_unix.run ( Globals.allRootsMap (fun r -> suckOnWatcherFileRoot r r))) +let shouldNotIgnore p = + let rec test prefix rest = + if Globals.shouldIgnore prefix then + false + else match (Path.deconstruct rest) with + None -> true + | Some(n,rest') -> + test (Path.child prefix n) rest' + in + test Path.empty (Path.fromString p) + let synchronizePathsFromFilesystemWatcher () = - (* Make sure the confirmbigdeletes preference is turned off. If it's on, then - deletions will fail because every deletion is a "big deletion"! *) + (* Make sure the confirmbigdeletes preference is turned off. If it's on, + then all deletions will fail because every deletion will count as + a "big deletion"! *) Prefs.set Globals.confirmBigDeletes false; + let rec loop failedPaths = - let newpaths = suckOnWatcherFiles () in + let newpathsraw = suckOnWatcherFiles () in + debug (fun () -> Util.msg + "Changed paths: %s\n" (String.concat " " newpathsraw)); + let newpaths = Safelist.filter shouldNotIgnore newpathsraw in if newpaths <> [] then - display (Printf.sprintf "Changed paths:\n %s\n" + display (Printf.sprintf "Changed paths: %s%s\n" + (if newpaths=[] then "" else "\n ") (String.concat "\n " newpaths)); let p = failedPaths @ (Safelist.map Path.fromString newpaths) in if p <> [] then begin Modified: trunk/src/update.ml =================================================================== --- trunk/src/update.ml 2010-05-30 15:52:12 UTC (rev 452) +++ trunk/src/update.ml 2010-05-31 13:24:33 UTC (rev 453) @@ -1395,8 +1395,8 @@ showStatusDir path; let skip = Pred.test immutable (Path.toString path) && - not (Pred.test immutablenot (Path.toString path)) - in + not (Pred.test immutablenot (Path.toString path)) in + if unchangedChildren then begin if skip then begin if Prefs.read Xferhint.xferbycopying then @@ -1414,15 +1414,24 @@ let archUpdated = ref false in let handleChild nm archive = let path' = Path.child path nm in - showStatus scanInfo path'; - let (arch,uiChild) = - buildUpdateRec archive fspath path' scanInfo in - if uiChild <> NoUpdates then - updates := (nm, uiChild) :: !updates; - match arch with - None -> archive - | Some arch -> archUpdated := true; arch - in + debugverbose (fun () -> Util.msg + "buildUpdateChildren(handleChild): %s\n" (Path.toString path')); + (* BCP 6/10: Added check for ignored path, but I'm not completely + sure this is the right place for it: *) + if Globals.shouldIgnore path' then begin + debugignore (fun()->Util.msg "buildUpdateChildren: ignoring path %s\n" + (Path.toString path')); + archive + end else begin + showStatus scanInfo path'; + let (arch,uiChild) = + buildUpdateRec archive fspath path' scanInfo in + if uiChild <> NoUpdates then + updates := (nm, uiChild) :: !updates; + match arch with + None -> archive + | Some arch -> archUpdated := true; arch + end in let newChi = NameMap.mapi handleChild archChi in (* The Recon module relies on the updates to be sorted *) ((if !archUpdated then Some newChi else None), @@ -1521,7 +1530,7 @@ and buildUpdateRec archive currfspath path scanInfo = try debug (fun() -> - Util.msg "buildUpdate: %s\n" + Util.msg "buildUpdateRec: %s\n" (Fspath.toDebugString (Fspath.concat currfspath path))); let info = Fileinfo.get true currfspath path in match (info.Fileinfo.typ, archive) with @@ -1582,7 +1591,7 @@ Actually, we could check for ignored children in the archive, but this has a significant cost. We could mark directories with ignored children, and only perform the checks for them, - but that does not seem worthwhile, are directories with + but that does not seem worthwhile, as directories with ignored children are expected to be rare in the archive. (These are files or directories which used not to be ignored and are now ignored.) *) @@ -1755,7 +1764,9 @@ unchanged files *) let findLocal fspath pathList: (Path.local * Common.updateItem * Props.t list) list = - debug (fun() -> Util.msg "findLocal %s\n" (Fspath.toDebugString fspath)); + debug (fun() -> Util.msg + "findLocal %s (%s)\n" (Fspath.toDebugString fspath) + (String.concat " " (Safelist.map Path.toString pathList))); addHashToTempNames fspath; (* Maybe we should remember the device number where the root lives at the beginning of update detection, so that we can check, below, that From michael.mcdougall at gmail.com Mon May 31 13:39:41 2010 From: michael.mcdougall at gmail.com (Michael McDougall) Date: Mon, 31 May 2010 13:39:41 -0400 Subject: [Unison-hackers] Building unison for windows In-Reply-To: <4C0329A4.3050104@shaw.ca> References: <4C0329A4.3050104@shaw.ca> Message-ID: Visual Studio has an 'express' version that is free. http://www.microsoft.com/express/ (Though I don't know if it's compatible with the Unison build process.) Michael On Sun, May 30, 2010 at 11:14 PM, Gene Horodecki wrote: > Hi there, I have access to Cygwin for building unison but not Visual C++. > > Does anyone know if building with Cygwin will give me a unison binary > that will work in the DOS command line? > > If not, is there anyone that could do a build of the svn version for > me? ?I'm assuming Visual C++ is not free. > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > From Jerome.Vouillon at pps.jussieu.fr Mon May 31 17:00:52 2010 From: Jerome.Vouillon at pps.jussieu.fr (Jerome Vouillon) Date: Mon, 31 May 2010 23:00:52 +0200 Subject: [Unison-hackers] Building unison for windows In-Reply-To: <4C0329A4.3050104@shaw.ca> References: <4C0329A4.3050104@shaw.ca> Message-ID: <20100531210052.GB10861@pps.jussieu.fr> On Sun, May 30, 2010 at 10:14:44PM -0500, Gene Horodecki wrote: > Hi there, I have access to Cygwin for building unison but not Visual C++. > > Does anyone know if building with Cygwin will give me a unison binary > that will work in the DOS command line? Yes, you can build a unison binary that does not depend on Cygwin if you use the MinGW-based native Win32 port of Objective Caml. > If not, is there anyone that could do a build of the svn version for > me? I'm assuming Visual C++ is not free. You can also use the Visual C++ Express Edition, which is free (as beer). -- Jerome