def _branch_changed(self, new): if new: # fmt = 'format:"%H|%cn|%ce|%ct|%s"' self.commits = get_commits(self._repo.active_repo, new, None, '') # self.commits = [from_gitlog(l) for l in self._repo.get_log(new, '--pretty={}'.format(fmt))] else: self.commits = []
def _get_commits(self, path, tag=None): repo = self.repo args = [repo, repo.active_branch.name, path, tag] if tag: args.append('--grep=^<{}>'.format(tag)) return get_commits(*args)
def _get_commits(self, new): if new: self.commits = get_commits(self._repo.active_repo, new, None, '', limit=self.ncommits) else: self.commits = []
def initialize(self, an): repo = self.repo cs = [] for a, b in (('TAG', 'tag'), ('ISOEVO', 'intercepts'), ('ISOEVO', 'baselines'), ('BLANKS', 'blanks'), ('ICFactor', 'icfactors'), ('IMPORT', ''), ('MANUAL', ''), ('COLLECTION', '')): path = an.make_path(b) if path: args = [repo, repo.active_branch.name, path, a] if a: args.append('--grep=^<{}>'.format(a)) css = get_commits(*args) for ci in css: ci.path = path cs.extend(css) self.commits = sorted(cs, key=lambda x: x.date, reverse=True)
def load_commits(self): cs = get_commits(self.repo.path, self.branch, None, '') self.commits = cs
def _branch_changed(self, new): if new: self.commits = get_commits(self._repo.active_repo, new, None, '', limit=50) else: self.commits = []