Update the "change" field with submitted perforce changesets.

Review Request #6512 — Created Oct. 27, 2014 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x
84d1d68...

Reviewers

When a perforce changeset is submitted, it will often be given a new number in
order to ensure that changeset IDs are monotonically increasing. One
long-standing request we've had is to update the 'change' field on review
requests when this happens.

Without a hook on the SCM side, we don't have any notification that a changeset
was submitted, but it turns out that we do already query the perforce server to
determine whether or not to display "(pending)" next to the change number. This
change adds some logic to find whether or not the change number was updated,
and if so, store the new value. As part of this, we also now cache the
information on whether a changeset is pending or not.

I've also removed the now-unused get_pending_changesets() method.

Created and submitted several perforce changesets, and saw that the 'commit_id'
field on both the review request and any drafts was updated properly when the
page was reloaded after submitting the change. Verified that caching is working
as expected.

Ran unit tests.

    Loading...