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:
parent
2b7f4c5060
commit
025ea3e560
@ -80,11 +80,10 @@ Query for open changes of watched projects:
|
|||||||
|
|
||||||
If the `n` query parameter is supplied and additional changes exist
|
If the `n` query parameter is supplied and additional changes exist
|
||||||
that match the query beyond the end, the last change object has a
|
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
|
`_more_changes: true` JSON field set.
|
||||||
the `N` query parameter, supplying the last change's `_sortkey` field
|
|
||||||
as the value. When going in the reverse direction with the `P` query
|
The `S` or `start` query parameter can be supplied to skip a number
|
||||||
parameter a `_more_changes: true` is put in the first change object if
|
of changes from the list.
|
||||||
there are results *before* the first change returned.
|
|
||||||
|
|
||||||
Clients are allowed to specify more than one query by setting the `q`
|
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
|
parameter multiple times. In this case the result is an array of
|
||||||
|
@ -80,7 +80,7 @@ public class QueryChanges implements RestReadView<TopLevelResource> {
|
|||||||
imp.setSortkeyBefore(key);
|
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) {
|
public void setStart(int start) {
|
||||||
imp.setStart(start);
|
imp.setStart(start);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user