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_HISTORY
config option in.reviewboardrc
to
override this. However, the configuration option can itself be
overridden by the-H
/--with-history
flag.Currently the only
SCMClient
s that "supports" this flag is Git.Add the
DiffCommitResource
andDiffCommitListResource
resources to
the RBTools web API resources. TheDiffCommitListResource
handles
the uploading of commits via theupload_commit
method.Add the
create_empty_diffset
method to theDiffListResource
class.
This method is used to create an emptyDiffSet
so that a review
request can be created with commit history.Add the
get_history
method to theSCMClient
class. 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.