From hans_meine at gmx.net Tue Jul 5 10:28:56 2011 From: hans_meine at gmx.net (Hans Meine) Date: Tue, 5 Jul 2011 16:28:56 +0200 Subject: [Unison-hackers] Wrong icon in Cocoa GUI for directories with dot in name Message-ID: <201107051628.56624.hans_meine@gmx.net> Hi, first of all thanks again for this great piece of software - I am constantly recommending it to other people. For about a year, I am using the Cocoa GUI which is also really well done. Today, I noticed that two out of five (new) folders about to be synced to the remote end did not have the "folder", but the "[unknown] file" icon. It took me a while to see why, but I am pretty sure it is because the folder names have a dot in them. (Sth. like "foo_1.25mm_bar", while other folders are like "foo_1mm_bar".) Looks like a simple thing to fix for someone with source and compiler at hand. Have a nice day, Hans From bcpierce at cis.upenn.edu Sat Jul 16 22:27:15 2011 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Sat, 16 Jul 2011 22:27:15 -0400 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 Message-ID: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> Dear Unison-on-OSX hackers, I normally use Unison in text mode so I don't know how long this has been the case, but I don't seem to be able to compile the GUI on my OSX box at the moment. Can anyone diagnose the following? Thanks! - Benjamin ld: warning: in /Users/bcpierce/current/unison/trunk/src/uimacnew/Growl.framework/Growl, missing required architecture x86_64 in file Undefined symbols: "_OBJC_CLASS_$_GrowlApplicationBridge", referenced from: objc-class-ref-to-GrowlApplicationBridge in NotificationController.o ld: symbol(s) not found collect2: ld returned 1 exit status PBXCp build/Default/Unison.app/Contents/Frameworks/Growl.framework Growl.framework cd /Users/bcpierce/current/unison/trunk/src/uimacnew /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -strip-debug-symbols -resolve-src-symlinks /Users/bcpierce/current/unison/trunk/src/uimacnew/Growl.framework /Users/bcpierce/current/unison/trunk/src/uimacnew/build/Default/Unison.app/Contents/Frameworks ** BUILD FAILED ** The following build commands failed: uimac: Ld /Users/bcpierce/current/unison/trunk/src/uimacnew/build/Default/Unison.app/Contents/MacOS/Unison normal x86_64 (1 failure) From lukas.reichlin at gmail.com Sun Jul 17 02:54:46 2011 From: lukas.reichlin at gmail.com (Lukas Reichlin) Date: Sun, 17 Jul 2011 08:54:46 +0200 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> Message-ID: On 17.07.2011, at 04:27, Benjamin C. Pierce wrote: > Dear Unison-on-OSX hackers, > > I normally use Unison in text mode so I don't know how long this has been the case, but I don't seem to be able to compile the GUI on my OSX box at the moment. Can anyone diagnose the following? > > Thanks! > > - Benjamin > > > ld: warning: in /Users/bcpierce/current/unison/trunk/src/uimacnew/Growl.framework/Growl, missing required architecture x86_64 in file > Undefined symbols: > "_OBJC_CLASS_$_GrowlApplicationBridge", referenced from: > objc-class-ref-to-GrowlApplicationBridge in NotificationController.o > ld: symbol(s) not found > collect2: ld returned 1 exit status > PBXCp build/Default/Unison.app/Contents/Frameworks/Growl.framework Growl.framework > cd /Users/bcpierce/current/unison/trunk/src/uimacnew > /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -strip-debug-symbols -resolve-src-symlinks /Users/bcpierce/current/unison/trunk/src/uimacnew/Growl.framework /Users/bcpierce/current/unison/trunk/src/uimacnew/build/Default/Unison.app/Contents/Frameworks > > ** BUILD FAILED ** > > > The following build commands failed: > uimac: > Ld /Users/bcpierce/current/unison/trunk/src/uimacnew/build/Default/Unison.app/Contents/MacOS/Unison normal x86_64 > (1 failure) > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers Hello I'm experiencing the same problem. UISTYLE=text works flawlessly but macnew and macnew09 don't. The error messages are at the end of this mail. My machine is a Core i5 iMac running Mac OS X 10.6.8. I installed Ocaml 3.12.1 from MacPorts and XCode 3.2.6. Help would be much appreciated! Best regards Lukas UISTYLE=macnew: *************** Ld build/Default/Unison.app/Contents/MacOS/Unison normal i386 cd /Users/lukas/Desktop/unison-2.40.63/uimacnew setenv MACOSX_DEPLOYMENT_TARGET 10.5 /Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/lukas/Desktop/unison-2.40.63/uimacnew/build/Default -F/Users/lukas/Desktop/unison-2.40.63/uimacnew/build/Default -F/Users/lukas/Desktop/unison-2.40.63/uimacnew -filelist /Users/lukas/Desktop/unison-2.40.63/uimacnew/build/uimacnew.build/Default/uimac.build/Objects-normal/i386/Unison.LinkFileList -mmacosx-version-min=10.5 -L/opt/local/lib/ocaml -lunix -lthreadsnat -lstr -lbigarray -lasmrun -framework Cocoa -framework Security -framework Growl -framework ExceptionHandling /Users/lukas/Desktop/unison-2.40.63/uimacnew/../unison-blob.o -o /Users/lukas/Desktop/unison-2.40.63/uimacnew/build/Default/Unison.app/Contents/MacOS/Unison ld: library not found for -lstr collect2: ld returned 1 exit status Command /Developer/usr/bin/gcc-4.2 failed with exit code 1 Command /Developer/usr/bin/gcc-4.2 failed with exit code 1 PBXCp build/Default/Unison.app/Contents/Frameworks/Growl.framework Growl.framework cd /Users/lukas/Desktop/unison-2.40.63/uimacnew /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -strip-debug-symbols -resolve-src-symlinks /Users/lukas/Desktop/unison-2.40.63/uimacnew/Growl.framework /Users/lukas/Desktop/unison-2.40.63/uimacnew/build/Default/Unison.app/Contents/Frameworks ** BUILD FAILED ** The following build commands failed: uimac: Ld /Users/lukas/Desktop/unison-2.40.63/uimacnew/build/Default/Unison.app/Contents/MacOS/Unison normal i386 (1 failure) make: *** [macexecutable] Error 1 UISTYLE=macnew09: ***************** Ld build/Default/Unison.app/Contents/MacOS/Unison normal i386 cd /Users/lukas/Desktop/unison-2.40.63/uimacnew09 setenv MACOSX_DEPLOYMENT_TARGET 10.5 /Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/lukas/Desktop/unison-2.40.63/uimacnew09/build/Default -F/Users/lukas/Desktop/unison-2.40.63/uimacnew09/build/Default -FFrameworks -F/Users/lukas/Desktop/unison-2.40.63/uimacnew09 -F/Users/lukas/Desktop/unison-2.40.63/uimacnew09/Frameworks -F/Users/lukas/Desktop/unison-2.40.63/uimacnew09/Frameworks -filelist /Users/lukas/Desktop/unison-2.40.63/uimacnew09/build/uimacnew.build/Default/uimac.build/Objects-normal/i386/Unison.LinkFileList -mmacosx-version-min=10.5 -L/opt/local/lib/ocaml -lunix -lthreadsnat -lstr -lbigarray -lasmrun -framework Cocoa -framework Security -framework ExceptionHandling /Users/lukas/Desktop/unison-2.40.63/uimacnew09/../unison-blob.o -framework BWToolkitFramework -framework Growl -o /Users/lukas/Desktop/unison-2.40.63/uimacnew09/build/Default/Unison.app/Contents/MacOS/Unison ld: library not found for -lstr collect2: ld returned 1 exit status Command /Developer/usr/bin/gcc-4.2 failed with exit code 1 Command /Developer/usr/bin/gcc-4.2 failed with exit code 1 PBXCp build/Default/Unison.app/Contents/Frameworks/BWToolkitFramework.framework Frameworks/BWToolkitFramework.framework cd /Users/lukas/Desktop/unison-2.40.63/uimacnew09 /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -strip-debug-symbols -resolve-src-symlinks /Users/lukas/Desktop/unison-2.40.63/uimacnew09/Frameworks/BWToolkitFramework.framework /Users/lukas/Desktop/unison-2.40.63/uimacnew09/build/Default/Unison.app/Contents/Frameworks PBXCp build/Default/Unison.app/Contents/Frameworks/Growl.framework Frameworks/Growl.framework cd /Users/lukas/Desktop/unison-2.40.63/uimacnew09 /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -strip-debug-symbols -resolve-src-symlinks /Users/lukas/Desktop/unison-2.40.63/uimacnew09/Frameworks/Growl.framework /Users/lukas/Desktop/unison-2.40.63/uimacnew09/build/Default/Unison.app/Contents/Frameworks ** BUILD FAILED ** The following build commands failed: uimac: Ld /Users/lukas/Desktop/unison-2.40.63/uimacnew09/build/Default/Unison.app/Contents/MacOS/Unison normal i386 (1 failure) make: *** [macexecutable] Error 1 From alan.schmitt at polytechnique.org Sun Jul 17 05:08:35 2011 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Sun, 17 Jul 2011 11:08:35 +0200 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> Message-ID: On Sun, Jul 17, 2011 at 4:27 AM, Benjamin C. Pierce wrote: > Dear Unison-on-OSX hackers, > > I normally use Unison in text mode so I don't know how long this has been the case, but I don't seem to be able to compile the GUI on my OSX box at the moment. ?Can anyone diagnose the following? It's working here. When I check for the library, it seems that x64 is present: (from the src directory) ? src file uimacnew/Growl.framework/Growl uimacnew/Growl.framework/Growl: Mach-O universal binary with 3 architectures uimacnew/Growl.framework/Growl (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 uimacnew/Growl.framework/Growl (for architecture i386): Mach-O dynamically linked shared library i386 uimacnew/Growl.framework/Growl (for architecture ppc): Mach-O dynamically linked shared library ppc Could you try this on your side? If you're missing x64, then we need to upgrade the Growl framework in the svn. Alan From alan.schmitt at polytechnique.org Sun Jul 17 05:10:28 2011 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Sun, 17 Jul 2011 11:10:28 +0200 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> Message-ID: On Sun, Jul 17, 2011 at 8:54 AM, Lukas Reichlin wrote: > I'm experiencing the same problem. UISTYLE=text works flawlessly but macnew and macnew09 don't. The error messages are at the end of this mail. My machine is a Core i5 iMac running Mac OS X 10.6.8. I installed Ocaml 3.12.1 from MacPorts and XCode 3.2.6. Help would be much appreciated! This is a different problem, probably related to this bug: http://caml.inria.fr/mantis/view.php?id=5247 You need to find where libcamlstr.a is, and symlink libstr.a to libcamlstr.a in the same directory. Hope this helps, Alan From bcpierce at seas.upenn.edu Sun Jul 17 09:24:13 2011 From: bcpierce at seas.upenn.edu (bcpierce at seas.upenn.edu) Date: Sun, 17 Jul 2011 09:24:13 -0400 Subject: [Unison-hackers] [unison-svn] r475 - in trunk: doc src Message-ID: <201107171324.p6HDODdP024219@yaws.seas.upenn.edu> Author: bcpierce Date: 2011-07-17 09:24:13 -0400 (Sun, 17 Jul 2011) New Revision: 475 Modified: trunk/doc/changes.tex trunk/doc/unison-manual.tex trunk/src/RECENTNEWS trunk/src/copy.ml trunk/src/mkProjectInfo.ml trunk/src/osx.ml trunk/src/strings.ml trunk/src/transfer.ml trunk/src/transfer.mli trunk/src/transport.ml trunk/src/update.ml Log: * Some spelling corrections in documentation and comments from Stephane Glondu Modified: trunk/doc/changes.tex =================================================================== --- trunk/doc/changes.tex 2011-04-21 17:59:42 UTC (rev 474) +++ trunk/doc/changes.tex 2011-07-17 13:24:13 UTC (rev 475) @@ -1742,7 +1742,7 @@ \end{verbatim} in your profile ({\tt .unison/default.prf}), you should put: \begin{verbatim} - ignore = Regexp + ignore = Regex \end{verbatim} Moreover, two other styles of pattern are also recognized: \begin{verbatim} Modified: trunk/doc/unison-manual.tex =================================================================== --- trunk/doc/unison-manual.tex 2011-04-21 17:59:42 UTC (rev 474) +++ trunk/doc/unison-manual.tex 2011-07-17 13:24:13 UTC (rev 475) @@ -296,7 +296,9 @@ You'll also need the GNU {\tt make} utility, standard on many Unix systems. (Type \showtt{make --version} to check that you've got the -GNU version.) +GNU version.) Unison's build system is +not parallelizable, so don't use make flags which cause it to start +processes in parallel, e.g. -j for GNU make. Once you've got OCaml installed, grab a copy of the Unison sources, unzip and untar them, change to the new \showtt{unison} directory, and @@ -601,9 +603,7 @@ The standard remote shell facility on Unix systems is \verb|ssh|, which provides the same functionality as the older \verb|rsh| but much better security. Ssh is available from -\ONEURL{ftp://ftp.cs.hut.fi/pub/ssh/}; up-to-date binaries for some -architectures can also be found at -\ONEURL{ftp://ftp.faqs.org/ssh/contrib}. See section~\ref{ssh-win} +\ONEURL{http://www.openssh.org}. See section~\ref{ssh-win} for installation instructions for the Windows version. Running @@ -1672,7 +1672,7 @@ state'' of the replicas. (These three options are provided for later compatibility with the Harmony data synchronizer.) \end{itemize} -To accomodate the wide variety of programs that users might want to use for +To accommodate the wide variety of programs that users might want to use for merging, Unison checks for several possible situations when the merge program exits: \begin{itemize} @@ -2252,9 +2252,9 @@ \item You can now delete the directory \verb|Foo| and its contents. \end{enumerate} Some people have reported problems using Cygwin's ssh with Unison. If -you have trouble, you might try this one instead: +you have trouble, you might try other ones instead: \begin{verbatim} - http://opensores.thebunker.net/pub/mirrors/ssh/contrib/ssh-1.2.14-win32bin.zip + http://linuxmafia.com/ssh/win32.html \end{verbatim} \item You must set the environment variables HOME and PATH\@. Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2011-04-21 17:59:42 UTC (rev 474) +++ trunk/src/RECENTNEWS 2011-07-17 13:24:13 UTC (rev 475) @@ -1,3 +1,8 @@ +CHANGES FROM VERSION 2.44.2 + +* Some spelling corrections in documentation and comments from Stephane Glondu + +------------------------------- CHANGES FROM VERSION 2.44.0 * Small patch from Stephane Glondu to make Unison compile with Ocaml 3.12. Modified: trunk/src/copy.ml =================================================================== --- trunk/src/copy.ml 2011-04-21 17:59:42 UTC (rev 474) +++ trunk/src/copy.ml 2011-07-17 13:24:13 UTC (rev 475) @@ -284,9 +284,12 @@ Uutil.readWriteBounded inFd outFd fileLength (fun l -> use_id (fun id -> +(* (Util.msg "Copied file %s (%d bytes)\n" (Path.toString pathFrom) l); *) Uutil.showProgress id (Uutil.Filesize.ofInt l) "l")); close_in inFd; - close_out outFd) + close_out outFd; +(* ignore (Sys.command ("ls -l " ^ (Fspath.toString (Fspath.concat fspathTo pathTo)))) *) + ) (fun () -> close_out_noerr outFd)) (fun () -> close_in_noerr inFd) @@ -587,7 +590,7 @@ (****) -let transferRessourceForkAndSetFileinfo +let transferResourceForkAndSetFileinfo connFrom fspathFrom pathFrom fspathTo pathTo realPathTo update desc fp ress id = (* Resource fork *) @@ -625,7 +628,7 @@ connFrom fspathFrom pathFrom fspathTo pathTo realPathTo update (match prefixLen with None -> `DATA | Some l -> `DATA_APPEND l) (Props.length desc) id >>= fun () -> - transferRessourceForkAndSetFileinfo + transferResourceForkAndSetFileinfo connFrom fspathFrom pathFrom fspathTo pathTo realPathTo update desc fp ress id @@ -782,7 +785,7 @@ raise (Util.Transient (Printf.sprintf "External copy program did not create target file (or bad length): %s" (Path.toString pathTo))); - transferRessourceForkAndSetFileinfo + transferResourceForkAndSetFileinfo connFrom fspathFrom pathFrom fspathTo pathTo realPathTo update desc fp ress id >>= fun res -> Xferhint.insertEntry fspathTo pathTo fp; Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2011-04-21 17:59:42 UTC (rev 474) +++ trunk/src/mkProjectInfo.ml 2011-07-17 13:24:13 UTC (rev 475) @@ -56,3 +56,4 @@ + Modified: trunk/src/osx.ml =================================================================== --- trunk/src/osx.ml 2011-04-21 17:59:42 UTC (rev 474) +++ trunk/src/osx.ml 2011-07-17 13:24:13 UTC (rev 475) @@ -58,15 +58,15 @@ let doubleMagic = "\000\005\022\007" let doubleVersion = "\000\002\000\000" let doubleFiller = String.make 16 '\000' -let ressource_fork_empty_tag = "This resource fork intentionally left blank " +let resource_fork_empty_tag = "This resource fork intentionally left blank " let finfoLength = 32L let emptyFinderInfo () = String.make 32 '\000' -let empty_ressource_fork = +let empty_resource_fork = "\000\000\001\000" ^ "\000\000\001\000" ^ "\000\000\000\000" ^ "\000\000\000\030" ^ - ressource_fork_empty_tag ^ + resource_fork_empty_tag ^ String.make (66+128) '\000' ^ "\000\000\001\000" ^ "\000\000\001\000" ^ @@ -239,7 +239,7 @@ if not (Prefs.read rsrc) then defaultInfos typ else match typ with (`FILE | `DIRECTORY) as typ -> - Util.convertUnixErrorsToTransient "getting file informations" (fun () -> + Util.convertUnixErrorsToTransient "getting file information" (fun () -> try let (fInfo, rsrcLength) = getFileInfosInternal @@ -260,15 +260,15 @@ let (rsrcOffset, rsrcLength) = try let (offset, len) = Safelist.assoc `RSRC entries in - (* We need to check that the ressource fork is not a + (* We need to check that the resource fork is not a dummy one included for compatibility reasons *) if len = 286L && protect (fun () -> LargeFile.seek_in inch (Int64.add offset 16L); - let len = String.length ressource_fork_empty_tag in + let len = String.length resource_fork_empty_tag in let buf = String.create len in really_input inch buf 0 len; - buf = ressource_fork_empty_tag) + buf = resource_fork_empty_tag) (fun () -> close_in_noerr inch) then (0L, 0L) @@ -279,7 +279,7 @@ in debug (fun () -> Util.msg - "AppleDouble for file %s / %s: ressource fork length: %d\n" + "AppleDouble for file %s / %s: resource fork length: %d\n" (Fspath.toDebugString dataFspath) (Path.toString dataPath) (Int64.to_int rsrcLength)); let finfo = @@ -339,7 +339,7 @@ let setFileInfos dataFspath dataPath finfo = assert (finfo <> ""); - Util.convertUnixErrorsToTransient "setting file informations" (fun () -> + Util.convertUnixErrorsToTransient "setting file information" (fun () -> try let p = Fspath.toSysPath (Fspath.concat dataFspath dataPath) in let (fullFinfo, _) = getFileInfosInternal p false in @@ -391,7 +391,7 @@ in (* Apparently, for compatibility with various old versions of Mac OS X that did not follow the AppleDouble specification, - we have to include a dummy ressource fork... + we have to include a dummy resource fork... We also put an empty extended attribute section at the end of the finder info section, mimicking the Mac OS X kernel behavior. *) @@ -403,13 +403,13 @@ output_string outch "\000\000\000\009"; (* Finder info *) output_string outch "\000\000\000\050"; (* offset *) output_string outch "\000\000\014\176"; (* length *) - output_string outch "\000\000\000\002"; (* Ressource fork *) + output_string outch "\000\000\000\002"; (* Resource fork *) output_string outch "\000\000\014\226"; (* offset *) output_string outch "\000\000\001\030"; (* length *) output_string outch (insertInfo (emptyFinderInfo ()) finfo); output_string outch (empty_attribute_chunk ()); (* extended attributes *) - output_string outch empty_ressource_fork; + output_string outch empty_resource_fork; close_out outch) (fun () -> close_out_noerr outch) end @@ -458,7 +458,7 @@ Fingerprint.file fspath (ressPath path) | AppleDoubleRess (_, _, _, len, (path, offset)) -> debug (fun () -> - Util.msg "ressource fork fingerprint: path %s, offset %d, len %d" + Util.msg "resource fork fingerprint: path %s, offset %d, len %d" (Fspath.toString path) (Int64.to_int offset) (Uutil.Filesize.toInt len)); Fingerprint.subfile path offset len Modified: trunk/src/strings.ml =================================================================== --- trunk/src/strings.ml 2011-04-21 17:59:42 UTC (rev 474) +++ trunk/src/strings.ml 2011-07-17 13:24:13 UTC (rev 475) @@ -2783,7 +2783,7 @@ \032 and is not slowed done due to the connection latency anymore\n\ \032 + we get performance improvement for small files as well by\n\ \032 scheduling many files simultaneously (as scheduling a file\n\ - \032 for transfer consume little ressource: it does not mean\n\ + \032 for transfer consume little resource: it does not mean\n\ \032 allocating a large buffer anymore)\n\ \032 * Changes to the internal implementation of the rsync algorithm:\n\ \032 + use longer blocks for large files (the size of a block is the\n\ Modified: trunk/src/transfer.ml =================================================================== --- trunk/src/transfer.ml 2011-04-21 17:59:42 UTC (rev 474) +++ trunk/src/transfer.ml 2011-07-17 13:24:13 UTC (rev 475) @@ -103,7 +103,7 @@ type tokenQueue = { mutable data : Bytearray.t; (* the queued tokens *) mutable previous : [`Str of int | `Block of int | `None]; - (* some informations about the + (* some information about the previous token *) mutable pos : int; (* head of the queue *) mutable prog : int; (* the size of the data they represent *) Modified: trunk/src/transfer.mli =================================================================== --- trunk/src/transfer.mli 2011-04-21 17:59:42 UTC (rev 474) +++ trunk/src/transfer.mli 2011-07-17 13:24:13 UTC (rev 475) @@ -80,7 +80,7 @@ (* Expected size of the [rsync_block_info] datastructure (in KiB). *) val memoryFootprint : Uutil.Filesize.t -> Uutil.Filesize.t -> int - (* Compute block informations from the old file *) + (* Compute block information from the old file *) val rsyncPreprocess : in_channel (* old file descriptor *) -> Uutil.Filesize.t (* source file length *) @@ -98,7 +98,7 @@ (*** SOURCE HOST ***) - (* Using block informations, parse the new file and send transfer + (* Using block information, parse the new file and send transfer instructions accordingly *) val rsyncCompress : rsync_block_info Modified: trunk/src/transport.ml =================================================================== --- trunk/src/transport.ml 2011-04-21 17:59:42 UTC (rev 474) +++ trunk/src/transport.ml 2011-07-17 13:24:13 UTC (rev 475) @@ -80,7 +80,7 @@ let doAction fromRoot fromPath fromContents toRoot toPath toContents id = (* When streaming, we can transfer many file simultaneously: as the contents of only one file is transferred in one direction - at any time, little ressource is consumed this way. *) + at any time, little resource is consumed this way. *) let limit = let n = Prefs.read maxthreads in if n > 0 then n else Modified: trunk/src/update.ml =================================================================== --- trunk/src/update.ml 2011-04-21 17:59:42 UTC (rev 474) +++ trunk/src/update.ml 2011-07-17 13:24:13 UTC (rev 475) @@ -1323,6 +1323,11 @@ Some newarch, checkPropChange newDesc archive archDesc end else begin debug (fun() -> Util.msg " Updated file\n"); + (* [BCP 5/2011] We might add a sanity check here: if the file contents + have changed but the modtime has not, signal an error. I.e., abort if + Props.same_time info.Fileinfo.desc archDesc + is true at this point. + *) None, Updates (File (newDesc, ContentsUpdated (newFp, newStamp, newRess)), oldInfoOf archive) @@ -1771,7 +1776,7 @@ 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 - the device has not changed. This check allows us to abort in case + the device has not changed. This check would allow us to abort in case the root is on a removable device and this device gets removed during update detection, causing all the files to appear to have been deleted. --BCP 2006 *) From bcpierce at cis.upenn.edu Sun Jul 17 09:34:30 2011 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Sun, 17 Jul 2011 09:34:30 -0400 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> Message-ID: <225F309B-08EB-417D-8BF7-0520694BC910@cis.upenn.edu> Aha: ~/current/unison/trunk/src> file uimacnew/Growl.framework/Growl uimacnew/Growl.framework/Growl: Mach-O universal binary with 2 architectures uimacnew/Growl.framework/Growl (for architecture ppc): Mach-O dynamically linked shared library ppc uimacnew/Growl.framework/Growl (for architecture i386): Mach-O dynamically linked shared library i386 I also see that the uimacnew09 GUI already has a new enough Growl framework installed -- perhaps we should make that the default build anyway? - B On Jul 17, 2011, at 5:08 AM, Alan Schmitt wrote: > On Sun, Jul 17, 2011 at 4:27 AM, Benjamin C. Pierce > wrote: >> Dear Unison-on-OSX hackers, >> >> I normally use Unison in text mode so I don't know how long this has been the case, but I don't seem to be able to compile the GUI on my OSX box at the moment. Can anyone diagnose the following? > > It's working here. When I check for the library, it seems that x64 is > present: (from the src directory) > ? src file uimacnew/Growl.framework/Growl > uimacnew/Growl.framework/Growl: Mach-O universal binary with 3 architectures > uimacnew/Growl.framework/Growl (for architecture x86_64): Mach-O > 64-bit dynamically linked shared library x86_64 > uimacnew/Growl.framework/Growl (for architecture i386): Mach-O > dynamically linked shared library i386 > uimacnew/Growl.framework/Growl (for architecture ppc): Mach-O > dynamically linked shared library ppc > > Could you try this on your side? > > If you're missing x64, then we need to upgrade the Growl framework in the svn. > > Alan > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From bcpierce at cis.upenn.edu Sun Jul 17 09:40:35 2011 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Sun, 17 Jul 2011 09:40:35 -0400 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: <225F309B-08EB-417D-8BF7-0520694BC910@cis.upenn.edu> References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> <225F309B-08EB-417D-8BF7-0520694BC910@cis.upenn.edu> Message-ID: > I also see that the uimacnew09 GUI already has a new enough Growl framework installed -- perhaps we should make that the default build anyway? ... except that can already I see one significant defect: when I invoke the GUI from the command line with /path/to/executable profilename it segfaults (which the uimacnew version does not). Wonder why... - B > > - B > > > > On Jul 17, 2011, at 5:08 AM, Alan Schmitt wrote: > >> On Sun, Jul 17, 2011 at 4:27 AM, Benjamin C. Pierce >> wrote: >>> Dear Unison-on-OSX hackers, >>> >>> I normally use Unison in text mode so I don't know how long this has been the case, but I don't seem to be able to compile the GUI on my OSX box at the moment. Can anyone diagnose the following? >> >> It's working here. When I check for the library, it seems that x64 is >> present: (from the src directory) >> ? src file uimacnew/Growl.framework/Growl >> uimacnew/Growl.framework/Growl: Mach-O universal binary with 3 architectures >> uimacnew/Growl.framework/Growl (for architecture x86_64): Mach-O >> 64-bit dynamically linked shared library x86_64 >> uimacnew/Growl.framework/Growl (for architecture i386): Mach-O >> dynamically linked shared library i386 >> uimacnew/Growl.framework/Growl (for architecture ppc): Mach-O >> dynamically linked shared library ppc >> >> Could you try this on your side? >> >> If you're missing x64, then we need to upgrade the Growl framework in the svn. >> >> Alan >> _______________________________________________ >> Unison-hackers mailing list >> Unison-hackers at lists.seas.upenn.edu >> http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From lukas.reichlin at gmail.com Sun Jul 17 09:54:09 2011 From: lukas.reichlin at gmail.com (Lukas Reichlin) Date: Sun, 17 Jul 2011 15:54:09 +0200 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> Message-ID: On 17.07.2011, at 11:10, Alan Schmitt wrote: > On Sun, Jul 17, 2011 at 8:54 AM, Lukas Reichlin > wrote: >> I'm experiencing the same problem. UISTYLE=text works flawlessly but macnew and macnew09 don't. The error messages are at the end of this mail. My machine is a Core i5 iMac running Mac OS X 10.6.8. I installed Ocaml 3.12.1 from MacPorts and XCode 3.2.6. Help would be much appreciated! > > This is a different problem, probably related to this bug: > http://caml.inria.fr/mantis/view.php?id=5247 > > You need to find where libcamlstr.a is, and symlink libstr.a to > libcamlstr.a in the same directory. > > Hope this helps, > > Alan Thanks for your quick reply, Alan. I adapted the line sudo ln /usr/local/lib/ocaml/libcamlstr.a /usr/local/lib/ocaml/libstr.a to sudo ln /opt/local/lib/ocaml/libcamlstr.a /opt/local/lib/ocaml/libstr.a in order to reflect MacPorts' location. Now I'm getting another error message: Ld build/Default/Unison.app/Contents/MacOS/Unison normal i386 cd /Users/lukas/Desktop/unison-2.40.63/uimacnew setenv MACOSX_DEPLOYMENT_TARGET 10.5 /Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/lukas/Desktop/unison-2.40.63/uimacnew/build/Default -F/Users/lukas/Desktop/unison-2.40.63/uimacnew/build/Default -F/Users/lukas/Desktop/unison-2.40.63/uimacnew -filelist /Users/lukas/Desktop/unison-2.40.63/uimacnew/build/uimacnew.build/Default/uimac.build/Objects-normal/i386/Unison.LinkFileList -mmacosx-version-min=10.5 -L/opt/local/lib/ocaml -lunix -lthreadsnat -lstr -lbigarray -lasmrun -framework Cocoa -framework Security -framework Growl -framework ExceptionHandling /Users/lukas/Desktop/unison-2.40.63/uimacnew/../unison-blob.o -o /Users/lukas/Desktop/unison-2.40.63/uimacnew/build/Default/Unison.app/Contents/MacOS/Unison ld: warning: in /opt/local/lib/ocaml/libunix.a, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /opt/local/lib/ocaml/libthreadsnat.a, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /opt/local/lib/ocaml/libstr.a, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /opt/local/lib/ocaml/libbigarray.a, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /opt/local/lib/ocaml/libasmrun.a, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /Users/lukas/Desktop/unison-2.40.63/uimacnew/../unison-blob.o, file was built for unsupported file format which is not the architecture being linked (i386) Undefined symbols: "_caml_callback2_exn", referenced from: _bridgeThreadWait in Bridge.o _bridgeThreadWait in Bridge.o "_caml_remove_global_root", referenced from: -[OCamlValue dealloc] in Bridge.o "_caml_startup", referenced from: -[Bridge _ocamlStartup:] in Bridge.o "_caml_callback_exn", referenced from: -[Bridge _ocamlStartup:] in Bridge.o _bridgeThreadWait in Bridge.o _bridgeThreadWait in Bridge.o "_caml_callback", referenced from: _bridgeThreadWait in Bridge.o "_caml_local_roots", referenced from: _caml_local_roots$non_lazy_ptr in Bridge.o (maybe you meant: _caml_local_roots$non_lazy_ptr) "_caml_callback3_exn", referenced from: _bridgeThreadWait in Bridge.o _bridgeThreadWait in Bridge.o "_caml_enter_blocking_section", referenced from: _bridgeThreadWait in Bridge.o "_caml_copy_string", referenced from: _bridgeThreadWait in Bridge.o "_caml_alloc_tuple", referenced from: _bridgeThreadWait in Bridge.o "_caml_modify", referenced from: _bridgeThreadWait in Bridge.o _bridgeThreadWait in Bridge.o "_caml_named_value", referenced from: -[Bridge _ocamlStartup:] in Bridge.o _bridgeThreadWait in Bridge.o _bridgeThreadWait in Bridge.o "_caml_leave_blocking_section", referenced from: _bridgeThreadWait in Bridge.o "_caml_register_global_root", referenced from: -[OCamlValue initWithValue:] in Bridge.o ld: symbol(s) not found collect2: ld returned 1 exit status PBXCp build/Default/Unison.app/Contents/Frameworks/Growl.framework Growl.framework cd /Users/lukas/Desktop/unison-2.40.63/uimacnew /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -strip-debug-symbols -resolve-src-symlinks /Users/lukas/Desktop/unison-2.40.63/uimacnew/Growl.framework /Users/lukas/Desktop/unison-2.40.63/uimacnew/build/Default/Unison.app/Contents/Frameworks ** BUILD FAILED ** The following build commands failed: uimac: Ld /Users/lukas/Desktop/unison-2.40.63/uimacnew/build/Default/Unison.app/Contents/MacOS/Unison normal i386 (1 failure) make: *** [macexecutable] Error 1 Do I need a different OCaml build? Best regards, Lukas From alan.schmitt at polytechnique.org Sun Jul 17 10:27:20 2011 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Sun, 17 Jul 2011 16:27:20 +0200 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> <225F309B-08EB-417D-8BF7-0520694BC910@cis.upenn.edu> Message-ID: On Sun, Jul 17, 2011 at 3:40 PM, Benjamin C. Pierce wrote: >> I also see that the uimacnew09 GUI already has a new enough Growl framework installed -- perhaps we should make that the default build anyway? > > ... except that can already I see one significant defect: when I invoke the GUI from the command line with > > ? ?/path/to/executable profilename > > it segfaults (which the uimacnew version does not). ?Wonder why... I can reproduce the crash (which I hadn't seen before as I never call unison this way). I'm not sure it's a "uimacnew09" problem: I just compiled a 2.40 uimacnew09, and it works as expected. So the change is somewhere between 2.40 and the trunk. Alan From alan.schmitt at polytechnique.org Sun Jul 17 10:32:01 2011 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Sun, 17 Jul 2011 16:32:01 +0200 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> Message-ID: On Sun, Jul 17, 2011 at 3:54 PM, Lukas Reichlin wrote: > Do I need a different OCaml build? No, you just need to specify that you want an x86_64 build of Unison (as it seems you have a x64 ocaml). There may be a way to do it on the command line, but the simplest is to: - cd src/uimacnew - open uimacnew.xcodeproj - go to "Project -> Edit Project Settings" - under "Architectures", choose "64-bit Intel" This should work when you try to recompile. Alan From alan.schmitt at polytechnique.org Sun Jul 17 10:56:48 2011 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Sun, 17 Jul 2011 16:56:48 +0200 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> <225F309B-08EB-417D-8BF7-0520694BC910@cis.upenn.edu> Message-ID: On Sun, Jul 17, 2011 at 4:27 PM, Alan Schmitt wrote: > I can reproduce the crash (which I hadn't seen before as I never call > unison this way). I'm not sure it's a "uimacnew09" problem: I just > compiled a 2.40 uimacnew09, and it works as expected. So the change is > somewhere between 2.40 and the trunk. And I was the one who did the commit that broke this. To fix it, change line 112 of MyController.m from: BOOL areRootsSet = (long)ocamlCall("i@", "areRootsSet") ? YES : NO; into BOOL areRootsSet = (long)ocamlCall("i", "areRootsSet") ? YES : NO; (I have no idea how it could work before.) Please let me know if it fixes the problem on your side. Alan From lukas.reichlin at gmail.com Sun Jul 17 10:57:04 2011 From: lukas.reichlin at gmail.com (Lukas Reichlin) Date: Sun, 17 Jul 2011 16:57:04 +0200 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> Message-ID: On 17.07.2011, at 16:32, Alan Schmitt wrote: > On Sun, Jul 17, 2011 at 3:54 PM, Lukas Reichlin > wrote: >> Do I need a different OCaml build? > > No, you just need to specify that you want an x86_64 build of Unison > (as it seems you have a x64 ocaml). There may be a way to do it on the > command line, but the simplest is to: > - cd src/uimacnew > - open uimacnew.xcodeproj > - go to "Project -> Edit Project Settings" > - under "Architectures", choose "64-bit Intel" > > This should work when you try to recompile. > > Alan Thanks, that helped! When I tried UISTYLE=macnew, I got the same problem as Benjamin with Growl and 64 bits. But UISTYLE=macnew09 works perfectly and macnew09 is the Unison flavour I'd like to have. I also set the Base SDK to 10.6. Sync you very much for your help ;-) Best regards Lukas From bcpierce at cis.upenn.edu Sun Jul 17 12:35:15 2011 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Sun, 17 Jul 2011 12:35:15 -0400 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> <225F309B-08EB-417D-8BF7-0520694BC910@cis.upenn.edu> Message-ID: <803C384B-558A-4576-B7CE-8DFC04CF3889@cis.upenn.edu> Yes, that works -- thanks! One last question: I don't think the OSX GUI has ever supported the -batch preference, but I'd love to see it work that way -- i.e., if -batch is set, then go immediately from update detection / reconciliation to change propagation (and, at the end of the run, automatically terminate, perhaps after pausing a few seconds). Would this be an easy change for an OSX hacker...? - B On Jul 17, 2011, at 10:56 AM, Alan Schmitt wrote: > On Sun, Jul 17, 2011 at 4:27 PM, Alan Schmitt > wrote: >> I can reproduce the crash (which I hadn't seen before as I never call >> unison this way). I'm not sure it's a "uimacnew09" problem: I just >> compiled a 2.40 uimacnew09, and it works as expected. So the change is >> somewhere between 2.40 and the trunk. > > And I was the one who did the commit that broke this. To fix it, > change line 112 of MyController.m from: > BOOL areRootsSet = (long)ocamlCall("i@", "areRootsSet") ? YES : NO; > into > BOOL areRootsSet = (long)ocamlCall("i", "areRootsSet") ? YES : NO; > > (I have no idea how it could work before.) > > Please let me know if it fixes the problem on your side. > > 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 Sun Jul 17 14:25:06 2011 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Sun, 17 Jul 2011 20:25:06 +0200 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: <803C384B-558A-4576-B7CE-8DFC04CF3889@cis.upenn.edu> References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> <225F309B-08EB-417D-8BF7-0520694BC910@cis.upenn.edu> <803C384B-558A-4576-B7CE-8DFC04CF3889@cis.upenn.edu> Message-ID: This is what I tried to do: - detect the -batch on the command line - if -batch was set, when update recognition is done, automatically start the sync without waiting for the user This means that doing a "-batch" without choosing the profile will open the profile window, then after update detection (i.e., after choosing the profile), the synchronization will automatically proceed. Here are the diffs. If you prefer that I do the commit myself, could you remind me the procedure? (I remember it's not just a "svn commit" ...) Alan ? src svn diff uimacbridgenew.ml Index: uimacbridgenew.ml =================================================================== --- uimacbridgenew.ml (revision 474) +++ uimacbridgenew.ml (working copy) @@ -142,11 +142,16 @@ initGlobalProgress Uutil.Filesize.dummy; (* Make sure we have a directory for archives and profiles *) Os.createUnisonDir(); - (* Extract any command line profile or roots *) + (* Extract any command line profile or roots, and whether batch was set *) let clprofile = ref None in begin + let args = Prefs.scanCmdLine Uicommon.usageMsg in + (try + match Util.StringMap.find "batch" args with + | ["true"] -> Prefs.set Globals.batch true + | _ -> () + with Not_found -> ()); try - let args = Prefs.scanCmdLine Uicommon.usageMsg in match Util.StringMap.find "rest" args with [] -> () | [profile] -> clprofile := Some profile @@ -196,7 +201,13 @@ ;; Callback.register "areRootsSet" areRootsSet;; +(* Utility function to tell the UI whether -batch is set *) +let isBatchSet () = + Prefs.read Globals.batch +;; +Callback.register "isBatchSet" isBatchSet;; + (* The first time we load preferences, we also read the command line arguments; if we re-load prefs (because the user selected a new profile) we ignore the command line *) ? src svn diff uimacnew09/MyController.m Index: uimacnew09/MyController.m =================================================================== --- uimacnew09/MyController.m (revision 474) +++ uimacnew09/MyController.m (working copy) @@ -109,15 +109,15 @@ /* Command-line processing */ OCamlValue *clprofile = (id)ocamlCall("@", "unisonInit0"); - BOOL areRootsSet = (long)ocamlCall("i@", "areRootsSet") ? YES : NO; + + BOOL areRootsSet = (long)ocamlCall("i", "areRootsSet") ? YES : NO; if (areRootsSet) { NSLog(@"Roots are on the command line"); } else { NSLog(@"Roots are not set on the command line"); } - - + /* Add toolbar */ toolbar = [[[UnisonToolbar alloc] initWithIdentifier: @"unisonToolbar" :self :tableView] autorelease]; @@ -166,12 +166,12 @@ [mainWindow display]; [mainWindow makeKeyAndOrderFront:nil]; - + /* unless user has clicked Don't ask me again, ask about cltool */ - if ( ([[NSUserDefaults standardUserDefaults] boolForKey:@"CheckCltool"]) && - (![[NSFileManager defaultManager] - fileExistsAtPath:@"/usr/bin/unison"]) ) - [self raiseCltoolWindow:nil]; + if ( ([[NSUserDefaults standardUserDefaults] boolForKey:@"CheckCltool"]) && + (![[NSFileManager defaultManager] + fileExistsAtPath:@"/usr/bin/unison"]) ) + [self raiseCltoolWindow:nil]; } - (IBAction) checkOpenProfileChanged:(id)sender { @@ -539,7 +539,25 @@ ocamlCall("x", "unisonInit2"); } +- (void)doSync +{ + [tableView setEditable:NO]; + syncable = NO; + duringSync = YES; + + [self updateToolbar]; + + // This will run in another thread spawned in OCaml and will return immediately + // We'll get a call back to syncComplete() when it is complete + ocamlCall("x", "unisonSynchronize"); +} +- (IBAction)syncButton:(id)sender +{ + [self doSync]; +} + + - (void)afterUpdate:(id)retainedReconItems { // NSLog(@"In afterUpdate:..."); @@ -566,6 +584,17 @@ [self updateTableViewWithReset:([reconItems count] > 0)]; [self updateToolbar]; + BOOL isBatchSet = (long)ocamlCall("i", "isBatchSet") ? YES : NO; + if (isBatchSet) { + NSLog(@"batch set on the command line"); + } + else { + NSLog(@"batch not set on the command line"); + } + + if (isBatchSet) { + [self doSync]; + } } CAMLprim value unisonInit2Complete(value v) @@ -576,19 +605,6 @@ return Val_unit; } -- (IBAction)syncButton:(id)sender -{ - [tableView setEditable:NO]; - syncable = NO; - duringSync = YES; - - [self updateToolbar]; - - // This will run in another thread spawned in OCaml and will return immediately - // We'll get a call back to syncComplete() when it is complete - ocamlCall("x", "unisonSynchronize"); -} - - (void)afterSync:(id)ignore { [notificationController syncFinishedFor:[self profile]]; From bcpierce at cis.upenn.edu Sun Jul 17 15:26:29 2011 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Sun, 17 Jul 2011 15:26:29 -0400 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> <225F309B-08EB-417D-8BF7-0520694BC910@cis.upenn.edu> <803C384B-558A-4576-B7CE-8DFC04CF3889@cis.upenn.edu> Message-ID: <7369D945-2AA6-4BF9-BA66-B4FF7CFBB0E3@cis.upenn.edu> Very cool. :-) To commit the changes yourself, create a file "logmsg" in the main directory (one up from src), then do "make checkin." - B P.S. Not sure whether this bit is needed... > + (* Extract any command line profile or roots, and whether batch was set *) > let clprofile = ref None in > begin > + let args = Prefs.scanCmdLine Uicommon.usageMsg in > + (try > + match Util.StringMap.find "batch" args with > + | ["true"] -> Prefs.set Globals.batch true > + | _ -> () > + with Not_found -> ()); ... since -batch doesn't make much sense without also giving either two roots or a profile on the command line. On Jul 17, 2011, at 2:25 PM, Alan Schmitt wrote: > This is what I tried to do: > - detect the -batch on the command line > - if -batch was set, when update recognition is done, automatically > start the sync without waiting for the user > > This means that doing a "-batch" without choosing the profile will > open the profile window, then after update detection (i.e., after > choosing the profile), the synchronization will automatically proceed. > > Here are the diffs. If you prefer that I do the commit myself, could > you remind me the procedure? (I remember it's not just a "svn commit" > ...) > > Alan > > ? src svn diff uimacbridgenew.ml > Index: uimacbridgenew.ml > =================================================================== > --- uimacbridgenew.ml (revision 474) > +++ uimacbridgenew.ml (working copy) > @@ -142,11 +142,16 @@ > initGlobalProgress Uutil.Filesize.dummy; > (* Make sure we have a directory for archives and profiles *) > Os.createUnisonDir(); > - (* Extract any command line profile or roots *) > + (* Extract any command line profile or roots, and whether batch was set *) > let clprofile = ref None in > begin > + let args = Prefs.scanCmdLine Uicommon.usageMsg in > + (try > + match Util.StringMap.find "batch" args with > + | ["true"] -> Prefs.set Globals.batch true > + | _ -> () > + with Not_found -> ()); > try > - let args = Prefs.scanCmdLine Uicommon.usageMsg in > match Util.StringMap.find "rest" args with > [] -> () > | [profile] -> clprofile := Some profile > @@ -196,7 +201,13 @@ > ;; > Callback.register "areRootsSet" areRootsSet;; > > +(* Utility function to tell the UI whether -batch is set *) > > +let isBatchSet () = > + Prefs.read Globals.batch > +;; > +Callback.register "isBatchSet" isBatchSet;; > + > (* The first time we load preferences, we also read the command line > arguments; if we re-load prefs (because the user selected a new profile) > we ignore the command line *) > > > ? src svn diff uimacnew09/MyController.m > Index: uimacnew09/MyController.m > =================================================================== > --- uimacnew09/MyController.m (revision 474) > +++ uimacnew09/MyController.m (working copy) > @@ -109,15 +109,15 @@ > > /* Command-line processing */ > OCamlValue *clprofile = (id)ocamlCall("@", "unisonInit0"); > - BOOL areRootsSet = (long)ocamlCall("i@", "areRootsSet") ? YES : NO; > + > + BOOL areRootsSet = (long)ocamlCall("i", "areRootsSet") ? YES : NO; > if (areRootsSet) { > NSLog(@"Roots are on the command line"); > } > else { > NSLog(@"Roots are not set on the command line"); > } > - > - > + > /* Add toolbar */ > toolbar = [[[UnisonToolbar alloc] > initWithIdentifier: @"unisonToolbar" :self :tableView] > autorelease]; > @@ -166,12 +166,12 @@ > > [mainWindow display]; > [mainWindow makeKeyAndOrderFront:nil]; > - > + > /* unless user has clicked Don't ask me again, ask about cltool */ > - if ( ([[NSUserDefaults standardUserDefaults] boolForKey:@"CheckCltool"]) && > - (![[NSFileManager defaultManager] > - fileExistsAtPath:@"/usr/bin/unison"]) ) > - [self raiseCltoolWindow:nil]; > + if ( ([[NSUserDefaults standardUserDefaults] boolForKey:@"CheckCltool"]) && > + (![[NSFileManager defaultManager] > + fileExistsAtPath:@"/usr/bin/unison"]) ) > + [self raiseCltoolWindow:nil]; > } > > - (IBAction) checkOpenProfileChanged:(id)sender { > @@ -539,7 +539,25 @@ > ocamlCall("x", "unisonInit2"); > } > > +- (void)doSync > +{ > + [tableView setEditable:NO]; > + syncable = NO; > + duringSync = YES; > + > + [self updateToolbar]; > + > + // This will run in another thread spawned in OCaml and will return > immediately > + // We'll get a call back to syncComplete() when it is complete > + ocamlCall("x", "unisonSynchronize"); > +} > > +- (IBAction)syncButton:(id)sender > +{ > + [self doSync]; > +} > + > + > - (void)afterUpdate:(id)retainedReconItems > { > // NSLog(@"In afterUpdate:..."); > @@ -566,6 +584,17 @@ > > [self updateTableViewWithReset:([reconItems count] > 0)]; > [self updateToolbar]; > + BOOL isBatchSet = (long)ocamlCall("i", "isBatchSet") ? YES : NO; > + if (isBatchSet) { > + NSLog(@"batch set on the command line"); > + } > + else { > + NSLog(@"batch not set on the command line"); > + } > + > + if (isBatchSet) { > + [self doSync]; > + } > } > > CAMLprim value unisonInit2Complete(value v) > @@ -576,19 +605,6 @@ > return Val_unit; > } > > -- (IBAction)syncButton:(id)sender > -{ > - [tableView setEditable:NO]; > - syncable = NO; > - duringSync = YES; > - > - [self updateToolbar]; > - > - // This will run in another thread spawned in OCaml and will return > immediately > - // We'll get a call back to syncComplete() when it is complete > - ocamlCall("x", "unisonSynchronize"); > -} > - > - (void)afterSync:(id)ignore > { > [notificationController syncFinishedFor:[self profile]]; > _______________________________________________ > 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 Sun Jul 17 15:38:57 2011 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Sun, 17 Jul 2011 21:38:57 +0200 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: <7369D945-2AA6-4BF9-BA66-B4FF7CFBB0E3@cis.upenn.edu> References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> <225F309B-08EB-417D-8BF7-0520694BC910@cis.upenn.edu> <803C384B-558A-4576-B7CE-8DFC04CF3889@cis.upenn.edu> <7369D945-2AA6-4BF9-BA66-B4FF7CFBB0E3@cis.upenn.edu> Message-ID: On Sun, Jul 17, 2011 at 9:26 PM, Benjamin C. Pierce wrote: > P.S. ?Not sure whether this bit is needed... > >> + ?(* Extract any command line profile or roots, and whether batch was set *) >> ? let clprofile = ref None in >> ? begin >> + ? ?let args = Prefs.scanCmdLine Uicommon.usageMsg in >> + ? ?(try >> + ? ? ?match Util.StringMap.find "batch" args with >> + ? ? | ["true"] -> Prefs.set Globals.batch true >> + ? ? | _ -> () >> + ? ?with Not_found -> ()); > > ... since -batch doesn't make much sense without also giving either two roots or a profile on the command line. I'll work on this logic either tonight or later next week (I'm traveling tomorrow). I'll make sure "batch" only has an effect when either roots or a profile are sate. Alan From bcpierce at cis.upenn.edu Sun Jul 17 16:23:53 2011 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Sun, 17 Jul 2011 16:23:53 -0400 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> <225F309B-08EB-417D-8BF7-0520694BC910@cis.upenn.edu> <803C384B-558A-4576-B7CE-8DFC04CF3889@cis.upenn.edu> <7369D945-2AA6-4BF9-BA66-B4FF7CFBB0E3@cis.upenn.edu> Message-ID: <5BDC9976-C3CD-47DE-974A-A470466FED5B@cis.upenn.edu> I don't think this hurts anything -- just probably not needed. - B On Jul 17, 2011, at 3:38 PM, Alan Schmitt wrote: > On Sun, Jul 17, 2011 at 9:26 PM, Benjamin C. Pierce > wrote: >> P.S. Not sure whether this bit is needed... >> >>> + (* Extract any command line profile or roots, and whether batch was set *) >>> let clprofile = ref None in >>> begin >>> + let args = Prefs.scanCmdLine Uicommon.usageMsg in >>> + (try >>> + match Util.StringMap.find "batch" args with >>> + | ["true"] -> Prefs.set Globals.batch true >>> + | _ -> () >>> + with Not_found -> ()); >> >> ... since -batch doesn't make much sense without also giving either two roots or a profile on the command line. > > I'll work on this logic either tonight or later next week (I'm > traveling tomorrow). I'll make sure "batch" only has an effect when > either roots or a profile are sate. > > 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 Mon Jul 18 04:10:22 2011 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Mon, 18 Jul 2011 10:10:22 +0200 Subject: [Unison-hackers] Building Unison GUI on OSX 10.6 In-Reply-To: <5BDC9976-C3CD-47DE-974A-A470466FED5B@cis.upenn.edu> References: <4C1C20A0-F99A-4565-A064-9BC830F3ACA5@cis.upenn.edu> <225F309B-08EB-417D-8BF7-0520694BC910@cis.upenn.edu> <803C384B-558A-4576-B7CE-8DFC04CF3889@cis.upenn.edu> <7369D945-2AA6-4BF9-BA66-B4FF7CFBB0E3@cis.upenn.edu> <5BDC9976-C3CD-47DE-974A-A470466FED5B@cis.upenn.edu> Message-ID: On Sun, Jul 17, 2011 at 10:23 PM, Benjamin C. Pierce wrote: > I don't think this hurts anything -- just probably not needed. You're definitely right, I had not understood that the command line is parsed later one (during unisonInit1, right before connecting). Alan From schmitta at seas.upenn.edu Mon Jul 18 04:15:02 2011 From: schmitta at seas.upenn.edu (schmitta at seas.upenn.edu) Date: Mon, 18 Jul 2011 04:15:02 -0400 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj Message-ID: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> Author: schmitta Date: 2011-07-18 04:15:01 -0400 (Mon, 18 Jul 2011) New Revision: 476 Modified: trunk/src/RECENTNEWS trunk/src/lwt/depend trunk/src/mkProjectInfo.ml trunk/src/ubase/depend trunk/src/uimacbridgenew.ml trunk/src/uimacnew09/MyController.m trunk/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj Log: - fixed a bug when calling the Unison macnew09 GUI from the command line with a profile specified - now possible to use the "-batch" option when calling the macnew09 GUI on the command line Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2011-07-17 13:24:13 UTC (rev 475) +++ trunk/src/RECENTNEWS 2011-07-18 08:15:01 UTC (rev 476) @@ -1,3 +1,9 @@ +CHANGES FROM VERSION 2.44.4 + +- fixed a bug when calling the Unison macnew09 GUI from the command line with a profile specified +- now possible to use the "-batch" option when calling the macnew09 GUI on the command line + +------------------------------- CHANGES FROM VERSION 2.44.2 * Some spelling corrections in documentation and comments from Stephane Glondu Modified: trunk/src/lwt/depend =================================================================== --- trunk/src/lwt/depend 2011-07-17 13:24:13 UTC (rev 475) +++ trunk/src/lwt/depend 2011-07-18 08:15:01 UTC (rev 476) @@ -1,12 +1,12 @@ -lwt.cmo: lwt.cmi -lwt.cmx: lwt.cmi -lwt_unix.cmo: lwt_unix.cmi -lwt_unix.cmx: lwt_unix.cmi -lwt_util.cmo: lwt.cmi lwt_util.cmi -lwt_util.cmx: lwt.cmx lwt_util.cmi -pqueue.cmo: pqueue.cmi -pqueue.cmx: pqueue.cmi -lwt.cmi: -lwt_unix.cmi: lwt.cmi -lwt_util.cmi: lwt.cmi -pqueue.cmi: +lwt.cmo: lwt.cmi +lwt.cmx: lwt.cmi +lwt_unix.cmo: lwt_unix.cmi +lwt_unix.cmx: lwt_unix.cmi +lwt_util.cmo: lwt.cmi lwt_util.cmi +lwt_util.cmx: lwt.cmx lwt_util.cmi +pqueue.cmo: pqueue.cmi +pqueue.cmx: pqueue.cmi +lwt.cmi: +lwt_unix.cmi: lwt.cmi +lwt_util.cmi: lwt.cmi +pqueue.cmi: Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2011-07-17 13:24:13 UTC (rev 475) +++ trunk/src/mkProjectInfo.ml 2011-07-18 08:15:01 UTC (rev 476) @@ -57,3 +57,4 @@ + Modified: trunk/src/ubase/depend =================================================================== --- trunk/src/ubase/depend 2011-07-17 13:24:13 UTC (rev 475) +++ trunk/src/ubase/depend 2011-07-18 08:15:01 UTC (rev 476) @@ -1,27 +1,27 @@ -myMap.cmo: myMap.cmi -myMap.cmx: myMap.cmi -prefs.cmo: util.cmi uarg.cmi safelist.cmi prefs.cmi -prefs.cmx: util.cmx uarg.cmx safelist.cmx prefs.cmi -proplist.cmo: util.cmi proplist.cmi -proplist.cmx: util.cmx proplist.cmi -rx.cmo: rx.cmi -rx.cmx: rx.cmi -safelist.cmo: safelist.cmi -safelist.cmx: safelist.cmi -trace.cmo: util.cmi safelist.cmi prefs.cmi trace.cmi -trace.cmx: util.cmx safelist.cmx prefs.cmx trace.cmi -uarg.cmo: util.cmi safelist.cmi uarg.cmi -uarg.cmx: util.cmx safelist.cmx uarg.cmi -uprintf.cmo: uprintf.cmi -uprintf.cmx: uprintf.cmi -util.cmo: uprintf.cmi safelist.cmi util.cmi -util.cmx: uprintf.cmx safelist.cmx util.cmi -myMap.cmi: -prefs.cmi: util.cmi -proplist.cmi: -rx.cmi: -safelist.cmi: -trace.cmi: prefs.cmi -uarg.cmi: -uprintf.cmi: -util.cmi: +myMap.cmo: myMap.cmi +myMap.cmx: myMap.cmi +prefs.cmo: util.cmi uarg.cmi safelist.cmi prefs.cmi +prefs.cmx: util.cmx uarg.cmx safelist.cmx prefs.cmi +proplist.cmo: util.cmi proplist.cmi +proplist.cmx: util.cmx proplist.cmi +rx.cmo: rx.cmi +rx.cmx: rx.cmi +safelist.cmo: safelist.cmi +safelist.cmx: safelist.cmi +trace.cmo: util.cmi safelist.cmi prefs.cmi trace.cmi +trace.cmx: util.cmx safelist.cmx prefs.cmx trace.cmi +uarg.cmo: util.cmi safelist.cmi uarg.cmi +uarg.cmx: util.cmx safelist.cmx uarg.cmi +uprintf.cmo: uprintf.cmi +uprintf.cmx: uprintf.cmi +util.cmo: uprintf.cmi safelist.cmi util.cmi +util.cmx: uprintf.cmx safelist.cmx util.cmi +myMap.cmi: +prefs.cmi: util.cmi +proplist.cmi: +rx.cmi: +safelist.cmi: +trace.cmi: prefs.cmi +uarg.cmi: +uprintf.cmi: +util.cmi: Modified: trunk/src/uimacbridgenew.ml =================================================================== --- trunk/src/uimacbridgenew.ml 2011-07-17 13:24:13 UTC (rev 475) +++ trunk/src/uimacbridgenew.ml 2011-07-18 08:15:01 UTC (rev 476) @@ -196,7 +196,13 @@ ;; Callback.register "areRootsSet" areRootsSet;; +(* Utility function to tell the UI whether -batch is set *) +let isBatchSet () = + Prefs.read Globals.batch +;; +Callback.register "isBatchSet" isBatchSet;; + (* The first time we load preferences, we also read the command line arguments; if we re-load prefs (because the user selected a new profile) we ignore the command line *) Modified: trunk/src/uimacnew09/MyController.m =================================================================== --- trunk/src/uimacnew09/MyController.m 2011-07-17 13:24:13 UTC (rev 475) +++ trunk/src/uimacnew09/MyController.m 2011-07-18 08:15:01 UTC (rev 476) @@ -109,15 +109,15 @@ /* Command-line processing */ OCamlValue *clprofile = (id)ocamlCall("@", "unisonInit0"); - BOOL areRootsSet = (long)ocamlCall("i@", "areRootsSet") ? YES : NO; + + BOOL areRootsSet = (long)ocamlCall("i", "areRootsSet") ? YES : NO; if (areRootsSet) { NSLog(@"Roots are on the command line"); } else { NSLog(@"Roots are not set on the command line"); } - - + /* Add toolbar */ toolbar = [[[UnisonToolbar alloc] initWithIdentifier: @"unisonToolbar" :self :tableView] autorelease]; @@ -166,12 +166,12 @@ [mainWindow display]; [mainWindow makeKeyAndOrderFront:nil]; - + /* unless user has clicked Don't ask me again, ask about cltool */ - if ( ([[NSUserDefaults standardUserDefaults] boolForKey:@"CheckCltool"]) && - (![[NSFileManager defaultManager] - fileExistsAtPath:@"/usr/bin/unison"]) ) - [self raiseCltoolWindow:nil]; + if ( ([[NSUserDefaults standardUserDefaults] boolForKey:@"CheckCltool"]) && + (![[NSFileManager defaultManager] + fileExistsAtPath:@"/usr/bin/unison"]) ) + [self raiseCltoolWindow:nil]; } - (IBAction) checkOpenProfileChanged:(id)sender { @@ -539,7 +539,25 @@ ocamlCall("x", "unisonInit2"); } +- (void)doSync +{ + [tableView setEditable:NO]; + syncable = NO; + duringSync = YES; + + [self updateToolbar]; + + // This will run in another thread spawned in OCaml and will return immediately + // We'll get a call back to syncComplete() when it is complete + ocamlCall("x", "unisonSynchronize"); +} +- (IBAction)syncButton:(id)sender +{ + [self doSync]; +} + + - (void)afterUpdate:(id)retainedReconItems { // NSLog(@"In afterUpdate:..."); @@ -566,6 +584,17 @@ [self updateTableViewWithReset:([reconItems count] > 0)]; [self updateToolbar]; + BOOL isBatchSet = (long)ocamlCall("i", "isBatchSet") ? YES : NO; + if (isBatchSet) { + NSLog(@"batch set on the command line"); + } + else { + NSLog(@"batch not set on the command line"); + } + + if (isBatchSet) { + [self doSync]; + } } CAMLprim value unisonInit2Complete(value v) @@ -576,19 +605,6 @@ return Val_unit; } -- (IBAction)syncButton:(id)sender -{ - [tableView setEditable:NO]; - syncable = NO; - duringSync = YES; - - [self updateToolbar]; - - // This will run in another thread spawned in OCaml and will return immediately - // We'll get a call back to syncComplete() when it is complete - ocamlCall("x", "unisonSynchronize"); -} - - (void)afterSync:(id)ignore { [notificationController syncFinishedFor:[self profile]]; Modified: trunk/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj =================================================================== --- trunk/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj 2011-07-17 13:24:13 UTC (rev 475) +++ trunk/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj 2011-07-18 08:15:01 UTC (rev 476) @@ -400,7 +400,14 @@ isa = PBXProject; buildConfigurationList = 2A3C3F2C0992245300E404E9 /* Build configuration list for PBXProject "uimacnew" */; compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = 29B97314FDCFA39411CA2CEA /* uimac */; projectDirPath = ""; projectRoot = ""; From bcpierce at cis.upenn.edu Mon Jul 18 10:15:47 2011 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Mon, 18 Jul 2011 10:15:47 -0400 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> Message-ID: <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> Works great! Last question, I promise: Would it be easy to make the GUI kill itself automatically after the sync completes (perhaps pausing for 10 seconds or so first)? (I suppose the right way to do this is a bit more complex -- e.g., show a dialog like the one for system reboot that shows how much time is left before it is automatically accepted and quits the program. I guess it's too much to hope that such a widget would be provided by some library...?) - B On Jul 18, 2011, at 4:15 AM, schmitta at seas.upenn.edu wrote: > Author: schmitta > Date: 2011-07-18 04:15:01 -0400 (Mon, 18 Jul 2011) > New Revision: 476 > > Modified: > trunk/src/RECENTNEWS > trunk/src/lwt/depend > trunk/src/mkProjectInfo.ml > trunk/src/ubase/depend > trunk/src/uimacbridgenew.ml > trunk/src/uimacnew09/MyController.m > trunk/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj > Log: > - fixed a bug when calling the Unison macnew09 GUI from the command line with a profile specified > - now possible to use the "-batch" option when calling the macnew09 GUI on the command line > > > Modified: trunk/src/RECENTNEWS > =================================================================== > --- trunk/src/RECENTNEWS 2011-07-17 13:24:13 UTC (rev 475) > +++ trunk/src/RECENTNEWS 2011-07-18 08:15:01 UTC (rev 476) > @@ -1,3 +1,9 @@ > +CHANGES FROM VERSION 2.44.4 > + > +- fixed a bug when calling the Unison macnew09 GUI from the command line with a profile specified > +- now possible to use the "-batch" option when calling the macnew09 GUI on the command line > + > +------------------------------- > CHANGES FROM VERSION 2.44.2 > > * Some spelling corrections in documentation and comments from Stephane Glondu > > Modified: trunk/src/lwt/depend > =================================================================== > --- trunk/src/lwt/depend 2011-07-17 13:24:13 UTC (rev 475) > +++ trunk/src/lwt/depend 2011-07-18 08:15:01 UTC (rev 476) > @@ -1,12 +1,12 @@ > -lwt.cmo: lwt.cmi > -lwt.cmx: lwt.cmi > -lwt_unix.cmo: lwt_unix.cmi > -lwt_unix.cmx: lwt_unix.cmi > -lwt_util.cmo: lwt.cmi lwt_util.cmi > -lwt_util.cmx: lwt.cmx lwt_util.cmi > -pqueue.cmo: pqueue.cmi > -pqueue.cmx: pqueue.cmi > -lwt.cmi: > -lwt_unix.cmi: lwt.cmi > -lwt_util.cmi: lwt.cmi > -pqueue.cmi: > +lwt.cmo: lwt.cmi > +lwt.cmx: lwt.cmi > +lwt_unix.cmo: lwt_unix.cmi > +lwt_unix.cmx: lwt_unix.cmi > +lwt_util.cmo: lwt.cmi lwt_util.cmi > +lwt_util.cmx: lwt.cmx lwt_util.cmi > +pqueue.cmo: pqueue.cmi > +pqueue.cmx: pqueue.cmi > +lwt.cmi: > +lwt_unix.cmi: lwt.cmi > +lwt_util.cmi: lwt.cmi > +pqueue.cmi: > > Modified: trunk/src/mkProjectInfo.ml > =================================================================== > --- trunk/src/mkProjectInfo.ml 2011-07-17 13:24:13 UTC (rev 475) > +++ trunk/src/mkProjectInfo.ml 2011-07-18 08:15:01 UTC (rev 476) > @@ -57,3 +57,4 @@ > > > > + > > Modified: trunk/src/ubase/depend > =================================================================== > --- trunk/src/ubase/depend 2011-07-17 13:24:13 UTC (rev 475) > +++ trunk/src/ubase/depend 2011-07-18 08:15:01 UTC (rev 476) > @@ -1,27 +1,27 @@ > -myMap.cmo: myMap.cmi > -myMap.cmx: myMap.cmi > -prefs.cmo: util.cmi uarg.cmi safelist.cmi prefs.cmi > -prefs.cmx: util.cmx uarg.cmx safelist.cmx prefs.cmi > -proplist.cmo: util.cmi proplist.cmi > -proplist.cmx: util.cmx proplist.cmi > -rx.cmo: rx.cmi > -rx.cmx: rx.cmi > -safelist.cmo: safelist.cmi > -safelist.cmx: safelist.cmi > -trace.cmo: util.cmi safelist.cmi prefs.cmi trace.cmi > -trace.cmx: util.cmx safelist.cmx prefs.cmx trace.cmi > -uarg.cmo: util.cmi safelist.cmi uarg.cmi > -uarg.cmx: util.cmx safelist.cmx uarg.cmi > -uprintf.cmo: uprintf.cmi > -uprintf.cmx: uprintf.cmi > -util.cmo: uprintf.cmi safelist.cmi util.cmi > -util.cmx: uprintf.cmx safelist.cmx util.cmi > -myMap.cmi: > -prefs.cmi: util.cmi > -proplist.cmi: > -rx.cmi: > -safelist.cmi: > -trace.cmi: prefs.cmi > -uarg.cmi: > -uprintf.cmi: > -util.cmi: > +myMap.cmo: myMap.cmi > +myMap.cmx: myMap.cmi > +prefs.cmo: util.cmi uarg.cmi safelist.cmi prefs.cmi > +prefs.cmx: util.cmx uarg.cmx safelist.cmx prefs.cmi > +proplist.cmo: util.cmi proplist.cmi > +proplist.cmx: util.cmx proplist.cmi > +rx.cmo: rx.cmi > +rx.cmx: rx.cmi > +safelist.cmo: safelist.cmi > +safelist.cmx: safelist.cmi > +trace.cmo: util.cmi safelist.cmi prefs.cmi trace.cmi > +trace.cmx: util.cmx safelist.cmx prefs.cmx trace.cmi > +uarg.cmo: util.cmi safelist.cmi uarg.cmi > +uarg.cmx: util.cmx safelist.cmx uarg.cmi > +uprintf.cmo: uprintf.cmi > +uprintf.cmx: uprintf.cmi > +util.cmo: uprintf.cmi safelist.cmi util.cmi > +util.cmx: uprintf.cmx safelist.cmx util.cmi > +myMap.cmi: > +prefs.cmi: util.cmi > +proplist.cmi: > +rx.cmi: > +safelist.cmi: > +trace.cmi: prefs.cmi > +uarg.cmi: > +uprintf.cmi: > +util.cmi: > > Modified: trunk/src/uimacbridgenew.ml > =================================================================== > --- trunk/src/uimacbridgenew.ml 2011-07-17 13:24:13 UTC (rev 475) > +++ trunk/src/uimacbridgenew.ml 2011-07-18 08:15:01 UTC (rev 476) > @@ -196,7 +196,13 @@ > ;; > Callback.register "areRootsSet" areRootsSet;; > > +(* Utility function to tell the UI whether -batch is set *) > > +let isBatchSet () = > + Prefs.read Globals.batch > +;; > +Callback.register "isBatchSet" isBatchSet;; > + > (* The first time we load preferences, we also read the command line > arguments; if we re-load prefs (because the user selected a new profile) > we ignore the command line *) > > Modified: trunk/src/uimacnew09/MyController.m > =================================================================== > --- trunk/src/uimacnew09/MyController.m 2011-07-17 13:24:13 UTC (rev 475) > +++ trunk/src/uimacnew09/MyController.m 2011-07-18 08:15:01 UTC (rev 476) > @@ -109,15 +109,15 @@ > > /* Command-line processing */ > OCamlValue *clprofile = (id)ocamlCall("@", "unisonInit0"); > - BOOL areRootsSet = (long)ocamlCall("i@", "areRootsSet") ? YES : NO; > + > + BOOL areRootsSet = (long)ocamlCall("i", "areRootsSet") ? YES : NO; > if (areRootsSet) { > NSLog(@"Roots are on the command line"); > } > else { > NSLog(@"Roots are not set on the command line"); > } > - > - > + > /* Add toolbar */ > toolbar = [[[UnisonToolbar alloc] > initWithIdentifier: @"unisonToolbar" :self :tableView] autorelease]; > @@ -166,12 +166,12 @@ > > [mainWindow display]; > [mainWindow makeKeyAndOrderFront:nil]; > - > + > /* unless user has clicked Don't ask me again, ask about cltool */ > - if ( ([[NSUserDefaults standardUserDefaults] boolForKey:@"CheckCltool"]) && > - (![[NSFileManager defaultManager] > - fileExistsAtPath:@"/usr/bin/unison"]) ) > - [self raiseCltoolWindow:nil]; > + if ( ([[NSUserDefaults standardUserDefaults] boolForKey:@"CheckCltool"]) && > + (![[NSFileManager defaultManager] > + fileExistsAtPath:@"/usr/bin/unison"]) ) > + [self raiseCltoolWindow:nil]; > } > > - (IBAction) checkOpenProfileChanged:(id)sender { > @@ -539,7 +539,25 @@ > ocamlCall("x", "unisonInit2"); > } > > +- (void)doSync > +{ > + [tableView setEditable:NO]; > + syncable = NO; > + duringSync = YES; > + > + [self updateToolbar]; > + > + // This will run in another thread spawned in OCaml and will return immediately > + // We'll get a call back to syncComplete() when it is complete > + ocamlCall("x", "unisonSynchronize"); > +} > > +- (IBAction)syncButton:(id)sender > +{ > + [self doSync]; > +} > + > + > - (void)afterUpdate:(id)retainedReconItems > { > // NSLog(@"In afterUpdate:..."); > @@ -566,6 +584,17 @@ > > [self updateTableViewWithReset:([reconItems count] > 0)]; > [self updateToolbar]; > + BOOL isBatchSet = (long)ocamlCall("i", "isBatchSet") ? YES : NO; > + if (isBatchSet) { > + NSLog(@"batch set on the command line"); > + } > + else { > + NSLog(@"batch not set on the command line"); > + } > + > + if (isBatchSet) { > + [self doSync]; > + } > } > > CAMLprim value unisonInit2Complete(value v) > @@ -576,19 +605,6 @@ > return Val_unit; > } > > -- (IBAction)syncButton:(id)sender > -{ > - [tableView setEditable:NO]; > - syncable = NO; > - duringSync = YES; > - > - [self updateToolbar]; > - > - // This will run in another thread spawned in OCaml and will return immediately > - // We'll get a call back to syncComplete() when it is complete > - ocamlCall("x", "unisonSynchronize"); > -} > - > - (void)afterSync:(id)ignore > { > [notificationController syncFinishedFor:[self profile]]; > > Modified: trunk/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj > =================================================================== > --- trunk/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj 2011-07-17 13:24:13 UTC (rev 475) > +++ trunk/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj 2011-07-18 08:15:01 UTC (rev 476) > @@ -400,7 +400,14 @@ > isa = PBXProject; > buildConfigurationList = 2A3C3F2C0992245300E404E9 /* Build configuration list for PBXProject "uimacnew" */; > compatibilityVersion = "Xcode 3.1"; > + developmentRegion = English; > hasScannedForEncodings = 1; > + knownRegions = ( > + English, > + Japanese, > + French, > + German, > + ); > mainGroup = 29B97314FDCFA39411CA2CEA /* uimac */; > projectDirPath = ""; > projectRoot = ""; > > _______________________________________________ > 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 Mon Jul 18 13:36:47 2011 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Mon, 18 Jul 2011 19:36:47 +0200 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> Message-ID: On Mon, Jul 18, 2011 at 4:15 PM, Benjamin C. Pierce wrote: > Works great! > > Last question, I promise: Would it be easy to make the GUI kill itself automatically after the sync completes (perhaps pausing for 10 seconds or so first)? ? (I suppose the right way to do this is a bit more complex -- e.g., show a dialog like the one for system reboot that shows how much time is left before it is automatically accepted and quits the program. ?I guess it's too much to hope that such a widget would be provided by some library...?) I'm pretty sure it's doable (there is a hook for the "sync finished" in the objective C code), but I'm wondering how useful it would be: why not do a text UI sync in this case? (Also, it would take me a while to code this, as it's pure new Cocoa code, unlike the small hacks I've been doing till now.) Alan From bcpierce at cis.upenn.edu Mon Jul 18 15:31:30 2011 From: bcpierce at cis.upenn.edu (Pierce Benjamin C.) Date: Mon, 18 Jul 2011 15:31:30 -0400 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> Message-ID: <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> > I'm pretty sure it's doable (there is a hook for the "sync finished" > in the objective C code), A simple version is definitely doable -- just call exit from this hook! :-) > but I'm wondering how useful it would be: > why not do a text UI sync in this case? The GUI makes it easier to track the progress of synchronization, but I'd like to be able to walk away from a series of syncs (between different machines). Not worth spending a lot of time on, tho. - B > > (Also, it would take me a while to code this, as it's pure new Cocoa > code, unlike the small hacks I've been doing till now.) > > Alan > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From steve at kalkwarf.com Mon Jul 18 16:05:09 2011 From: steve at kalkwarf.com (Steve Kalkwarf) Date: Mon, 18 Jul 2011 16:05:09 -0400 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> Message-ID: >> but I'm wondering how useful it would be: >> why not do a text UI sync in this case? > > The GUI makes it easier to track the progress of synchronization, but I'd like to be able to walk away from a series of syncs (between different machines). This is a pretty trivial amount of Cocoa code, but I am not able to build trunk on my Lion dev box. First off, the Makefile falls over if there are two Xcode projects in the PWD. I patched that up, then took a few minutes to wonder why there are three(?!) 'uimac' directories, with four Xcode projects among them? Which one is the correct/current one? Can we kill the rest of them, so I don't have to ask again? Second, the Growl framework checked in with what I thought was the correct project (uimacnew/uimacnew.xcodeproj), isn't a current Growl framework, so it won't link against a 64-bit application. That was easy enough to update in my sandbox, but maybe it should be a manual dependency, instead of checked in to the Unison tree? Then, there are problems with the default Lion toolchain, where you can't target OSes prior to 10.6, or use IBPlugins compiled for the old Interface Builder. I crowbarred that family of issues locally, since the requested changes shouldn't have any Lion (or even Snow Leopard) dependent code. But that's not a long term solution. What finally derailed me is almost certainly a problem with my setup: Ld build/Default/Unison.app/Contents/MacOS/Unison normal x86_64 cd /Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/llvm-gcc-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/build/Default -F/Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/build/Default -F/Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew -filelist /Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison.LinkFileList -mmacosx-version-min=10.6 -L/usr/local/lib/ocaml -lunix -lthreadsnat -lstr -lbigarray -lasmrun -framework Cocoa -framework Security -framework Growl -framework ExceptionHandling /Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/../unison-blob.o -o /Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/build/Default/Unison.app/Contents/MacOS/Unison ld: library not found for -lstr Command /Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1 but I see str.* in my /usr/local/lib/ocaml directory: /usr/local/lib/ocaml/str.a /usr/local/lib/ocaml/str.cma /usr/local/lib/ocaml/str.cmi /usr/local/lib/ocaml/str.cmx /usr/local/lib/ocaml/str.cmxa /usr/local/lib/ocaml/str.mli so I'm a little lost here. (for completeness, I installed ocaml with the "brew" package manager) If someone can straighten me out, I'll poke at the GUI, and add the quit feature. Until then, I'm stuck. :-) Steve -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4356 bytes Desc: not available URL: From bcpierce at cis.upenn.edu Mon Jul 18 17:06:46 2011 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Mon, 18 Jul 2011 17:06:46 -0400 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> Message-ID: I can address some of these (but not, unfortunately, the last)... >>> First off, the Makefile falls over if there are two Xcode projects in the PWD. I patched that up, then took a few minutes to wonder why there are three(?!) 'uimac' directories, with four Xcode projects among them? > Which one is the correct/current one? Can we kill the rest of them, so I don't have to ask again? We've been accumulating variants of the Cocoa GUI for a few years. I believe the uimac09 version is the best. I guess if that one seems to be working we could kill off the others now. > Second, the Growl framework checked in with what I thought was the correct project (uimacnew/uimacnew.xcodeproj), isn't a current Growl framework, so it won't link against a 64-bit application. That was easy enough to update in my sandbox, but maybe it should be a manual dependency, instead of checked in to the Unison tree? Maybe. But if we can save a step in the build process, that's nice. > Then, there are problems with the default Lion toolchain, where you can't target OSes prior to 10.6, or use IBPlugins compiled for the old Interface Builder. I crowbarred that family of issues locally, since the requested changes shouldn't have any Lion (or even Snow Leopard) dependent code. But that's not a long term solution. Version dependencies have been a regular issue. I think we don't need to support <10.6 any more, if that makes things easier. > What finally derailed me is almost certainly a problem with my setup: > > Ld build/Default/Unison.app/Contents/MacOS/Unison normal x86_64 > cd /Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew > setenv MACOSX_DEPLOYMENT_TARGET 10.6 > /Developer/usr/bin/llvm-gcc-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/build/Default -F/Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/build/Default -F/Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew -filelist /Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison.LinkFileList -mmacosx-version-min=10.6 -L/usr/local/lib/ocaml -lunix -lthreadsnat -lstr -lbigarray -lasmrun -framework Cocoa -framework Security -framework Growl -framework ExceptionHandling /Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/../unison-blob.o -o /Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/build/Default/Unison.app/Contents/MacOS/Unison > ld: library not found for -lstr > Command /Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1 > > but I see str.* in my /usr/local/lib/ocaml directory: > > /usr/local/lib/ocaml/str.a > /usr/local/lib/ocaml/str.cma > /usr/local/lib/ocaml/str.cmi > /usr/local/lib/ocaml/str.cmx > /usr/local/lib/ocaml/str.cmxa > /usr/local/lib/ocaml/str.mli > > so I'm a little lost here. (for completeness, I installed ocaml with the "brew" package manager) > > If someone can straighten me out, I'll poke at the GUI, and add the quit feature. Until then, I'm stuck. :-) Sorry -- don't know about this one. (Although I'm a happy OSX user, I've never bothered to get very familiar with intricacies of Cocoa development...) - Benjamin > > Steve_______________________________________________ > 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 Tue Jul 19 08:24:06 2011 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Tue, 19 Jul 2011 14:24:06 +0200 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> Message-ID: On Mon, Jul 18, 2011 at 9:31 PM, Pierce Benjamin C. wrote: >> I'm pretty sure it's doable (there is a hook for the "sync finished" >> in the objective C code), > > A simple version is definitely doable -- just call exit from this hook! ?:-) Do we want a new command line option for this, or do it always when "batch" is called? From alan.schmitt at polytechnique.org Tue Jul 19 08:30:54 2011 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Tue, 19 Jul 2011 14:30:54 +0200 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> Message-ID: On Mon, Jul 18, 2011 at 10:05 PM, Steve Kalkwarf wrote: > > Second, the Growl framework checked in with what I thought was the correct project (uimacnew/uimacnew.xcodeproj), isn't a current Growl framework, so it won't link against a 64-bit application. That was easy enough to update in my sandbox, but maybe it should be a manual dependency, instead of checked in to the Unison tree? As Benjamin says, we try to make compilation as much "out of the box" as possible. But it's true it means we have to make sure that included frameworks are up to date. > What finally derailed me is almost certainly a problem with my setup: > > Ld build/Default/Unison.app/Contents/MacOS/Unison normal x86_64 > ? ?cd /Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew > ? ?setenv MACOSX_DEPLOYMENT_TARGET 10.6 > ? ?/Developer/usr/bin/llvm-gcc-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/build/Default -F/Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/build/Default -F/Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew -filelist /Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison.LinkFileList -mmacosx-version-min=10.6 -L/usr/local/lib/ocaml -lunix -lthreadsnat -lstr -lbigarray -lasmrun -framework Cocoa -framework Security -framework Growl -framework ExceptionHandling /Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/../unison-blob.o -o /Users/kalkwarf/RandomSource/unison/trunk/src/uimacnew/build/Default/Unison.app/Contents/MacOS/Unison > ld: library not found for -lstr > Command /Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1 > > but I see str.* in my /usr/local/lib/ocaml directory: > > /usr/local/lib/ocaml/str.a > /usr/local/lib/ocaml/str.cma > /usr/local/lib/ocaml/str.cmi > /usr/local/lib/ocaml/str.cmx > /usr/local/lib/ocaml/str.cmxa > /usr/local/lib/ocaml/str.mli > > so I'm a little lost here. (for completeness, I installed ocaml with the "brew" package manager) This seems to be the same problem than the one from the "Building Unison GUI on OSX 10.6" thread. Here is what I said there: This is a different problem, probably related to this bug: http://caml.inria.fr/mantis/view.php?id=5247 You need to find where libcamlstr.a is, and symlink libstr.a to libcamlstr.a in the same directory. Hope this helps, Alan From bcpierce at cis.upenn.edu Tue Jul 19 08:37:53 2011 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Tue, 19 Jul 2011 08:37:53 -0400 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> Message-ID: <2CF3BBDB-B374-48DC-AABA-A402C92E4457@cis.upenn.edu> >>> A simple version is definitely doable -- just call exit from this hook! :-) > > Do we want a new command line option for this, or do it always when > "batch" is called? Don't see any need to proliferate flags... - B From schmitta at seas.upenn.edu Tue Jul 19 10:40:37 2011 From: schmitta at seas.upenn.edu (schmitta at seas.upenn.edu) Date: Tue, 19 Jul 2011 10:40:37 -0400 Subject: [Unison-hackers] [unison-svn] r477 - in trunk/src: . uimacnew09 uimacnew09/English.lproj Message-ID: <201107191440.p6JEeboe026928@yaws.seas.upenn.edu> Author: schmitta Date: 2011-07-19 10:40:36 -0400 (Tue, 19 Jul 2011) New Revision: 477 Modified: trunk/src/RECENTNEWS trunk/src/mkProjectInfo.ml trunk/src/uimacnew09/English.lproj/MainMenu.xib trunk/src/uimacnew09/MyController.h trunk/src/uimacnew09/MyController.m Log: - uimacnew09: file details panel selectable - uimacnew09: automatically quit when done synchronizing if called from the command line with "-batch" Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2011-07-18 08:15:01 UTC (rev 476) +++ trunk/src/RECENTNEWS 2011-07-19 14:40:36 UTC (rev 477) @@ -1,3 +1,9 @@ +CHANGES FROM VERSION 2.44.5 + +- uimacnew09: file details panel selectable +- uimacnew09: automatically quit when done synchronizing if called from the command line with "-batch" + +------------------------------- CHANGES FROM VERSION 2.44.4 - fixed a bug when calling the Unison macnew09 GUI from the command line with a profile specified Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2011-07-18 08:15:01 UTC (rev 476) +++ trunk/src/mkProjectInfo.ml 2011-07-19 14:40:36 UTC (rev 477) @@ -58,3 +58,4 @@ + Modified: trunk/src/uimacnew09/English.lproj/MainMenu.xib =================================================================== --- trunk/src/uimacnew09/English.lproj/MainMenu.xib 2011-07-18 08:15:01 UTC (rev 476) +++ trunk/src/uimacnew09/English.lproj/MainMenu.xib 2011-07-19 14:40:36 UTC (rev 477) @@ -2,10 +2,10 @@ 1050 - 10C540 - 740 - 1038.25 - 458.00 + 10K540 + 823 + 1038.36 + 461.00 YES @@ -15,14 +15,14 @@ YES - 740 - 1.2.2 + 823 + 1.2.5 YES - + YES @@ -30,13 +30,8 @@ com.brandonwalkin.BWToolkit - YES - - YES - - - YES - + PluginDependencyRecalculationVersion + YES @@ -720,7 +715,6 @@ - QSAAAEEgAABBmAAAQZgAAA @@ -751,7 +745,7 @@ 256 - {730, 410} + {730, 411} YES @@ -941,7 +935,7 @@ 0 - {{0, 17}, {730, 410}} + {{0, 17}, {730, 411}} @@ -983,7 +977,7 @@ - {730, 427} + {730, 428} 528 @@ -1006,7 +1000,7 @@ YES - 67239424 + 69336577 272760832 Label @@ -1041,6 +1035,7 @@ NO YES YES + NO 0.30000001192092896 0.0 @@ -1051,7 +1046,9 @@ NO YES - + + YES + YES @@ -1522,6 +1519,7 @@ NO NO YES + NO 0.30000001192092896 0.0 @@ -5144,7 +5142,7 @@ {{345, 795}, {363, 281}} com.apple.InterfaceBuilder.CocoaPlugin - {{357, 361}, {730, 546}} + {{203, 460}, {730, 546}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -5501,6 +5499,75 @@ id + + YES + + YES + copyLR: + copyRL: + forceNewer: + forceOlder: + ignoreExt: + ignoreName: + ignorePath: + leaveAlone: + merge: + revert: + selectConflicts: + showDiff: + + + YES + + copyLR: + id + + + copyRL: + id + + + forceNewer: + id + + + forceOlder: + id + + + ignoreExt: + id + + + ignoreName: + id + + + ignorePath: + id + + + leaveAlone: + id + + + merge: + id + + + revert: + id + + + selectConflicts: + id + + + showDiff: + id + + + IBUserSource @@ -5556,6 +5623,110 @@ id + + YES + + YES + cancelProfileButton: + checkOpenProfileChanged: + chooseFont: + cltoolNoButton: + cltoolYesButton: + createButton: + endPasswordWindow: + installCommandLineTool: + onlineHelp: + openButton: + raiseAboutWindow: + raiseCltoolWindow: + raiseWindow: + rescan: + restartButton: + saveProfileButton: + showPreferences: + syncButton: + tableModeChanged: + + + YES + + cancelProfileButton: + id + + + checkOpenProfileChanged: + id + + + chooseFont: + id + + + cltoolNoButton: + id + + + cltoolYesButton: + id + + + createButton: + id + + + endPasswordWindow: + id + + + installCommandLineTool: + id + + + onlineHelp: + id + + + openButton: + id + + + raiseAboutWindow: + id + + + raiseCltoolWindow: + id + + + raiseWindow: + NSWindow + + + rescan: + id + + + restartButton: + id + + + saveProfileButton: + id + + + showPreferences: + id + + + syncButton: + id + + + tableModeChanged: + id + + + YES @@ -5633,6 +5804,185 @@ NSTextField + + YES + + YES + ConnectingView + aboutWindow + checkOpenProfile + chooseDetailsFont + chooseDiffFont + chooseProfileView + cltoolPref + cltoolWindow + connectingAnimation + detailsFontLabel + detailsTextView + diffFontLabel + diffView + diffWindow + fontChangeTarget + mainWindow + notificationController + passwordCancelButton + passwordPrompt + passwordText + passwordWindow + preferencesController + preferencesView + preferencesWindow + profileBox + profileController + progressBar + splitView + statusText + tableModeSelector + tableView + updatesText + updatesView + versionText + + + YES + + ConnectingView + NSView + + + aboutWindow + NSWindow + + + checkOpenProfile + NSButton + + + chooseDetailsFont + NSButton + + + chooseDiffFont + NSButton + + + chooseProfileView + NSView + + + cltoolPref + NSButton + + + cltoolWindow + NSWindow + + + connectingAnimation + NSProgressIndicator + + + detailsFontLabel + NSTextField + + + detailsTextView + NSTextField + + + diffFontLabel + NSTextField + + + diffView + NSTextView + + + diffWindow + NSWindow + + + fontChangeTarget + id + + + mainWindow + NSWindow + + + notificationController + NotificationController + + + passwordCancelButton + NSButton + + + passwordPrompt + NSTextField + + + passwordText + NSTextField + + + passwordWindow + NSWindow + + + preferencesController + PreferencesController + + + preferencesView + NSView + + + preferencesWindow + NSWindow + + + profileBox + NSComboBox + + + profileController + ProfileController + + + progressBar + NSProgressIndicator + + + splitView + NSSplitView + + + statusText + NSTextField + + + tableModeSelector + NSSegmentedControl + + + tableView + ReconTableView + + + updatesText + NSTextField + + + updatesView + NSView + + + versionText + NSTextField + + + IBProjectSource MyController.h @@ -5703,6 +6053,30 @@ id + + YES + + YES + anyEnter: + localClick: + remoteClick: + + + YES + + anyEnter: + id + + + localClick: + id + + + remoteClick: + id + + + YES @@ -5726,6 +6100,50 @@ NSTextField + + YES + + YES + firstRootText + localButtonCell + profileNameText + remoteButtonCell + secondRootHost + secondRootText + secondRootUser + + + YES + + firstRootText + NSTextField + + + localButtonCell + NSButtonCell + + + profileNameText + NSTextField + + + remoteButtonCell + NSButtonCell + + + secondRootHost + NSTextField + + + secondRootText + NSTextField + + + secondRootUser + NSTextField + + + IBProjectSource PreferencesController.h @@ -5746,6 +6164,13 @@ tableView NSTableView + + tableView + + tableView + NSTableView + + IBProjectSource ProfileController.h @@ -5766,6 +6191,13 @@ myController MyController + + myController + + myController + MyController + + IBProjectSource ProfileTableView.h @@ -5815,6 +6247,75 @@ id + + YES + + YES + copyLR: + copyRL: + forceNewer: + forceOlder: + ignoreExt: + ignoreName: + ignorePath: + leaveAlone: + merge: + revert: + selectConflicts: + showDiff: + + + YES + + copyLR: + id + + + copyRL: + id + + + forceNewer: + id + + + forceOlder: + id + + + ignoreExt: + id + + + ignoreName: + id + + + ignorePath: + id + + + leaveAlone: + id + + + merge: + id + + + revert: + id + + + selectConflicts: + id + + + showDiff: + id + + + @@ -5859,6 +6360,13 @@ toggleCollapse: id + + toggleCollapse: + + toggleCollapse: + id + + IBFrameworkSource BWToolkitFramework.framework/Headers/BWSplitView.h @@ -5910,6 +6418,7 @@ 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx @@ -5925,5 +6434,30 @@ YES ../uimacnew.xcodeproj 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + NSPreferencesGeneral + NSSwitch + Outline-Deep + Outline-Flat + Outline-Flattened + Unison + + + YES + {9, 8} + {7, 2} + {32, 32} + {15, 15} + {24, 16} + {24, 16} + {24, 16} + {128, 128} + + Modified: trunk/src/uimacnew09/MyController.h =================================================================== --- trunk/src/uimacnew09/MyController.h 2011-07-18 08:15:01 UTC (rev 476) +++ trunk/src/uimacnew09/MyController.h 2011-07-19 14:40:36 UTC (rev 477) @@ -76,6 +76,8 @@ IBOutlet NSSplitView *splitView; id fontChangeTarget; + + BOOL isBatchSet; } - (id)init; Modified: trunk/src/uimacnew09/MyController.m =================================================================== --- trunk/src/uimacnew09/MyController.m 2011-07-18 08:15:01 UTC (rev 476) +++ trunk/src/uimacnew09/MyController.m 2011-07-19 14:40:36 UTC (rev 477) @@ -584,7 +584,7 @@ [self updateTableViewWithReset:([reconItems count] > 0)]; [self updateToolbar]; - BOOL isBatchSet = (long)ocamlCall("i", "isBatchSet") ? YES : NO; + isBatchSet = (long)ocamlCall("i", "isBatchSet") ? YES : NO; if (isBatchSet) { NSLog(@"batch set on the command line"); } @@ -622,6 +622,15 @@ [self updateTableViewWithReset:FALSE]; } +- (void)quitIfBatch:(id)ignore +{ + if (isBatchSet) { + NSLog(@"Automatically quitting because of -batch"); + [NSApp performSelector:@selector(terminate:) withObject:nil afterDelay:0.0]; + return Val_unit; + } +} + CAMLprim value syncComplete() { id pool = [[NSAutoreleasePool alloc] init]; @@ -629,6 +638,9 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"deleteLogOnExit"]) [[NSFileManager defaultManager] removeItemAtPath:[@"~/unison.log" stringByExpandingTildeInPath] error:nil]; [pool release]; + + [me performSelectorOnMainThread:@selector(quitIfBatch:) withObject:nil waitUntilDone:FALSE]; + return Val_unit; } From alan.schmitt at polytechnique.org Tue Jul 19 10:47:03 2011 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Tue, 19 Jul 2011 16:47:03 +0200 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: <2CF3BBDB-B374-48DC-AABA-A402C92E4457@cis.upenn.edu> References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> <2CF3BBDB-B374-48DC-AABA-A402C92E4457@cis.upenn.edu> Message-ID: On Tue, Jul 19, 2011 at 2:37 PM, Benjamin C. Pierce wrote: >>>> A simple version is definitely doable -- just call exit from this hook! ?:-) >> >> Do we want a new command line option for this, or do it always when >> "batch" is called? > > Don't see any need to proliferate flags... If you want to try the committed version ... Alan From schmitta at seas.upenn.edu Tue Jul 19 10:47:51 2011 From: schmitta at seas.upenn.edu (schmitta at seas.upenn.edu) Date: Tue, 19 Jul 2011 10:47:51 -0400 Subject: [Unison-hackers] [unison-svn] r478 - in branches/2.40/src: . uimacnew09/English.lproj uimacnew09/uimacnew.xcodeproj Message-ID: <201107191447.p6JElpCJ027129@yaws.seas.upenn.edu> Author: schmitta Date: 2011-07-19 10:47:51 -0400 (Tue, 19 Jul 2011) New Revision: 478 Modified: branches/2.40/src/RECENTNEWS branches/2.40/src/mkProjectInfo.ml branches/2.40/src/uimacnew09/English.lproj/MainMenu.xib branches/2.40/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj Log: - uimacnew09: make file details panel selectable Modified: branches/2.40/src/RECENTNEWS =================================================================== --- branches/2.40/src/RECENTNEWS 2011-07-19 14:40:36 UTC (rev 477) +++ branches/2.40/src/RECENTNEWS 2011-07-19 14:47:51 UTC (rev 478) @@ -1,3 +1,8 @@ +CHANGES FROM VERSION 2.40.65 + +- uimacnew09: make file details panel selectable + +------------------------------- CHANGES FROM VERSION 2.40.63 * Some spelling corrections in documentation and comments from Stephane Glondu Modified: branches/2.40/src/mkProjectInfo.ml =================================================================== --- branches/2.40/src/mkProjectInfo.ml 2011-07-19 14:40:36 UTC (rev 477) +++ branches/2.40/src/mkProjectInfo.ml 2011-07-19 14:47:51 UTC (rev 478) @@ -98,3 +98,4 @@ Printf.printf "NAME=%s\n" projectName;; + Modified: branches/2.40/src/uimacnew09/English.lproj/MainMenu.xib =================================================================== --- branches/2.40/src/uimacnew09/English.lproj/MainMenu.xib 2011-07-19 14:40:36 UTC (rev 477) +++ branches/2.40/src/uimacnew09/English.lproj/MainMenu.xib 2011-07-19 14:47:51 UTC (rev 478) @@ -2,10 +2,10 @@ 1050 - 10C540 - 740 - 1038.25 - 458.00 + 10K540 + 823 + 1038.36 + 461.00 YES @@ -15,14 +15,14 @@ YES - 740 - 1.2.2 + 823 + 1.2.5 YES - + YES @@ -30,13 +30,8 @@ com.brandonwalkin.BWToolkit - YES - - YES - - - YES - + PluginDependencyRecalculationVersion + YES @@ -720,7 +715,6 @@ - QSAAAEEgAABBmAAAQZgAAA @@ -751,7 +745,7 @@ 256 - {730, 410} + {730, 411} YES @@ -941,7 +935,7 @@ 0 - {{0, 17}, {730, 410}} + {{0, 17}, {730, 411}} @@ -983,7 +977,7 @@ - {730, 427} + {730, 428} 528 @@ -1006,7 +1000,7 @@ YES - 67239424 + 69336577 272760832 Label @@ -1041,6 +1035,7 @@ NO YES YES + NO 0.30000001192092896 0.0 @@ -1051,7 +1046,9 @@ NO YES - + + YES + YES @@ -1522,6 +1519,7 @@ NO NO YES + NO 0.30000001192092896 0.0 @@ -5144,7 +5142,7 @@ {{345, 795}, {363, 281}} com.apple.InterfaceBuilder.CocoaPlugin - {{357, 361}, {730, 546}} + {{289, 361}, {730, 546}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -5501,6 +5499,75 @@ id + + YES + + YES + copyLR: + copyRL: + forceNewer: + forceOlder: + ignoreExt: + ignoreName: + ignorePath: + leaveAlone: + merge: + revert: + selectConflicts: + showDiff: + + + YES + + copyLR: + id + + + copyRL: + id + + + forceNewer: + id + + + forceOlder: + id + + + ignoreExt: + id + + + ignoreName: + id + + + ignorePath: + id + + + leaveAlone: + id + + + merge: + id + + + revert: + id + + + selectConflicts: + id + + + showDiff: + id + + + IBUserSource @@ -5556,6 +5623,110 @@ id + + YES + + YES + cancelProfileButton: + checkOpenProfileChanged: + chooseFont: + cltoolNoButton: + cltoolYesButton: + createButton: + endPasswordWindow: + installCommandLineTool: + onlineHelp: + openButton: + raiseAboutWindow: + raiseCltoolWindow: + raiseWindow: + rescan: + restartButton: + saveProfileButton: + showPreferences: + syncButton: + tableModeChanged: + + + YES + + cancelProfileButton: + id + + + checkOpenProfileChanged: + id + + + chooseFont: + id + + + cltoolNoButton: + id + + + cltoolYesButton: + id + + + createButton: + id + + + endPasswordWindow: + id + + + installCommandLineTool: + id + + + onlineHelp: + id + + + openButton: + id + + + raiseAboutWindow: + id + + + raiseCltoolWindow: + id + + + raiseWindow: + NSWindow + + + rescan: + id + + + restartButton: + id + + + saveProfileButton: + id + + + showPreferences: + id + + + syncButton: + id + + + tableModeChanged: + id + + + YES @@ -5633,6 +5804,185 @@ NSTextField + + YES + + YES + ConnectingView + aboutWindow + checkOpenProfile + chooseDetailsFont + chooseDiffFont + chooseProfileView + cltoolPref + cltoolWindow + connectingAnimation + detailsFontLabel + detailsTextView + diffFontLabel + diffView + diffWindow + fontChangeTarget + mainWindow + notificationController + passwordCancelButton + passwordPrompt + passwordText + passwordWindow + preferencesController + preferencesView + preferencesWindow + profileBox + profileController + progressBar + splitView + statusText + tableModeSelector + tableView + updatesText + updatesView + versionText + + + YES + + ConnectingView + NSView + + + aboutWindow + NSWindow + + + checkOpenProfile + NSButton + + + chooseDetailsFont + NSButton + + + chooseDiffFont + NSButton + + + chooseProfileView + NSView + + + cltoolPref + NSButton + + + cltoolWindow + NSWindow + + + connectingAnimation + NSProgressIndicator + + + detailsFontLabel + NSTextField + + + detailsTextView + NSTextField + + + diffFontLabel + NSTextField + + + diffView + NSTextView + + + diffWindow + NSWindow + + + fontChangeTarget + id + + + mainWindow + NSWindow + + + notificationController + NotificationController + + + passwordCancelButton + NSButton + + + passwordPrompt + NSTextField + + + passwordText + NSTextField + + + passwordWindow + NSWindow + + + preferencesController + PreferencesController + + + preferencesView + NSView + + + preferencesWindow + NSWindow + + + profileBox + NSComboBox + + + profileController + ProfileController + + + progressBar + NSProgressIndicator + + + splitView + NSSplitView + + + statusText + NSTextField + + + tableModeSelector + NSSegmentedControl + + + tableView + ReconTableView + + + updatesText + NSTextField + + + updatesView + NSView + + + versionText + NSTextField + + + IBProjectSource MyController.h @@ -5703,6 +6053,30 @@ id + + YES + + YES + anyEnter: + localClick: + remoteClick: + + + YES + + anyEnter: + id + + + localClick: + id + + + remoteClick: + id + + + YES @@ -5726,6 +6100,50 @@ NSTextField + + YES + + YES + firstRootText + localButtonCell + profileNameText + remoteButtonCell + secondRootHost + secondRootText + secondRootUser + + + YES + + firstRootText + NSTextField + + + localButtonCell + NSButtonCell + + + profileNameText + NSTextField + + + remoteButtonCell + NSButtonCell + + + secondRootHost + NSTextField + + + secondRootText + NSTextField + + + secondRootUser + NSTextField + + + IBProjectSource PreferencesController.h @@ -5746,6 +6164,13 @@ tableView NSTableView + + tableView + + tableView + NSTableView + + IBProjectSource ProfileController.h @@ -5766,6 +6191,13 @@ myController MyController + + myController + + myController + MyController + + IBProjectSource ProfileTableView.h @@ -5815,6 +6247,75 @@ id + + YES + + YES + copyLR: + copyRL: + forceNewer: + forceOlder: + ignoreExt: + ignoreName: + ignorePath: + leaveAlone: + merge: + revert: + selectConflicts: + showDiff: + + + YES + + copyLR: + id + + + copyRL: + id + + + forceNewer: + id + + + forceOlder: + id + + + ignoreExt: + id + + + ignoreName: + id + + + ignorePath: + id + + + leaveAlone: + id + + + merge: + id + + + revert: + id + + + selectConflicts: + id + + + showDiff: + id + + + @@ -5859,6 +6360,13 @@ toggleCollapse: id + + toggleCollapse: + + toggleCollapse: + id + + IBFrameworkSource BWToolkitFramework.framework/Headers/BWSplitView.h @@ -5910,6 +6418,7 @@ 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx @@ -5925,5 +6434,30 @@ YES ../uimacnew.xcodeproj 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + NSPreferencesGeneral + NSSwitch + Outline-Deep + Outline-Flat + Outline-Flattened + Unison + + + YES + {9, 8} + {7, 2} + {32, 32} + {15, 15} + {24, 16} + {24, 16} + {24, 16} + {128, 128} + + Modified: branches/2.40/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj =================================================================== --- branches/2.40/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj 2011-07-19 14:40:36 UTC (rev 477) +++ branches/2.40/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj 2011-07-19 14:47:51 UTC (rev 478) @@ -400,7 +400,14 @@ isa = PBXProject; buildConfigurationList = 2A3C3F2C0992245300E404E9 /* Build configuration list for PBXProject "uimacnew" */; compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = 29B97314FDCFA39411CA2CEA /* uimac */; projectDirPath = ""; projectRoot = ""; @@ -697,6 +704,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 2E282CCC0D9AE2E800439D01 /* ExternalSettings.xcconfig */; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; FRAMEWORK_SEARCH_PATHS = "Frameworks/**"; LIBRARY_SEARCH_PATHS = ""; SDKROOT = macosx10.5; @@ -708,6 +716,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 2E282CCC0D9AE2E800439D01 /* ExternalSettings.xcconfig */; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; FRAMEWORK_SEARCH_PATHS = "Frameworks/**"; LIBRARY_SEARCH_PATHS = ""; SDKROOT = macosx10.5; @@ -719,6 +728,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 2E282CCC0D9AE2E800439D01 /* ExternalSettings.xcconfig */; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; FRAMEWORK_SEARCH_PATHS = "Frameworks/**"; LIBRARY_SEARCH_PATHS = ""; SDKROOT = macosx10.5; From steve at kalkwarf.com Tue Jul 19 13:13:26 2011 From: steve at kalkwarf.com (Steve Kalkwarf) Date: Tue, 19 Jul 2011 13:13:26 -0400 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> Message-ID: <6F53B0D4-8ED1-4B95-B2CA-F270EE67B44A@kalkwarf.com> > This seems to be the same problem than the one from the "Building > Unison GUI on OSX 10.6" thread. Here is what I said there: > > This is a different problem, probably related to this bug: > http://caml.inria.fr/mantis/view.php?id=5247 > > You need to find where libcamlstr.a is, and symlink libstr.a to > libcamlstr.a in the same directory. Yes, that fixes the link problem. Is there a reason we can't just supply libcamlstr to the linker, directly? Steve -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4356 bytes Desc: not available URL: From alan.schmitt at polytechnique.org Tue Jul 19 13:57:38 2011 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Tue, 19 Jul 2011 19:57:38 +0200 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: <6F53B0D4-8ED1-4B95-B2CA-F270EE67B44A@kalkwarf.com> References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> <6F53B0D4-8ED1-4B95-B2CA-F270EE67B44A@kalkwarf.com> Message-ID: On Tue, Jul 19, 2011 at 7:13 PM, Steve Kalkwarf wrote: > Is there a reason we can't just supply libcamlstr to the linker, directly? I don't know how to do that, unfortunately. Alan From steve at kalkwarf.com Tue Jul 19 14:39:24 2011 From: steve at kalkwarf.com (Steve Kalkwarf) Date: Tue, 19 Jul 2011 14:39:24 -0400 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> <6F53B0D4-8ED1-4B95-B2CA-F270EE67B44A@kalkwarf.com> Message-ID: <0D6D0109-ECC7-4FE5-8D30-6686108A6539@kalkwarf.com> On Jul 19, 2011, at 1:57 PM, Alan Schmitt wrote: > On Tue, Jul 19, 2011 at 7:13 PM, Steve Kalkwarf wrote: >> Is there a reason we can't just supply libcamlstr to the linker, directly? > > I don't know how to do that, unfortunately. Open the Xcode project, and edit the settings for the 'uimac' target. In that target's "Other linker flags", change the entry for '-lstr' to '-lcamlstr' -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4356 bytes Desc: not available URL: From steve at kalkwarf.com Tue Jul 19 15:23:50 2011 From: steve at kalkwarf.com (Steve Kalkwarf) Date: Tue, 19 Jul 2011 15:23:50 -0400 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> <2CF3BBDB-B374-48DC-AABA-A402C92E4457@cis.upenn.edu> Message-ID: > If you want to try the committed version ? MyController.m:630 'return' with a value, in function returning void Try this code out: In MyController.m: - (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { [_timer invalidate]; switch (returnCode) { case NSAlertAlternateReturn: return; break; default: NSLog(@"Quit"); break; } } - (void)updateCountdown { if (_secondsRemaining == 0) { [_timer invalidate]; [[_timeoutAlert window] orderOut: nil]; [self alertDidEnd: _timeoutAlert returnCode: NSAlertDefaultReturn contextInfo: nil]; } else { [_timeoutAlert setMessageText: [NSString stringWithFormat: @"Unison will quit in %lu seconds", _secondsRemaining]]; _secondsRemaining--; } } - (void)quitIfBatch:(id)ignore { if (isBatchSet) { NSLog(@"Automatically quitting because of -batch"); _timeoutAlert = [NSAlert alertWithMessageText: @"" defaultButton: @"Quit" alternateButton: @"Cancel" otherButton: nil informativeTextWithFormat: @""]; _secondsRemaining = 10; _timer = [NSTimer scheduledTimerWithTimeInterval: 1 target: self selector: @selector(updateCountdown) userInfo: nil repeats: YES]; [_timeoutAlert beginSheetModalForWindow: [self window] modalDelegate: self didEndSelector: @selector(alertDidEnd:returnCode:contextInfo:) contextInfo: NULL]; } } === In MyController.h, add these iVars: NSTimer *_timer; NSAlert *_timeoutAlert; NSUInteger _secondsRemaining; Season to taste? -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4356 bytes Desc: not available URL: From bcpierce at cis.upenn.edu Fri Jul 29 16:37:43 2011 From: bcpierce at cis.upenn.edu (Pierce Benjamin C.) Date: Fri, 29 Jul 2011 16:37:43 -0400 Subject: [Unison-hackers] Wrong icon in Cocoa GUI for directories with dot in name In-Reply-To: <201107051628.56624.hans_meine@gmx.net> References: <201107051628.56624.hans_meine@gmx.net> Message-ID: <64179B5E-7D05-4B28-B4CF-714EA2929013@cis.upenn.edu> > first of all thanks again for this great piece of software - I am constantly > recommending it to other people. For about a year, I am using the Cocoa GUI > which is also really well done. :-) > Today, I noticed that two out of five (new) folders about to be synced to the > remote end did not have the "folder", but the "[unknown] file" icon. It took > me a while to see why, but I am pretty sure it is because the folder names > have a dot in them. (Sth. like "foo_1.25mm_bar", while other folders are like > "foo_1mm_bar".) I've never seen this behavior, but I don't use the GUI that much. If it really does have to do with the presence of dots in the folder names, then I guess this is some smart Cocoa thing choosing what icon to display based on the "extension" of a folder -- anybody know how to turn it off? - Benjamin From bcpierce at cis.upenn.edu Sat Jul 30 19:19:56 2011 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Sat, 30 Jul 2011 19:19:56 -0400 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> <2CF3BBDB-B374-48DC-AABA-A402C92E4457@cis.upenn.edu> Message-ID: Hi, I'm probably not doing what you intended, but just pasting in the code you sent in place of the existing quitIfBatch leads to these warnings during compilation... /Users/bcpierce/current/unison/trunk/src/uimacnew09/MyController.m: In function '-[MyController quitIfBatch:]': /Users/bcpierce/current/unison/trunk/src/uimacnew09/MyController.m:662: warning: 'MyController' may not respond to '-window' /Users/bcpierce/current/unison/trunk/src/uimacnew09/MyController.m:662: warning: (Messages without a matching method signature /Users/bcpierce/current/unison/trunk/src/uimacnew09/MyController.m:662: warning: will be assumed to return 'id' and accept /Users/bcpierce/current/unison/trunk/src/uimacnew09/MyController.m:662: warning: '...' as arguments.) /Users/bcpierce/current/unison/trunk/src/uimacnew09/MyController.m: In function '-[MyController outlineView:numberOfChildrenOfItem:]': /Users/bcpierce/current/unison/trunk/src/uimacnew09/MyController.m:699: warning: conflicting types for '-(int)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item' /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOutlineView.h:199: warning: previous declaration of '-(NSInteger)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item' /Users/bcpierce/current/unison/trunk/src/uimacnew09/MyController.m: In function '-[MyController outlineView:child:ofItem:]': /Users/bcpierce/current/unison/trunk/src/uimacnew09/MyController.m:708: warning: conflicting types for '-(id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item' /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOutlineView.h:197: warning: previous declaration of '-(id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id)item' ... and these messages before a failure at runtime: 2011-07-30 19:17:09.278 Unison[20964:903] Automatically quitting because of -batch 2011-07-30 19:17:09.282 Unison[20964:903] -[MyController window]: unrecognized selector sent to instance 0x10043e190 2011-07-30 19:17:09.283 Unison[20964:903] -[MyController window]: unrecognized selector sent to instance 0x10043e190 Maybe easier if you just send the whole new MyController.m? Thanks, - B On Jul 19, 2011, at 3:23 PM, Steve Kalkwarf wrote: >> If you want to try the committed version ? > > > MyController.m:630 > 'return' with a value, in function returning void > > Try this code out: > > In MyController.m: > > - (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo > { > [_timer invalidate]; > > switch (returnCode) { > case NSAlertAlternateReturn: > return; > break; > > default: > NSLog(@"Quit"); > break; > } > } > > - (void)updateCountdown > { > if (_secondsRemaining == 0) { > [_timer invalidate]; > [[_timeoutAlert window] orderOut: nil]; > [self alertDidEnd: _timeoutAlert returnCode: NSAlertDefaultReturn contextInfo: nil]; > } else { > [_timeoutAlert setMessageText: [NSString stringWithFormat: @"Unison will quit in %lu seconds", _secondsRemaining]]; > _secondsRemaining--; > } > } > > - (void)quitIfBatch:(id)ignore > { > if (isBatchSet) { > NSLog(@"Automatically quitting because of -batch"); > _timeoutAlert = [NSAlert alertWithMessageText: @"" defaultButton: @"Quit" alternateButton: @"Cancel" otherButton: nil informativeTextWithFormat: @""]; > > _secondsRemaining = 10; > > _timer = [NSTimer scheduledTimerWithTimeInterval: 1 target: self selector: @selector(updateCountdown) userInfo: nil repeats: YES]; > > [_timeoutAlert beginSheetModalForWindow: [self window] modalDelegate: self didEndSelector: @selector(alertDidEnd:returnCode:contextInfo:) contextInfo: NULL]; > } > } > > === > > In MyController.h, add these iVars: > > NSTimer *_timer; > NSAlert *_timeoutAlert; > NSUInteger _secondsRemaining; > > > Season to taste?_______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers