コード例 #1
0
ファイル: repair.py プロジェクト: andrewchambers/stgit
         of such patches.

     "stg repair" will fix these inconsistencies reliably, so as long
     as you like what it does, you have no reason to avoid causing
     them in the first place. For example, you might find it
     convenient to make commits with a graphical tool and then have
     "stg repair" make proper patches of the commits.

NOTE: If using git commands on the stack was a mistake, running "stg
repair" is _not_ what you want. In that case, what you want is option
(1) above."""

args = []
options = []

directory = DirectoryGotoToplevel(log=True)
crt_series = None


class Commit(object):
    def __init__(self, id):
        self.id = id
        self.parents = set()
        self.children = set()
        self.patch = None
        self.__commit = None

    def __get_commit(self):
        if not self.__commit:
            self.__commit = git.get_commit(self.id)
        return self.__commit
コード例 #2
0
        A protected branch cannot be cleaned up; it must be unprotected first
        (see '--unprotect' above).

        A cleaned up branch can be re-initialised using the 'stg init'
        command."""),
    opt('-d', '--description', short='Set the branch description'),
    opt('--merge',
        action='store_true',
        short='Merge work tree changes into the other branch'),
    opt('--force',
        action='store_true',
        short='Force a delete when the series is not empty')
]

directory = DirectoryGotoToplevel(log=False)
crt_series = None


def __is_current_branch(branch_name):
    return crt_series.get_name() == branch_name


def __print_branch(branch_name, length):
    initialized = ' '
    current = ' '
    protected = ' '

    branch = stack.Series(branch_name)

    if branch.is_initialised():