2272: Automatic Update of Change Number in ReviewBoard

jagtar******@gmai***** (Google Code) (Is this you? Claim this profile.)
david
david
Oct. 28, 2014
3124, 3326
What version are you running?


What's the URL of the page containing the problem?


What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What operating system are you using? What browser?


Please provide any additional information below.

I am using ReviewBoard with Perforce. To create a Review, I need to make changes in Perforce and store that changes into 'Saved Numbered Changelist' say 1543. Now if the Review is reviewed next day, there might be more changes are submitted in the Perforce. When I am finally going to submit my change from ChangeList 1543, my changes are submitted with the lasted CL available say 1619. Now when I open the review anytime, the Change Number associated with that review display Change Number 1543. There is no reference of ChangeList 1619 in that particular review.

Now my question is how to update the Change Number in ReviewBoard once I get approval of Ship It from the reviewer.
chipx86
#1 chipx86
The change number can only be updated today through the API, as giving users the option to specify their own change number can actually cause problems due to how we treat the change number internally. Some places have a script that takes the new change number and uses the API to update it, but I don't have code you can use off-hand for this.

If you're using Review Board 1.6, you can specify the change number the change was committed as in the Close Description message, which will provide the same effect.
david
#2 david
  • -Type-Defect
    +Type-Enhancement
david
#3 david
  • +Component-Reviews
david
#5 david
From the merged bug:

You can use "p4 change -O -o <changelist>" to find the new changelist number for a submitted changelist. This also conveniently works for changelists that have not been renamed such as pending changelists.

In scmtools/perforce.py, in PerforceClient._get_changeset you currently call "p4 describe -s <changesetid>" to get the changeset information. If you instead first call "p4 change -O -o <changesetid>" and parse out the new changelist number you can then call "p4 describe -s" on the new changelist number. You would then need to update PerforceTool.parse_change_desc to set changeset.changenum to the parsed changenum instead of the passed in changenum.
david
#6 david
  • +Automatic Update of Change Number in ReveiwBoard
chipx86
#8 chipx86
  • +Confirmed
  • +Milestone-Release2.0.x
  • -Automatic Update of Change Number in ReveiwBoard
    +Automatic Update of Change Number in ReviewBoard
david
#9 david
  • -Confirmed
    +PendingReview
  • +david
david
#10 david
Fixed in release-2.0.x (27f3ccc). Thanks!
  • -PendingReview
    +Fixed