# HG changeset patch # User wenzelm # Date 1576617740 -3600 # Node ID 48e72c72b4d8ea72b8cdf3fc722896c943125e95 # Parent 0e3a3e3cf482b8f47b736a0fd8529fed0bac4642 tuned; diff -r 0e3a3e3cf482 -r 48e72c72b4d8 src/Pure/Tools/phabricator.scala --- a/src/Pure/Tools/phabricator.scala Tue Dec 17 22:18:37 2019 +0100 +++ b/src/Pure/Tools/phabricator.scala Tue Dec 17 22:22:20 2019 +0100 @@ -907,6 +907,20 @@ object API { + /* repository parameters */ + + object VCS extends Enumeration + { + val hg, git, svn = Value + } + + def edits(typ: String, value: JSON.T): List[JSON.Object.T] = + List(JSON.Object("type" -> typ, "value" -> value)) + + def opt_edits(typ: String, value: Option[JSON.T]): List[JSON.Object.T] = + value.toList.flatMap(edits(typ, _)) + + /* result with optional error */ sealed case class Result(result: JSON.T, error: Option[String]) @@ -927,19 +941,5 @@ val error_code = JSON.string(json, "error_code") Result(result, error_info orElse error_code) } - - - /* repository operations */ - - object VCS extends Enumeration - { - val hg, git, svn = Value - } - - def edits(typ: String, value: JSON.T): List[JSON.Object.T] = - List(JSON.Object("type" -> typ, "value" -> value)) - - def opt_edits(typ: String, value: Option[JSON.T]): List[JSON.Object.T] = - value.toList.flatMap(edits(typ, _)) } }