changeset 2293:a3951575def3

Subrepo and Repoint update
author Chris Cannam
date Tue, 11 Jun 2019 14:21:00 +0100 (2019-06-11)
parents f0d6a7fee7a1
children 3facfe72c1bd
files repoint-lock.json repoint.sml
diffstat 2 files changed, 18 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/repoint-lock.json	Fri May 24 14:42:01 2019 +0100
+++ b/repoint-lock.json	Tue Jun 11 14:21:00 2019 +0100
@@ -4,13 +4,13 @@
       "pin": "62987b6d6a3b"
     },
     "svcore": {
-      "pin": "417528c41e66"
+      "pin": "29c5fdaccb9b"
     },
     "svgui": {
-      "pin": "66bf1abfefc1"
+      "pin": "0ecfaa463c1b"
     },
     "svapp": {
-      "pin": "b375fdbb74bc"
+      "pin": "4d26b66931f8"
     },
     "checker": {
       "pin": "c8c17e51aab0"
--- a/repoint.sml	Fri May 24 14:42:01 2019 +0100
+++ b/repoint.sml	Tue Jun 11 14:21:00 2019 +0100
@@ -38,7 +38,7 @@
     authorization.
 *)
 
-val repoint_version = "1.1"
+val repoint_version = "1.1.1"
 
 
 datatype vcs =
@@ -279,6 +279,18 @@
 
     fun trim str =
         hd (String.fields (fn x => x = #"\n" orelse x = #"\r") str)
+
+    fun make_canonical path =
+        (* SML/NJ doesn't properly handle "/" when splitting paths -
+           it should be a path separator even on Windows, but SML/NJ
+           treats it as a normal filename character there. So we must
+           convert these explicitly *)
+        OS.Path.mkCanonical
+            (if OS.Path.concat ("a", "b") = "a\\b"
+             then String.translate (fn #"/" => "\\" |
+                                    c => Char.toString c)
+                                   path
+             else path)
             
     fun file_url path =
         let val forward_path = 
@@ -427,7 +439,7 @@
                                       ERROR ("Directory creation failed: " ^ e))
 
     fun mkpath path =
-        mkpath' (OS.Path.mkCanonical path)
+        mkpath' (make_canonical path)
 
     fun dir_contents dir =
         let open OS
@@ -463,7 +475,7 @@
         end
 
     fun rmpath path =
-        rmpath' (OS.Path.mkCanonical path)
+        rmpath' (make_canonical path)
 
     fun nonempty_dir_exists path =
         let open OS.FileSys