[SCM] build.samba.org - branch master updated
Jelmer Vernooij
jelmer at samba.org
Sun Nov 21 07:13:00 MST 2010
The branch, master has been updated
via a7596e4 Simplify diff handling.
from fa01026 Use dulwich function for writing tree diffs.
http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit a7596e4a51505d85855be76ff8e5629ee387e811
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Sun Nov 21 15:06:49 2010 +0100
Simplify diff handling.
-----------------------------------------------------------------------
Summary of changes:
buildfarm/web/__init__.py | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildfarm/web/__init__.py b/buildfarm/web/__init__.py
index d9fd3f1..29b88ab 100755
--- a/buildfarm/web/__init__.py
+++ b/buildfarm/web/__init__.py
@@ -321,11 +321,6 @@ def make_collapsible_html(type, title, output, id, status=""):
return ret
-def diff_pretty(diff):
- """pretty up a diff -u"""
- return highlight(diff, DiffLexer(), HtmlFormatter())
-
-
def web_paths(t, paths):
"""change the given source paths into links"""
if t.scm == "git":
@@ -407,15 +402,6 @@ def history_row_text(entry, tree, changes):
yield "\n\n%s\n\n\n" % msg
-def show_diff(diff, text_html):
- if text_html == "html":
- diff = cgi.escape(diff)
- diff = diff_pretty(diff)
- return "<pre>%s</pre>\n" % diff
- else:
- return "%s\n" % diff
-
-
class BuildFarmPage(object):
def __init__(self, buildfarm):
@@ -840,7 +826,9 @@ class DiffPage(BuildFarmPage):
yield "<h2>%s</h2>" % title
changes = branch.changes_summary(revision)
yield "".join(history_row_html(myself, entry, t, changes))
- yield show_diff(diff, "html")
+ diff = cgi.escape(diff)
+ diff = highlight(diff, DiffLexer(), HtmlFormatter())
+ yield "<pre>%s</pre>\n" % diff
class RecentCheckinsPage(BuildFarmPage):
@@ -924,7 +912,7 @@ class BuildFarmApp(object):
(entry, diff) = branch.diff(revision)
changes = branch.changes_summary(revision)
yield "".join(history_row_text(entry, tree, changes))
- yield show_diff(diff, "text")
+ yield "%s\n" % diff
elif fn_name == 'Text_Summary':
start_response('200 OK', [('Content-type', 'text/plain')])
page = ViewSummaryPage(self.buildfarm)
--
build.samba.org
More information about the samba-cvs
mailing list