[Unison-hackers] [unison-svn] r443 - branches/2.40/src
vouillon@seas.upenn.edu
vouillon at seas.upenn.edu
Tue May 4 11:50:26 EDT 2010
Author: vouillon
Date: 2010-05-04 11:50:26 -0400 (Tue, 04 May 2010)
New Revision: 443
Modified:
branches/2.40/src/RECENTNEWS
branches/2.40/src/mkProjectInfo.ml
branches/2.40/src/recon.ml
branches/2.40/src/uicommon.ml
branches/2.40/src/unicode.ml
Log:
Branch 2.40:
* Fix to Unicode case sensitive mode (call the right function for
comparing file names).
* "prefer = older/newer" now propagates deletions when there is no
conflict
Modified: branches/2.40/src/RECENTNEWS
===================================================================
--- branches/2.40/src/RECENTNEWS 2010-04-22 21:53:50 UTC (rev 442)
+++ branches/2.40/src/RECENTNEWS 2010-05-04 15:50:26 UTC (rev 443)
@@ -1,6 +1,15 @@
CHANGES FROM VERSION 2.40.16
Branch 2.40:
+* Fix to Unicode case sensitive mode (call the right function for
+ comparing file names).
+* "prefer = older/newer" now propagates deletions when there is no
+ conflict
+
+-------------------------------
+CHANGES FROM VERSION 2.40.16
+
+Branch 2.40:
* Fixed Unicode decomposition tables
* Removed wrongly added trunk directory
Modified: branches/2.40/src/mkProjectInfo.ml
===================================================================
--- branches/2.40/src/mkProjectInfo.ml 2010-04-22 21:53:50 UTC (rev 442)
+++ branches/2.40/src/mkProjectInfo.ml 2010-05-04 15:50:26 UTC (rev 443)
@@ -115,3 +115,4 @@
+
Modified: branches/2.40/src/recon.ml
===================================================================
--- branches/2.40/src/recon.ml 2010-04-22 21:53:50 UTC (rev 442)
+++ branches/2.40/src/recon.ml 2010-05-04 15:50:26 UTC (rev 443)
@@ -34,21 +34,22 @@
diff.direction <- Replica2ToReplica1
else if dir=`Merge then begin
if Globals.shouldMerge ri.path1 then diff.direction <- Merge
- end else (* dir = `Older or dir = `Newer *)
- if rc1.status<>`Deleted && rc2.status<>`Deleted then begin
- let comp = Props.time rc1.desc -. Props.time rc2.desc in
- let comp = if dir=`Newer then -. comp else comp in
- if comp = 0.0 then
- ()
- else if comp<0.0 then
- diff.direction <- Replica1ToReplica2
- else
- diff.direction <- Replica2ToReplica1
- end else if rc1.status=`Deleted && dir=`Newer then begin
- diff.direction <- Replica2ToReplica1
- end else if rc2.status=`Deleted && dir=`Newer then begin
- diff.direction <- Replica1ToReplica2
- end
+ end else begin (* dir = `Older or dir = `Newer *)
+ match rc1.status, rc2.status with
+ `Deleted, _ ->
+ if default=Conflict then
+ diff.direction <- Replica2ToReplica1
+ | _, `Deleted ->
+ if default=Conflict then
+ diff.direction <- Replica1ToReplica2
+ | _ ->
+ let comp = Props.time rc1.desc -. Props.time rc2.desc in
+ let comp = if dir=`Newer then -. comp else comp in
+ if comp<0.0 then
+ diff.direction <- Replica1ToReplica2
+ else
+ diff.direction <- Replica2ToReplica1
+ end
| _ ->
()
Modified: branches/2.40/src/uicommon.ml
===================================================================
--- branches/2.40/src/uicommon.ml 2010-04-22 21:53:50 UTC (rev 442)
+++ branches/2.40/src/uicommon.ml 2010-05-04 15:50:26 UTC (rev 443)
@@ -435,13 +435,15 @@
(* ---- *)
(*FIX: remove when Unison version > 2.40 *)
-let _ = Remote.registerRootCmd "unicodeCaseSensitive" (fun _ -> Lwt.return ())
+let _ =
+Remote.registerRootCmd "hasUnicodeCaseSensitive" (fun _ -> Lwt.return ())
let supportUnicodeCaseSensitive () =
if Uutil.myMajorVersion > "2.40" (* The test is correct until 2.99... *) then
Lwt.return true
else begin
Globals.allRootsMap
- (fun r -> Remote.commandAvailable r "unicodeCaseSensitive") >>= fun l ->
+ (fun r -> Remote.commandAvailable r "hasUnicodeCaseSensitive")
+ >>= fun l ->
Lwt.return (List.for_all (fun x -> x) l)
end
Modified: branches/2.40/src/unicode.ml
===================================================================
--- branches/2.40/src/unicode.ml 2010-04-22 21:53:50 UTC (rev 442)
+++ branches/2.40/src/unicode.ml 2010-05-04 15:50:26 UTC (rev 443)
@@ -1071,7 +1071,7 @@
end
let case_sensitive_compare s s' =
- compare_rec s s' 0 (min (String.length s) (String.length s'))
+ compare_cs_rec s s' 0 (min (String.length s) (String.length s'))
(****)
More information about the Unison-hackers
mailing list