Hi, The line number is not actually the line of a file, but rather the row of the side-by-side diff. This is for legacy reasons. Once upon a time, we didn't have real line number information.
You'd have to figure out which row (1-based) corresponds to the line you care about and use that number. We should document that better. Christian -- Christian Hammond - chip...@chipx86.com Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com On Mon, Sep 17, 2012 at 4:47 AM, soorajchirag <contact.sund...@gmail.com>wrote: > Hi, > > I am looking at the web page: > http://www.reviewboard.org/docs/manual/1.6/webapi/2.0/resources/review-diff-comment-list/#webapi2.0-review-diff-comment-list-resource > to > know how to post comments using the API on an uploaded diff. > > The comment is getting posted by using the parameters specified on the > page, but the first_line parameter doesn't seem to be working as expected. > From the web page quoted above: > > first_line (required) Integer The line number the comment > starts at. > > The issue: > I am setting the first_line as the one where I want the comment to appear > on the updated content (right hand column in the browser). I have verified > that the request being sent to the reviewboard server has the correct > first_line value. But when I view the review using the Web browser it > appears at a different line number. > > The line number is not correct even if I assume that the first_line is > based on the line numbers of the original content. > > Eg: > Posted on line number 1594, displayed on: > 1. New content line number 1468 > 2. Old content line number 1505 > > If I use the Web browser to post the comment on the intended line (i.e. > 1594), I see that it uses first_line as 1720! > > I am running version 1.6.3. > > Is my understanding of the description of first_line incorrect? Any > suggestions on how to go about figuring out the cause? > > Thanks, > Sundeep > > -- > Want to help the Review Board project? Donate today at > http://www.reviewboard.org/donate/ > Happy user? Let us know at http://www.reviewboard.org/users/ > -~----------~----~----~----~------~----~------~--~--- > To unsubscribe from this group, send email to > reviewboard+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~----------~----~----~----~------~----~------~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en