

def land(self, author_name, author_email, message):
    'Integrate the branch into the base and remove the review branch.'
    self._repo.checkout_forced_new_branch(self._tracking_branch.base, self._tracking_branch.remote_base)
    try:
        result = self._lander(self._repo, self._tracking_branch.remote_branch, author_name, author_email, message)
    except abdt_lander.LanderException as e:
        self._repo('reset', '--hard')
        raise abdt_exception.LandingException(str(e), self.review_branch_name(), self._tracking_branch.base)
    landing_hash = phlgit_revparse.get_sha1(self._repo, self._tracking_branch.base)
    try:
        self._repo.push(self._tracking_branch.base)
    except Exception as e:
        raise abdt_exception.LandingPushBaseException(str(e), self.review_branch_name(), self._tracking_branch.base)
    self._tryloop((lambda : self._repo.push_delete(self._tracking_branch.branch, self.review_branch_name())), abdt_errident.PUSH_DELETE_LANDED)
    self._repo.archive_to_landed(self._tracking_hash, self.review_branch_name(), self._tracking_branch.base, landing_hash, message)
    try:

        def push_landed():
            self._repo.push_landed()
        self._tryloop(push_landed, abdt_errident.PUSH_LANDING_ARCHIVE)
    except Exception:
        pass
    self._review_branch = None
    self._review_hash = None
    self._tracking_branch = None
    self._tracking_hash = None
    return result

dataset/ETHPy150Open bloomberg/phabricator-tools/py/abd/abdt_branch.py Branch.land/original