Merge branch 'stable-2.10'

* stable-2.10:
  Replace "line" with "end_line" when range is given in inline comment
  Add example of range comment in REST API documentation
This commit is contained in:
Shawn Pearce
2014-08-27 17:26:41 -07:00
2 changed files with 11 additions and 1 deletions

View File

@@ -1877,6 +1877,15 @@ link:#review-input[ReviewInput] entity.
{
"line": 49,
"message": "[nit] s/conrtol/control"
},
{
"range": {
"start_line": 50,
"start_character": 0,
"end_line": 55,
"end_character": 20
},
"message": "Incorrect indentation"
}
]
}
@@ -3273,7 +3282,7 @@ If not set, the default is `REVISION`.
The number of the line for which the comment should be added. +
`0` if it is a file comment. +
If neither line nor range is set, a file comment is added. +
If range is set, this should equal the end line of the range.
If range is set, this value is ignored in favor of the `end_line` of the range.
|`range` |optional|
The range of the comment as a link:#comment-range[CommentRange]
entity.

View File

@@ -371,6 +371,7 @@ public class PostReview implements RestModifyView<RevisionResource, ReviewInput>
c.range.startCharacter,
c.range.endLine,
c.range.endCharacter));
e.setLine(c.range.endLine);
}
ups.add(e);
}