Пример #1
0
    def _checkout_archive_ref_branch(
            self, short_branch_name, fq_branch_name, initial_message):

        if self._is_ref(fq_branch_name):
            phlgit_checkout.branch(self, short_branch_name)
        else:
            phlgit_checkout.orphan_clean(self, short_branch_name)
            phlgit_commit.allow_empty(self, initial_message)
Пример #2
0
    def _checkout_archive_ref_branch(self, short_branch_name, fq_branch_name,
                                     initial_message):

        if self._is_ref(fq_branch_name):
            phlgit_checkout.branch(self, short_branch_name)
        else:
            phlgit_checkout.orphan_clean(self, short_branch_name)
            phlgit_commit.allow_empty(self, initial_message)
Пример #3
0
def ensure_reserve_branch(repo):
    """Ensure that the supplied 'repo' remote has the reserve branch.

    To prevent the problem where someone pushes branch 'dev', which blocks
    arcyd's tracker branches from being created.

    :repo: a callable supporting git commands, e.g. repo("status")
    :returns: None

    """
    reserve_name = phlgitu_ref.Name(_RESERVE_BRANCH_FQ_NAME)
    if not is_remote_reserve_branch_present(repo):
        phlgit_checkout.orphan_clean(repo, reserve_name.short)
        phlgit_commit.allow_empty(repo, _RESERVE_BRANCH_MESSAGE)
        phlgit_push.push(repo, reserve_name.short, 'origin')
        phlgit_checkout.previous_branch(repo)
        phlgit_branch.force_delete(repo, reserve_name.short)
Пример #4
0
def ensure_reserve_branch(repo):
    """Ensure that the supplied 'repo' remote has the reserve branch.

    To prevent the problem where someone pushes branch 'dev', which blocks
    arcyd's tracker branches from being created.

    :repo: a callable supporting git commands, e.g. repo("status")
    :returns: None

    """
    reserve_name = phlgitu_ref.Name(_RESERVE_BRANCH_FQ_NAME)
    if not is_remote_reserve_branch_present(repo):
        phlgit_checkout.orphan_clean(repo, reserve_name.short)
        phlgit_commit.allow_empty(repo, _RESERVE_BRANCH_MESSAGE)
        phlgit_push.push(repo, reserve_name.short, 'origin')
        phlgit_checkout.previous_branch(repo)
        phlgit_branch.force_delete(repo, reserve_name.short)