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.""" Observable.__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.directory = '' self.project = '' self.remotes = [] self.commitmsg = '' self.modified = [] self.staged = [] self.untracked = [] self.unmerged = [] self.upstream_changed = [] self.submodules = set() self.local_branches = [] self.remote_branches = [] self.tags = [] if cwd: self.set_worktree(cwd)
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.""" Observable.__init__(self) # Initialize the git command object self.git = git.current() self.head = 'HEAD' self.diff_text = '' self.mode = self.mode_none self.filename = None self.is_merging = False self.is_rebasing = False self.currentbranch = '' self.directory = '' self.project = '' self.remotes = [] self.filter_paths = None self.commitmsg = '' self.modified = [] self.staged = [] self.untracked = [] self.unmerged = [] self.upstream_changed = [] self.submodules = set() self.local_branches = [] self.remote_branches = [] self.tags = [] if cwd: self.set_worktree(cwd)
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.""" Observable.__init__(self) # Initialize the git command object self.git = git.current() self.head = 'HEAD' self.diff_text = '' self.mode = self.mode_none self.filename = None self.is_merging = False self.is_rebasing = False self.currentbranch = '' self.directory = '' self.project = '' self.remotes = [] self.filter_paths = None self.commitmsg = '' # current commit message self._auto_commitmsg = '' # e.g. .git/MERGE_MSG self._prev_commitmsg = '' # saved here when clobbered by .git/MERGE_MSG self.modified = [] # modified, staged, untracked, unmerged paths self.staged = [] self.untracked = [] self.unmerged = [] self.upstream_changed = [] # paths that've changed upstream self.staged_deleted = set() self.unstaged_deleted = set() self.submodules = set() self.local_branches = [] self.remote_branches = [] self.tags = [] if cwd: self.set_worktree(cwd)
def __init__(self, ref, count): Observable.__init__(self) self.ref = ref self.count = count self.overrides = {}
def __init__(self): Model.__init__(self) Observable.__init__(self)
def __init__(self): Observable.__init__(self) self.staged = [] self.unmerged = [] self.modified = [] self.untracked = []