def get_exportable_commits(self): """Gets exportable commits that can apply cleanly and independently. Returns: A list of ChromiumCommit for clean exportable commits, and a list of error messages for other exportable commits that fail to apply. """ # Exportable commits that cannot apply cleanly are logged, and will be # retried next time. A common case is that a commit depends on an # earlier commit, and can only be exported after the earlier one. return exportable_commits_over_last_n_commits( self.host, self.local_wpt, self.wpt_github, require_clean=True)
def exportable_but_not_exported_commits(self, local_wpt): """Returns a list of commits that would be clobbered by importer. The list contains all exportable but not exported commits, not filtered by whether they can apply cleanly. """ # The errors returned by exportable_commits_over_last_n_commits are # irrelevant and ignored here, because it tests patches *individually* # while the importer tries to reapply these patches *cumulatively*. commits, _ = exportable_commits_over_last_n_commits( self.host, local_wpt, self.wpt_github, require_clean=False, verify_merged_pr=True) return commits