Allow uploading simple linear history with Git.
Review Request #6787 — Created Jan. 16, 2015 and submitted — Latest diff uploaded
The default behaviour for posting is now to determine the capabilities
of the server to see if it supports creating a review request with
commit history. The user can specify the-S/--squash-history
option orSQUASH_HISTORYconfig option in.reviewboardrcto
override this. However, the configuration option can itself be
overridden by the-H/--with-historyflag.Currently the only
SCMClients that "supports" this flag is Git.Add the
DiffCommitResourceandDiffCommitListResourceresources to
the RBTools web API resources. TheDiffCommitListResourcehandles
the uploading of commits via theupload_commitmethod.Add the
create_empty_diffsetmethod to theDiffListResourceclass.
This method is used to create an emptyDiffSetso that a review
request can be created with commit history.Add the
get_historymethod to theSCMClientclass. This method
gets a linear history of commit metadata given some revisions.The commit histories that can be uploaded by this change are simple
linear ones; that is, they must be linear histories (with no merges)
and diffs in commits should not overlap with respect to files.
Uploaded commits containing diffs to Review Board on the
dvcs
branch.