changeset 350:f09defd7040b

Bitbucket -> Sourcehut, and subrepo update
author Chris Cannam
date Fri, 30 Aug 2019 12:05:12 +0100
parents 583dd29e3cce
children 228afe7eb408
files repoint-lock.json repoint-project.json repoint.sml
diffstat 3 files changed, 34 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/repoint-lock.json	Wed Aug 14 14:54:27 2019 +0100
+++ b/repoint-lock.json	Fri Aug 30 12:05:12 2019 +0100
@@ -1,10 +1,10 @@
 {
   "libraries": {
     "vamp-plugin-sdk": {
-      "pin": "62987b6d6a3b"
+      "pin": "0b6802e3b755"
     },
     "svcore": {
-      "pin": "57833933cc75"
+      "pin": "f19711ab7074"
     },
     "checker": {
       "pin": "c8c17e51aab0"
@@ -16,13 +16,13 @@
       "pin": "b82360a98f49"
     },
     "bqvec": {
-      "pin": "c2d355c29372"
+      "pin": "cd235ecbeb31"
     },
     "bqfft": {
-      "pin": "ff1d1bd48876"
+      "pin": "e1c392f85e97"
     },
     "bqresample": {
-      "pin": "f5dee7d40378"
+      "pin": "c2fb51b31fe4"
     },
     "bqthingfactory": {
       "pin": "7686116dcdd5"
--- a/repoint-project.json	Wed Aug 14 14:54:27 2019 +0100
+++ b/repoint-project.json	Fri Aug 30 12:05:12 2019 +0100
@@ -30,32 +30,32 @@
         },
         "dataquay": {
             "vcs": "hg",
-            "service": "bitbucket",
+            "service": "sourcehut",
             "owner": "breakfastquay"
         },
         "bqvec": {
             "vcs": "hg",
-            "service": "bitbucket",
+            "service": "sourcehut",
             "owner": "breakfastquay"
         },
         "bqfft": {
             "vcs": "hg",
-            "service": "bitbucket",
+            "service": "sourcehut",
             "owner": "breakfastquay"
         },
         "bqresample": {
             "vcs": "hg",
-            "service": "bitbucket",
+            "service": "sourcehut",
             "owner": "breakfastquay"
         },
         "bqthingfactory": {
             "vcs": "hg",
-            "service": "bitbucket",
+            "service": "sourcehut",
             "owner": "breakfastquay"
         },
         "bqaudiostream": {
             "vcs": "hg",
-            "service": "bitbucket",
+            "service": "sourcehut",
             "owner": "breakfastquay"
         },
         "sv-dependency-builds": {
--- a/repoint.sml	Wed Aug 14 14:54:27 2019 +0100
+++ b/repoint.sml	Fri Aug 30 12:05:12 2019 +0100
@@ -38,7 +38,7 @@
     authorization.
 *)
 
-val repoint_version = "1.1"
+val repoint_version = "1.2"
 
 
 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 = 
@@ -317,7 +329,7 @@
                 then arg
                 else "\"" ^ arg ^ "\""
             fun check arg =
-                let val valid = explode " /#:;?,._-{}@=+"
+                let val valid = explode " /#:;?,._-{}@=+%"
                 in
                     app (fn c =>
                             if isAlphaNum c orelse
@@ -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
@@ -1035,6 +1047,13 @@
                 anon = SOME "https://github.com/{owner}/{repository}",
                 auth = SOME "ssh://{vcs}@github.com/{owner}/{repository}"
             }
+          },
+          { service = "sourcehut",
+            supports = [HG, GIT],
+            remote_spec = {
+                anon = SOME "https://{vcs}.sr.ht/%7E{owner}/{repository}",
+                auth = SOME "ssh://{vcs}@{vcs}.sr.ht/%7E{owner}/{repository}"
+            }
           }
         ]