# HG changeset patch # User Chris Cannam # Date 1498742179 -3600 # Node ID e4352ff029cfe7d58dc3a51df77c03bea5cf2ce2 # Parent b97b2b7af50c850937f13f247c59833612980552 Update vext diff -r b97b2b7af50c -r e4352ff029cf .hgignore --- a/.hgignore Thu Jun 29 11:23:15 2017 +0100 +++ b/.hgignore Thu Jun 29 14:16:19 2017 +0100 @@ -32,6 +32,7 @@ svgui svapp checker +piper piper-cpp dataquay bqvec diff -r b97b2b7af50c -r e4352ff029cf vext-lock.json --- a/vext-lock.json Thu Jun 29 11:23:15 2017 +0100 +++ b/vext-lock.json Thu Jun 29 14:16:19 2017 +0100 @@ -1,5 +1,5 @@ { - "libs": { + "libraries": { "vamp-plugin-sdk": { "pin": "5d9af3140f05" }, diff -r b97b2b7af50c -r e4352ff029cf vext-project.json --- a/vext-project.json Thu Jun 29 11:23:15 2017 +0100 +++ b/vext-project.json Thu Jun 29 14:16:19 2017 +0100 @@ -5,11 +5,11 @@ "services": { "soundsoftware": { "vcs": ["hg", "git"], - "anon": "https://code.soundsoftware.ac.uk/{vcs}/{repo}", - "auth": "https://{account}@code.soundsoftware.ac.uk/{vcs}/{repo}" + "anonymous": "https://code.soundsoftware.ac.uk/{vcs}/{repository}", + "authenticated": "https://{account}@code.soundsoftware.ac.uk/{vcs}/{repository}" } }, - "libs": { + "libraries": { "vamp-plugin-sdk": { "vcs": "hg", "service": "soundsoftware" diff -r b97b2b7af50c -r e4352ff029cf vext.sml --- a/vext.sml Thu Jun 29 11:23:15 2017 +0100 +++ b/vext.sml Thu Jun 29 14:16:19 2017 +0100 @@ -33,7 +33,7 @@ Software without prior written authorization. *) -val vext_version = "0.9.3" +val vext_version = "0.9.4" datatype vcs = @@ -945,16 +945,16 @@ service = "bitbucket", supports = [HG, GIT], remote_spec = { - anon = SOME "https://bitbucket.org/{owner}/{repo}", - auth = SOME "ssh://{vcs}@bitbucket.org/{owner}/{repo}" + anon = SOME "https://bitbucket.org/{owner}/{repository}", + auth = SOME "ssh://{vcs}@bitbucket.org/{owner}/{repository}" } }, { service = "github", supports = [GIT], remote_spec = { - anon = SOME "https://github.com/{owner}/{repo}", - auth = SOME "ssh://{vcs}@github.com/{owner}/{repo}" + anon = SOME "https://github.com/{owner}/{repository}", + auth = SOME "ssh://{vcs}@github.com/{owner}/{repository}" } } ] @@ -981,8 +981,8 @@ vv | _ => raise Fail "Array expected for vcs", remote_spec = { - anon = lookup_optional_string pjson ["anon"], - auth = lookup_optional_string pjson ["auth"] + anon = lookup_optional_string pjson ["anonymous"], + auth = lookup_optional_string pjson ["authenticated"] } } val loaded = @@ -1013,7 +1013,7 @@ SOME ostr => ostr | NONE => raise Fail ("Owner not specified for service " ^ service)) - | "repo" => repo + | "repository" => repo | "account" => (case login of SOME acc => acc @@ -1059,8 +1059,9 @@ (SOME _, SOME auth, _) => expand_spec auth req login | (SOME _, _, SOME anon) => expand_spec anon req NONE | (NONE, _, SOME anon) => expand_spec anon req NONE - | _ => raise Fail ("No suitable anon/auth URL spec " ^ - "provided for service \"" ^ service ^ "\"") + | _ => raise Fail ("No suitable anonymous or authenticated " ^ + "URL spec provided for service \"" ^ + service ^ "\"") fun login_for ({ accounts, ... } : context) service = case List.find (fn a => service = #service a) accounts of @@ -1369,9 +1370,11 @@ (fn HG => H.update | GIT => G.update) vcs context spec end +val libobjname = "libraries" + fun load_libspec spec_json lock_json libname : libspec = let open JsonBits - val libobj = lookup_mandatory spec_json ["libs", libname] + val libobj = lookup_mandatory spec_json [libobjname, libname] val vcs = lookup_mandatory_string libobj ["vcs"] val retrieve = lookup_optional_string libobj val service = retrieve ["service"] @@ -1380,7 +1383,7 @@ val url = retrieve ["url"] val branch = retrieve ["branch"] val user_pin = retrieve ["pin"] - val lock_pin = case lookup_optional lock_json ["libs", libname] of + val lock_pin = case lookup_optional lock_json [libobjname, libname] of SOME ll => lookup_optional_string ll ["pin"] | NONE => NONE in @@ -1450,8 +1453,8 @@ else Json.OBJECT [] val extdir = JsonBits.lookup_mandatory_string spec_json ["config", "extdir"] - val spec_libs = JsonBits.lookup_optional spec_json ["libs"] - val lock_libs = JsonBits.lookup_optional lock_json ["libs"] + val spec_libs = JsonBits.lookup_optional spec_json [libobjname] + val lock_libs = JsonBits.lookup_optional lock_json [libobjname] val providers = Provider.load_more_providers (#providers userconfig) spec_json val libnames = case spec_libs of @@ -1475,11 +1478,11 @@ open Json val lock_json = OBJECT [ - ("libs", OBJECT - (map (fn { libname, id_or_tag } => - (libname, - OBJECT [ ("pin", STRING id_or_tag) ])) - locks)) + (libobjname, + OBJECT (map (fn { libname, id_or_tag } => + (libname, + OBJECT [ ("pin", STRING id_or_tag) ])) + locks)) ] in JsonBits.save_json_to lock_file lock_json