[jhbuild] shorten sha1 sum in page titles



commit d38d8cf8107da592ed31308bf31df549f63c642a
Author: Frederic Peters <fpeters 0d be>
Date:   Fri Apr 17 09:30:16 2009 +0200

    shorten sha1 sum in page titles
---
 jhbuild/buildbot/status/web/changes.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/jhbuild/buildbot/status/web/changes.py b/jhbuild/buildbot/status/web/changes.py
index 1b6ece0..46761f7 100644
--- a/jhbuild/buildbot/status/web/changes.py
+++ b/jhbuild/buildbot/status/web/changes.py
@@ -41,7 +41,10 @@ class ChangeResource(HtmlResource):
     def getTitle(self, request):
         status = self.getStatus(request)
         p = status.getProjectName()
-        return '%s - %s - revision #%s' % (p, self.change.project, self.change.revision)
+        if len(self.change.revision) == 40:
+            return '%s - %s - commit %s' % (p, self.change.project, self.change.revision[:8])
+        else:
+            return '%s - %s - revision #%s' % (p, self.change.project, int(self.change.revision))
 
     def body(self, request):
         data = '<div class="changeset">\n'



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]