From 6002bb279b9c5888287c7e8b03caa43f463a99a6 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 10 Oct 2012 11:40:49 +0900 Subject: [PATCH] Add missing JSON attribute documentation Documentation is missing for several JSON attributes. Add it. Also fix a minor typo in Patch.java comments, where some of the added documentation is copy/pasted from. Change-Id: I1bb33384a668ebc5c4b778773a59ba1291100660 --- Documentation/json.txt | 88 ++++++++++++++++++- .../google/gerrit/reviewdb/client/Patch.java | 2 +- 2 files changed, 85 insertions(+), 5 deletions(-) diff --git a/Documentation/json.txt b/Documentation/json.txt index f0588ceb17..aea9bac1a7 100644 --- a/Documentation/json.txt +++ b/Documentation/json.txt @@ -30,6 +30,9 @@ url:: Canonical URL to reach this change. commitMessage:: The full commit message for the change. +createdOn:: Time in seconds since the UNIX epoch when this change +was created. + lastUpdated:: Time in seconds since the UNIX epoch when this change was last updated. @@ -48,14 +51,20 @@ status:: Current state of this change. ABANDONED;; Change was abandoned by its owner or administrator. +comments:: All comments for this change in <>. + trackingIds:: Issue tracking system links in -<>, scraped out of the commit +<>, scraped out of the commit message based on the server's link:config-gerrit.html#trackingid[trackingid] sections. currentPatchSet:: Current <>. -patchSets:: All <> for this change. +patchSets:: All <> for this change. + +dependsOn:: List of changes that this change depends on in <>. + +neededBy:: List of changes that depend on this change in <>. submitRecords:: The <> contains information about whether this change has been or can be submitted. @@ -90,14 +99,23 @@ number:: The patchset number. revision:: Git commit for this patchset. +parents:: List of parent revisions. + ref:: Git reference pointing at the revision. This reference is available through the Gerrit Code Review server's Git interface for the containing change. uploader:: Uploader of the patch set in <>. +createdOn:: Time in seconds since the UNIX epoch when this patchset +was created. + approvals:: The <> granted. +comments:: All inline comments for this patchset in <>. + +files:: All changed files in this patchset in <>. + [[approval]] approval -------- @@ -123,10 +141,10 @@ oldRev:: The old value of the ref, prior to the update. newRev:: The new value the ref was updated to. -project:: Project path in Gerrit. - refName:: Ref name within project. +project:: Project path in Gerrit. + [[queryLimit]] queryLimit ---------- @@ -178,6 +196,68 @@ status:: The status of the label. by:: The <> that applied the label. +[[dependency]] +dependency +---------- +Information about a change or patchset dependency. + +id:: Change identifier. + +number:: Change number. + +revision:: Patchset revision. + +ref:: Ref name. + +isCurrentPatchSet:: If the revision is the current patchset of the change. + +[[message]] +message +------- +Comment added on a change by a reviewer. + +timestamp:: Time in seconds since the UNIX epoch when this comment +was added. + +reviewer:: The <> that added the comment. + +message:: The comment text. + +[[patchsetcomment]] +patchsetComment +--------------- +Comment added inline on a patchset by a reviewer. + +file:: The name of the file on which the comment was added. + +line:: The line number at which the comment was added. + +reviewer:: The <> that added the comment. + +message:: The comment text. + +[[patch]] +patch +----- +Information about a patch on a file. + +file:: The name of the file. + +type:: The type of change. + + ADDED;; The file is being created/introduced by this patch. + + MODIFIED;; The file already exists, and has updated content. + + DELETED;; The file existed, but is being removed by this patch. + + RENAMED;; The file is renamed. + + COPIED;; The file is copied from another file. + + REWRITE;; Sufficient amount of content changed to claim the file was rewritten. + + SEE ALSO -------- diff --git a/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/Patch.java b/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/Patch.java index 00e282b520..6ddd6d23d6 100644 --- a/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/Patch.java +++ b/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/Patch.java @@ -84,7 +84,7 @@ public final class Patch { /** Path was copied from {@link Patch#getSourceFileName()}. */ COPIED('C'), - /** Sufficient amount of content changed to claim the file was written. */ + /** Sufficient amount of content changed to claim the file was rewritten. */ REWRITE('W'); private final char code;