From standin-000 at tianya.cn Tue Apr 14 10:30:47 2009 From: standin-000 at tianya.cn (netawater) Date: Tue, 14 Apr 2009 22:30:47 +0800 Subject: [Unison-hackers] How to enable multi-threading when both roots are local Message-ID: <8763h79ujs.fsf@emacs.Arch.net> I have study the source code of unison-2.31.4: transport.ml:23:let maxthreads = transport.ml:24: Prefs.createInt "maxthreads" 20 transport.ml:33:let actionReg = Lwt_util.make_region (Prefs.read maxthreads) transport.ml:74: Lwt_util.resize_region actionReg (Prefs.read maxthreads); transport.ml:75: Lwt_util.resize_region Files.copyReg (Prefs.read maxthreads); It seems maxthreads always being enable, but unison run in mult-threads even I set maxthreads as 1 Thank you very much! From bcpierce at cis.upenn.edu Tue Apr 14 10:44:21 2009 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Tue, 14 Apr 2009 10:44:21 -0400 Subject: [Unison-hackers] How to enable multi-threading when both roots are local In-Reply-To: <8763h79ujs.fsf@emacs.Arch.net> References: <8763h79ujs.fsf@emacs.Arch.net> Message-ID: <2982FCC5-21BB-48BC-A173-BB996D2EFA10@cis.upenn.edu> On a single host, Unison should use all the available disk bandwidth just doing a single copy at a time, so there is no reason to enable multi-threading there. (Was this your question?) Best, - Benjamin On Apr 14, 2009, at 10:30 AM, netawater wrote: > I have study the source code of unison-2.31.4: > > transport.ml:23:let maxthreads = > transport.ml:24: Prefs.createInt "maxthreads" 20 > transport.ml:33:let actionReg = Lwt_util.make_region (Prefs.read > maxthreads) > transport.ml:74: Lwt_util.resize_region actionReg (Prefs.read > maxthreads); > transport.ml:75: Lwt_util.resize_region Files.copyReg (Prefs.read > maxthreads); > > It seems maxthreads always being enable, but unison run in > mult-threads even I set maxthreads as 1 > > Thank you very much! > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From standin-000 at tianya.cn Wed Apr 15 10:04:09 2009 From: standin-000 at tianya.cn (netawater) Date: Wed, 15 Apr 2009 22:04:09 +0800 Subject: [Unison-hackers] How to enable multi-threading when both roots are local References: <8763h79ujs.fsf@emacs.Arch.net> <2982FCC5-21BB-48BC-A173-BB996D2EFA10@cis.upenn.edu> Message-ID: <87zleiui7a.fsf@emacs.Arch.net> Benjamin Pierce writes: > On a single host, Unison should use all the available disk bandwidth > just doing a single copy at a time, so there is no reason to enable > multi-threading there. (Was this your question?) > > Best, > > - Benjamin > > > On Apr 14, 2009, at 10:30 AM, netawater wrote: > >> I have study the source code of unison-2.31.4: >> >> transport.ml:23:let maxthreads = >> transport.ml:24: Prefs.createInt "maxthreads" 20 >> transport.ml:33:let actionReg = Lwt_util.make_region (Prefs.read >> maxthreads) >> transport.ml:74: Lwt_util.resize_region actionReg (Prefs.read >> maxthreads); >> transport.ml:75: Lwt_util.resize_region Files.copyReg (Prefs.read >> maxthreads); >> >> It seems maxthreads always being enable, but unison run in >> mult-threads even I set maxthreads as 1 >> >> Thank you very much! >> >> _______________________________________________ >> Unison-hackers mailing list >> Unison-hackers at lists.seas.upenn.edu >> http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers Thank you for your reply, it is the same situation: I use a network driver which is regarded as local disk by unison, I need single thread write process to adapt that network driver. From der.claudio at aon.at Tue Apr 28 17:32:42 2009 From: der.claudio at aon.at (Claudio) Date: Tue, 28 Apr 2009 23:32:42 +0200 Subject: [Unison-hackers] the unison [0-9]*.* bug Message-ID: <20090428213242.GA10329@aon.at> Hi unison developers and hackers, I've been using unison productively for quite a while. It rocks! Thanks for it! I've encountered the behaviour that unison ignores some files even if there isn't a single "ignore" directive(!). For example those files are affected: 1237678487.000102.mbox:2,S 20._Geburtstag 05.HTM 400.html 04.03.tar.gz 2. 3.3 4.foo 55.bar unison version 2.27.57 (shipped with ubuntu) So it doesnt sync my mails in ~/Maildir and a huge amount other documents. I found a creepy workaround: ignorenot = Name [0-9]*.* Is this bug new anyway? Greetings Claudio Harringer From bcpierce at cis.upenn.edu Tue Apr 28 17:40:29 2009 From: bcpierce at cis.upenn.edu (Benjamin Pierce) Date: Tue, 28 Apr 2009 17:40:29 -0400 Subject: [Unison-hackers] the unison [0-9]*.* bug In-Reply-To: <20090428213242.GA10329@aon.at> References: <20090428213242.GA10329@aon.at> Message-ID: <035A1033-238A-41CA-B9F5-F78F7020C0DB@cis.upenn.edu> Probably you have a "backup" preference set to something beginning with the backup prefix (which is a number). Unison tries to ignore backup files... - B On Apr 28, 2009, at 5:32 PM, Claudio wrote: > Hi unison developers and hackers, > > I've been using unison productively for quite a while. It rocks! > Thanks > for it! > > I've encountered the behaviour that unison ignores some files even if > there isn't a single "ignore" directive(!). For example those files > are > affected: > > 1237678487.000102.mbox:2,S > 20._Geburtstag > 05.HTM > 400.html > 04.03.tar.gz > 2. > 3.3 > 4.foo > 55.bar > > unison version 2.27.57 (shipped with ubuntu) > > So it doesnt sync my mails in ~/Maildir and a huge amount other > documents. I found a creepy workaround: > > ignorenot = Name [0-9]*.* > > Is this bug new anyway? > > Greetings > > Claudio Harringer > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From vouillon at seas.upenn.edu Wed Apr 29 10:36:51 2009 From: vouillon at seas.upenn.edu (vouillon@seas.upenn.edu) Date: Wed, 29 Apr 2009 10:36:51 -0400 Subject: [Unison-hackers] [unison-svn] r319 - trunk/src Message-ID: <200904291436.n3TEap8A006803@yaws.seas.upenn.edu> Author: vouillon Date: 2009-04-29 10:36:48 -0400 (Wed, 29 Apr 2009) New Revision: 319 Modified: trunk/src/RECENTNEWS trunk/src/mkProjectInfo.ml trunk/src/name.ml trunk/src/props.ml trunk/src/update.ml Log: * Ignore one hour differences for deciding whether a file may have been updated. This avoids slow update detection after daylight saving time changes under Windows. This makes it slightly more likely to miss an update, but that should be safe enough. Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2009-03-13 02:38:02 UTC (rev 318) +++ trunk/src/RECENTNEWS 2009-04-29 14:36:48 UTC (rev 319) @@ -1,3 +1,11 @@ +CHANGES FROM VERSION 2.32.5 + +* Ignore one hour differences for deciding whether a file may have + been updated. This avoids slow update detection after daylight + saving time changes under Windows. This makes it slightly more + likely to miss an update, but that should be safe enough. + +------------------------------- CHANGES FROM VERSION 2.32.4 * Text UI now includes the current time in its completion message Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2009-03-13 02:38:02 UTC (rev 318) +++ trunk/src/mkProjectInfo.ml 2009-04-29 14:36:48 UTC (rev 319) @@ -102,3 +102,4 @@ + Modified: trunk/src/name.ml =================================================================== --- trunk/src/name.ml 2009-03-13 02:38:02 UTC (rev 318) +++ trunk/src/name.ml 2009-04-29 14:36:48 UTC (rev 319) @@ -27,4 +27,4 @@ s let hash n = - Hashtbl.hash (if Case.insensitive () then String.lowercase n else n) + Hashtbl.hash (if Case.insensitive () then String.lowercase (Case.normalize n) else n) Modified: trunk/src/props.ml =================================================================== --- trunk/src/props.ml 2009-03-13 02:38:02 UTC (rev 318) +++ trunk/src/props.ml 2009-04-29 14:36:48 UTC (rev 319) @@ -562,8 +562,11 @@ we have to compare then using "similar". *) let same p p' = match p, p' with - Synced _, Synced _ -> similar p p' - | _ -> extract p = extract p' + Synced _, Synced _ -> + similar p p' + | _ -> + let delta = extract p -. extract p' in + delta = 0. || delta = 3600. || delta = -3600. let init _ = () Modified: trunk/src/update.ml =================================================================== --- trunk/src/update.ml 2009-03-13 02:38:02 UTC (rev 318) +++ trunk/src/update.ml 2009-04-29 14:36:48 UTC (rev 319) @@ -17,8 +17,9 @@ archive changes: old archives will then automatically be discarded. (We do not use the unison version number for this because usually the archive representation does not change between unison versions.) *) -(*FIX: change the approximate function in props.ml next time the +(*FIX: Use similar_correct in props.ml next time the format is modified (see file props.ml for the new function) *) +(*FIX: use Case.normalize next time the format is modified *) (*FIX: also change Fileinfo.stamp to drop the info.ctime component, next time the format is modified *) (*FIX: also make Jerome's suggested change about file times (see his mesg in