# HG changeset patch # User wenzelm # Date 1576683102 -3600 # Node ID fd644fb7871b57e05477a6260d8fc487f6c77c8b # Parent 072e585ba2381cc8bb89b8cba70966f718d40ae7 clarified signature; diff -r 072e585ba238 -r fd644fb7871b src/Pure/Tools/phabricator.scala --- a/src/Pure/Tools/phabricator.scala Wed Dec 18 16:22:10 2019 +0100 +++ b/src/Pure/Tools/phabricator.scala Wed Dec 18 16:31:42 2019 +0100 @@ -914,7 +914,7 @@ short_name: String = "", // unique name description: String = "", public: Boolean = false, - vcs: API.VCS.Value = API.VCS.hg): String = + vcs: API.VCS.Value = API.VCS.hg): API.Repository = { require(name.nonEmpty) @@ -928,14 +928,16 @@ else API.edits("view", user_phid) ::: API.edits("policy.push", user_phid)) ::: API.edits("status", "active") - val repo_phid = + val phid = execute("diffusion.repository.edit", params = JSON.Object("transactions" -> transactions)) .get_value(JSON.value(_, "object", JSON.string(_, "phid"))) - execute("diffusion.looksoon", - params = JSON.Object("repositories" -> List(repo_phid))).get + execute("diffusion.looksoon", params = JSON.Object("repositories" -> List(phid))).get - repo_phid + get_repositories(phid = phid) match { + case List(repo) => repo + case _ => error("Failed to access new repository: " + quote(phid)) + } } }