Move resources about too Make README.md point to my prodigial pre-existing documentation. Change-Id: I5d51c35e1fc063434fa25d6b115f25eaa8842659
diff --git a/BUILD b/BUILD index fcafac3..85d236c 100644 --- a/BUILD +++ b/BUILD
@@ -10,14 +10,14 @@ "Implementation-Title: Supermanifest plugin", "Implementation-URL: https://gerrit-review.googlesource.com/#/todo", ], - resources = glob(["src/main/**/*"]), + resources = glob(["java/Documentation/**/*.md"]), ) junit_tests( name = "supermanifest_tests", size = "large", srcs = glob(["javatests/**/*IT.java"]), - resources = glob(["src/test/resources/**"]), + resources = glob(["javatests/**/*.properties"]), tags = [ "supermanifest-plugin", ],
diff --git a/README.md b/README.md index f425dbf..803c854 100644 --- a/README.md +++ b/README.md
@@ -1,59 +1,5 @@ -SUMMARY -======= - -The SuperManifest plugin is for projects that use the 'repo' tool to piece -together a tree of git repositories. The repo tool reads an XML file that -describes the layout of the tree. - -The file is usually called `default.xml`, and the repository is usually called -`manifest`. - -Notable projects that use 'repo' include the Android Open Source Project. The plugin will update a superproject to contain the submodules defined in the manifest XML file whenever the manifest repo is changed. - -CONFIGURATION -============= - -The plugin should be enabled in `gerrit.config`, and then configured with a -`supermanifest.config` configuration file in the `refs/meta/config` branch. The -`supermanifest.config` lists the mappings from source, eg. - -``` - [superproject "codesearch:refs/heads/stable"] - srcRepo = manifest - srcPath = default.xml - srcBranch = stable -``` - -If all branches from the manifest repo should be mirrored into the -`codesearch` repository, you can specify `*` as the destination -branch, e.g., - -``` - [superproject "codesearch:refs/heads/*"] - srcRepo = manifest - srcPath = default.xml -``` - -MANUAL TRIGGER -============== - -Users that have the `administrateServer` permission may simulate an update to -the manifest repository. This is useful for debugging, and provides diagnostics -that are otherwise written into the server logs. To do so, issue the following -call - -```sh -curl -X POST - http://HOST/a/projects/codesearch/branches/master/update_manifest -``` - -JIRI -==== - -There is also support for the Jiri manifest file used in the Fuchsia OS. - -TODO(anmittal): provide more documentation. +For more information see [the documentation](java/Documentation/about.md).
diff --git a/java/Documentation/about.md b/java/Documentation/about.md new file mode 100644 index 0000000..4de2ad3 --- /dev/null +++ b/java/Documentation/about.md
@@ -0,0 +1,89 @@ +SUMMARY +======= + +The SuperManifest plugin is for projects that use the 'repo' tool to piece +together a tree of git repositories. The repo tool reads an XML file that +describes the layout of the tree. + +The file is usually called `default.xml`, and the repository is usually called +`manifest`. + +Notable projects that use 'repo' include the Android Open Source Project. + +The plugin will update a superproject to contain the submodules defined in the +manifest XML file whenever the manifest repo is changed. + + +CONFIGURATION +============= + +It should be configured by adding `supermanifest.config` to the +`All-Projects` project. The format for configuration is as follows: + + +``` +[superproject "submodules:refs/heads/nyc"] + srcRepo = platforms/manifest + srcRef = refs/heads/nyc + srcPath = manifest.xml + toolType = repo +``` + +this configures a repository called `submodules` to have a branch +`nyc`, for which the contents corresponds to the manifest file +`manifest.xml` on branch `refs/heads/nyc` in project `platforms/manifest`. + +valid value(s) for `toolType` right now is `repo`. It can be left blank to +default to `repo`. + +The plugin supports the following options: + +* `recordSubmoduleLabels` (defaults to false). Sets recordSubmoduleLabels + setting for JGit's RepoCommand + +* `ignoreRemoteFailures = true` (defaults to false). Sets ignoreRemoteFailures. + Setting it true will cause repos that are not accessible to be ignored. + + +For the destination branch, you may also specify `*` to copy all +branches in the manifest repository. + +``` +[superproject "submodules:*"] + srcRepo = platforms/manifest + srcPath = manifest.xml +``` + +This plugin bypasses visibility restrictions, so edits to the manifest +repo can be used to reveal existence of hidden repositories or +branches. + + +MANUAL TRIGGER +============== + +Users that have the `administrateServer` permission may simulate an update to +the manifest repository. This is useful for debugging, and provides diagnostics +that are otherwise written into the server logs. To do so, issue the following +call + +```sh +curl -X POST + http://HOST/a/projects/codesearch/branches/master/update_manifest +``` + + +JIRI +==== + +There is also support for the Jiri manifest file used in the Fuchsia OS. + +``` +[superproject "submodules:refs/heads/master"] + srcRepo = platforms/manifest + srcRef = refs/heads/master + srcPath = manifest.xml + toolType = jiri +``` + +TODO(anmittal): provide more documentation.
diff --git a/src/test/resources/log4j.properties b/javatests/log4j.properties similarity index 100% rename from src/test/resources/log4j.properties rename to javatests/log4j.properties
diff --git a/src/main/resources/Documentation/about.md b/src/main/resources/Documentation/about.md deleted file mode 100644 index f2623d3..0000000 --- a/src/main/resources/Documentation/about.md +++ /dev/null
@@ -1,42 +0,0 @@ -This plugin updates a submodule superproject based on a manifest repository. - -It should be configured by adding `supermanifest.config` to the -`All-Projects` project. The format for configuration is as follows: - - -``` -[superproject "submodules:refs/heads/nyc"] - srcRepo = platforms/manifest - srcRef = refs/heads/nyc - srcPath = manifest.xml - toolType = repo -``` - -this configures a repository called `submodules` to have a branch -`nyc`, for which the contents corresponds to the manifest file -`manifest.xml` on branch `refs/heads/nyc` in project `platforms/manifest`. - -valid value(s) for `toolType` right now is `repo`. It can be left blank to -default to `repo`. - -The plugin supports the following options: - -* `recordSubmoduleLabels` (defaults to false). Sets recordSubmoduleLabels - setting for JGit's RepoCommand - -* `ignoreRemoteFailures = true` (defaults to false). Sets ignoreRemoteFailures. - Setting it true will cause repos that are not accessible to be ignored. - - -For the destination branch, you may also specify `*` to copy all -branches in the manifest repository. - -``` -[superproject "submodules:*"] - srcRepo = platforms/manifest - srcPath = manifest.xml -``` - -This plugin bypasses visibility restrictions, so edits to the manifest -repo can be used to reveal existence of hidden repositories or -branches.