From: Eevee Date: Wed, 18 Aug 2010 04:39:07 +0000 (-0700) Subject: Show gravatars in git logs. X-Git-Tag: veekun-promotions/2010082201~3 X-Git-Url: http://git.veekun.com/zzz-spline-frontpage.git/commitdiff_plain/4bb3ad19bae18a454509588df79c8b1470727a18 Show gravatars in git logs. --- diff --git a/splinext/frontpage/sources.py b/splinext/frontpage/sources.py index e28dc38..43d8db8 100644 --- a/splinext/frontpage/sources.py +++ b/splinext/frontpage/sources.py @@ -240,7 +240,7 @@ class FeedSource(CachedSource): FrontPageGit = namedtuple('FrontPageGit', ['source', 'time', 'log', 'tag']) FrontPageGitCommit = namedtuple('FrontPageGitCommit', - ['hash', 'author', 'time', 'subject', 'repo']) + ['hash', 'author', 'email', 'time', 'subject', 'repo']) class GitSource(CachedSource): """Represents a git repository. @@ -333,16 +333,17 @@ class GitSource(CachedSource): 'git', '--git-dir=' + repo_path, 'log', - '--pretty=%h%x00%an%x00%at%x00%s', + '--pretty=%h%x00%an%x00%aE%x00%at%x00%s', "{0}..{1}".format(since_tag, tag), ] proc = subprocess.Popen(git_log_args, stdout=PIPE) for line in proc.stdout: - hash, author, time, subject = line.strip().split('\x00') + hash, author, email, time, subject = line.strip().split('\x00') commits.append( FrontPageGitCommit( hash = hash, author = author, + email = email, time = datetime.datetime.fromtimestamp(int(time)), subject = subject, repo = repo_name, diff --git a/splinext/frontpage/templates/css/frontpage.mako b/splinext/frontpage/templates/css/frontpage.mako index 2374f72..af7928e 100644 --- a/splinext/frontpage/templates/css/frontpage.mako +++ b/splinext/frontpage/templates/css/frontpage.mako @@ -16,6 +16,7 @@ .frontpage-update table.striped-rows tr:nth-child(2n) { background: #e8e8e8; } .frontpage-update table.striped-rows tr:nth-child(2n+1) { background: transparent; } +.frontpage-update table.striped-rows tr:hover { background: #eae1d5; } table.frontpage-repository { width: 100%; } table.frontpage-repository tr.frontpage-repository-header { background: transparent !important; } diff --git a/splinext/frontpage/templates/front_page/git.mako b/splinext/frontpage/templates/front_page/git.mako index 119aab3..4b70426 100644 --- a/splinext/frontpage/templates/front_page/git.mako +++ b/splinext/frontpage/templates/front_page/git.mako @@ -20,7 +20,11 @@ ${commit.hash} - ${commit.author} + + <%! import hashlib %>\ + + ${commit.author} + ${commit.subject} ${commit.time}