SSH query command: Add --start n option to skip n changes
Change-Id: If5031ce1a91a4fa68828241f1dfcf0c54f58652e
This commit is contained in:
		
				
					committed by
					
						
						Dave Borowitz
					
				
			
			
				
	
			
			
			
						parent
						
							70b4f8f703
						
					
				
				
					commit
					6855018bb3
				
			@@ -15,6 +15,7 @@ gerrit query - Query the change database
 | 
				
			|||||||
  [--dependencies]
 | 
					  [--dependencies]
 | 
				
			||||||
  [--submit-records]
 | 
					  [--submit-records]
 | 
				
			||||||
  [--all-reviewers]
 | 
					  [--all-reviewers]
 | 
				
			||||||
 | 
					  [--start <n> | -S <n>]
 | 
				
			||||||
  [--]
 | 
					  [--]
 | 
				
			||||||
  <query>
 | 
					  <query>
 | 
				
			||||||
  [limit:<n>]
 | 
					  [limit:<n>]
 | 
				
			||||||
@@ -95,6 +96,10 @@ command line parser in the server).
 | 
				
			|||||||
	includes whether the change meets the criteria for submission
 | 
						includes whether the change meets the criteria for submission
 | 
				
			||||||
	(including information for each review label).
 | 
						(including information for each review label).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--start::
 | 
				
			||||||
 | 
					-S::
 | 
				
			||||||
 | 
						Number of changes to skip.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
limit:<n>::
 | 
					limit:<n>::
 | 
				
			||||||
	Maximum number of results to return.  This is actually a
 | 
						Maximum number of results to return.  This is actually a
 | 
				
			||||||
	query operator, and not a command line option.	If more
 | 
						query operator, and not a command line option.	If more
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -146,7 +146,7 @@ public class QueryProcessor {
 | 
				
			|||||||
    limit = n;
 | 
					    limit = n;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void setStart(int n) {
 | 
					  public void setStart(int n) {
 | 
				
			||||||
    start = n;
 | 
					    start = n;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -85,6 +85,11 @@ class Query extends SshCommand {
 | 
				
			|||||||
    processor.setIncludeSubmitRecords(on);
 | 
					    processor.setIncludeSubmitRecords(on);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  @Option(name = "--start", aliases = {"-S"}, usage = "Number of changes to skip")
 | 
				
			||||||
 | 
					  void setStart(int start) {
 | 
				
			||||||
 | 
					    processor.setStart(start);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @Argument(index = 0, required = true, multiValued = true, metaVar = "QUERY", usage = "Query to execute")
 | 
					  @Argument(index = 0, required = true, multiValued = true, metaVar = "QUERY", usage = "Query to execute")
 | 
				
			||||||
  private List<String> query;
 | 
					  private List<String> query;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user