コード例 #1
0
ファイル: compare.py プロジェクト: dcfrancisco/git-cola
 def __init__(self):
     ObservableModel.__init__(self)
     self.git = git.instance()
     self.descriptions_start = []
     self.descriptions_end = []
     self.revisions_start = []
     self.revisions_end = []
     self.revision_start = ''
     self.revision_end = ''
     self.compare_files = []
     self.num_results = 100
     self.show_versions=False
コード例 #2
0
ファイル: model.py プロジェクト: mwh/git-cola
    def __init__(self, cwd=None):
        """Reads git repository settings and sets several methods
        so that they refer to the git module.  This object
        encapsulates cola's interaction with git."""
        ObservableModel.__init__(self)

        # Initialize the git command object
        self.git = git.instance()

        #####################################################
        self.head = 'HEAD'
        self.diff_text = ''
        self.mode = self.mode_none
        self.filename = None
        self.currentbranch = ''
        self.trackedbranch = ''
        self.directory = ''
        self.git_version = self.git.version()
        self.remotes = []
        self.local_branch = ''
        self.remote_branch = ''

        #####################################################
        # Status info
        self.commitmsg = ''
        self.modified = []
        self.staged = []
        self.untracked = []
        self.unmerged = []
        self.upstream_changed = []
        self.submodules = set()

        #####################################################
        # Refs
        self.revision = ''
        self.local_branches = []
        self.remote_branches = []
        self.tags = []
        self.revisions = []
        self.summaries = []

        self.fetch_helper = None
        self.push_helper = None
        self.pull_helper = None
        self.generate_remote_helpers()
        if cwd:
            self.set_worktree(cwd)

        #####################################################
        # Dag
        self._commits = []
コード例 #3
0
ファイル: compare.py プロジェクト: dcfrancisco/git-cola
 def __init__(self):
     ObservableModel.__init__(self)
     self.git = git.instance()
     self.remote_branches = gitcmds.branch_list(remote=True)
     self.local_branches = gitcmds.branch_list(remote=False)
     self.left_combo = ['Local', 'Remote']
     self.right_combo = ['Local', 'Remote']
     self.left_combo_index = 0
     self.right_combo_index = 1
     self.left_list = []
     self.right_list = []
     self.left_list_index = -1
     self.right_list_index = -1
     self.left_list_selected = False
     self.right_list_selected = False
     self.diff_files = []
コード例 #4
0
ファイル: browser.py プロジェクト: dcfrancisco/git-cola
    def __init__(self, branch=None):
        ObservableModel.__init__(self)
        self.copy_params(cola.model())
        if branch:
            self.currentbranch = branch

        # These are parallel lists
        # ref^{tree}
        self.types = []
        self.sha1s = []
        self.names = []

        self.directories = []
        self.directory_entries = {}

        # parallel lists
        self.subtree_types = []
        self.subtree_sha1s = []
        self.subtree_names = []
コード例 #5
0
ファイル: selection.py プロジェクト: dcfrancisco/git-cola
 def __init__(self):
     ObservableModel.__init__(self)
     self.staged = []
     self.modified = []
     self.unmerged = []
     self.untracked = []
コード例 #6
0
ファイル: tag.py プロジェクト: dcfrancisco/git-cola
 def __init__(self):
     ObservableModel.__init__(self)
     self.tag_msg = ''
     self.tag_name = ''
     self.revision = ['HEAD'] + cola.model().all_branches()
     self.sign_tag = False