Make -S an alias of --start in changes query REST API

The option had been added with the name `-S`.  Change the name
to `--start` with `-S` as an alias, making it consistent with the
naming in other REST APIs.

Add the option to the documentation.

Remove the documentation of `-P` and `-N`. These options only exist
to support online reindexing from clients with outdated JS, and are
deprecated. Keeping them in the documentation will potentially
cause confusion.

Bug: Issue 2878
Change-Id: I992acf4a3d1aeebb1ef40c6fed1afcb0fe26fa92
This commit is contained in:
David Pursehouse 2014-09-03 10:47:34 +09:00
parent 2b7f4c5060
commit 025ea3e560
2 changed files with 5 additions and 6 deletions

View File

@ -80,11 +80,10 @@ Query for open changes of watched projects:
If the `n` query parameter is supplied and additional changes exist
that match the query beyond the end, the last change object has a
`_more_changes: true` JSON field set. Callers can resume a query with
the `N` query parameter, supplying the last change's `_sortkey` field
as the value. When going in the reverse direction with the `P` query
parameter a `_more_changes: true` is put in the first change object if
there are results *before* the first change returned.
`_more_changes: true` JSON field set.
The `S` or `start` query parameter can be supplied to skip a number
of changes from the list.
Clients are allowed to specify more than one query by setting the `q`
parameter multiple times. In this case the result is an array of

View File

@ -80,7 +80,7 @@ public class QueryChanges implements RestReadView<TopLevelResource> {
imp.setSortkeyBefore(key);
}
@Option(name = "-S", metaVar = "CNT", usage = "Number of changes to skip")
@Option(name = "--start", aliases = {"-S"}, metaVar = "CNT", usage = "Number of changes to skip")
public void setStart(int start) {
imp.setStart(start);
}