def _push_status(gitContext, review_branch, working_branch, status):
    clone = gitContext.clone
    remote = gitContext.remote

    old_branch = working_branch.branch

    working_branch = abdt_gittypes.makeWorkingBranchWithStatus(
        working_branch, status)

    new_branch = working_branch.branch
    if old_branch == new_branch:
        phlgit_push.push_asymmetrical_force(
            clone,
            review_branch.remote_branch,
            phlgitu_ref.make_local(new_branch),
            remote)
    else:
        phlgit_push.move_asymmetrical(
            clone,
            review_branch.remote_branch,
            phlgitu_ref.make_local(old_branch),
            phlgitu_ref.make_local(new_branch),
            remote)

    return working_branch
Example #2
0
    def _push_status(self, status):
        old_branch = self._tracking_branch.branch

        self._tracking_branch.update_status(status)

        new_branch = self._tracking_branch.branch
        if old_branch == new_branch:
            phlgit_push.push_asymmetrical_force(
                self._repo, self._review_branch.remote_branch,
                phlgitu_ref.make_local(new_branch),
                self._tracking_branch.remote)
        else:
            phlgit_push.move_asymmetrical(self._repo,
                                          self._review_branch.remote_branch,
                                          phlgitu_ref.make_local(old_branch),
                                          phlgitu_ref.make_local(new_branch),
                                          self._repo.get_remote())

        self._tracking_hash = self._review_hash
Example #3
0
    def _push_status(self, status):
        old_branch = self._tracking_branch.branch

        self._tracking_branch.update_status(status)

        new_branch = self._tracking_branch.branch
        if old_branch == new_branch:
            phlgit_push.push_asymmetrical_force(
                self._repo,
                self._review_branch.remote_branch,
                phlgitu_ref.make_local(new_branch),
                self._tracking_branch.remote)
        else:
            phlgit_push.move_asymmetrical(
                self._repo,
                self._review_branch.remote_branch,
                phlgitu_ref.make_local(old_branch),
                phlgitu_ref.make_local(new_branch),
                self._repo.get_remote())

        self._tracking_hash = self._review_hash