cl

command
v0.0.0-...-cca8170 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2015 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

CL prints a list of open Go code reviews (also known as change lists, or CLs).

Usage:

cl [-closed] [-json] [-r] [-url] [query ...]

CL searches Gerrit for CLs matching the query and then prints a line for each CL that is waiting for review (as opposed to waiting for revisions by the author).

The output line looks like:

CL 9225    0/ 2d  go   rsc   austin*   cmd/internal/gc: emit write barrier

From left to right, the columns show the CL number, the number of days the CL has been in the current waiting state (waiting for author or waiting for review), the number of days since the CL was created, the project name ("go" or the name of a subrepository), the author, the reviewer, and the subject. If the query restricts results to a single project (for example, "cl project:go"), the project column is elided. If the CL is waiting for revisions by the author, the author column has an asterisk. If the CL is waiting for a reviewer, the reviewer column has an asterisk. If the CL has been reviewed by the reviewer, the reviewer column shows the current score.

By default, CL omits closed reviews, those with an R=close reply and no subsequent upload of a new patch set. If the -closed flag is specified, CL adds closed reviews to the output.

If the -r flag is specified, CL shows only CLs that need review, not those waiting for the author. In this mode, the redundant “waiting for reviewer” asterisk is elided.

If the -url flag is specified, CL replaces "CL 1234" at the beginning of each output line with a full URL, "https://golang.org/cl/1234".

By default, CL sorts the output first by the combination of project name and change subject. The -sort flag changes the sort order. The choices are "delay", to sort by the time the change has been in the current waiting state, and "age", to sort by creation time. When sorting, ties are broken by CL number.

If the -json flag is specified, CL does not print the usual listing. Instead, it prints a JSON array holding CL objects, one for each matched CL. Each of the CL objects is generated by this Go struct:

type CL struct {
	Number             int            // CL number
	Subject            string         // subject (first line of commit message)
	Project            string         // "go" or a subrepository name
	Author             string         // author, short form or else full email
	AuthorEmail        string         // author, full email
	Reviewer           string         // expected reviewer, short form or else full email
	ReviewerEmail      string         // expected reviewer, full email
	Start              time.Time      // time CL was first uploaded
	NeedsReview        bool           // CL is waiting for reviewer (otherwise author)
	NeedsReviewChanged time.Time      // time NeedsReview last changed
	Closed             bool           // CL closed with R=close
	Issues             []int          // issues referenced by commit message
	Scores             map[string]int // current review scores
	Files              []string       // files changed in CL
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL