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
def _push_new_status_branch(gitContext, review_branch, status, revision_id): clone = gitContext.clone remote = gitContext.remote if revision_id is None: revision_id = "none" else: revision_id = str(revision_id) working_branch_name = abdt_naming.makeWorkingBranchName( status, review_branch.description, review_branch.base, revision_id) working_branch = abdt_naming.makeWorkingBranchFromName( working_branch_name) working_branch = abdt_gittypes.makeGitWorkingBranch( working_branch, gitContext.remote) phlgit_push.push_asymmetrical_force( clone, phlgitu_ref.make_remote(review_branch.branch, remote), phlgitu_ref.make_local(working_branch_name), remote) return working_branch
def push_log(repo, remote): """Push the local landinglog to the specified 'remote'. :repo: a callable supporting git commands, e.g. repo("status") :remote: the string name of the remote to push to :returns: None """ phlgit_push.push_asymmetrical_force(repo, _LOCAL_LANDINGLOG_REF, _LANDINGLOG_REF, remote)
def _push_new(self, status, revision_id): tracking_branch = self._review_branch.make_tracker(status, revision_id) phlgit_push.push_asymmetrical_force( self._repo, self._review_branch.remote_branch, phlgitu_ref.make_local(tracking_branch.branch), tracking_branch.remote) self._tracking_branch = tracking_branch self._tracking_hash = self._review_hash
def push_log(clone, remote): """Push the local landinglog to the specified 'remote'. :clone: supports clone.call() for interacting with git :remote: the string name of the remote to push to :returns: None """ phlgit_push.push_asymmetrical_force( clone, _LOCAL_LANDINGLOG_REF, _LANDINGLOG_REF, remote)
def _push_new(self, status, revision_id): tracking_branch = self._review_branch.make_tracker( status, revision_id) phlgit_push.push_asymmetrical_force( self._repo, self._review_branch.remote_branch, phlgitu_ref.make_local(tracking_branch.branch), tracking_branch.remote) self._tracking_branch = tracking_branch self._tracking_hash = self._review_hash
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
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