[pypy-commit] buildbot default: merge heads
antocuni
commits-noreply at bitbucket.org
Mon May 9 16:08:59 CEST 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r504:96c6bf0222ab
Date: 2011-05-09 16:08 +0200
http://bitbucket.org/pypy/buildbot/changeset/96c6bf0222ab/
Log: merge heads
diff --git a/bitbucket_hook/mail.py b/bitbucket_hook/mail.py
--- a/bitbucket_hook/mail.py
+++ b/bitbucket_hook/mail.py
@@ -31,7 +31,7 @@
subject = '%s %s: %s' % (reponame, commit['branch'], line0)
body = scm.hg('-R', local_repo, 'log', '-r', hgid,
'--template', template)
- diff = scm.get_diff(local_repo, hgid, commit['files'])
+ diff = scm.get_diff(local_repo, hgid)
body = body + diff
send(sender, app.config['ADDRESS'], subject, body, test)
diff --git a/bitbucket_hook/main.py b/bitbucket_hook/main.py
--- a/bitbucket_hook/main.py
+++ b/bitbucket_hook/main.py
@@ -61,14 +61,14 @@
DEFAULT_REPO = 'pypy'
-class CodeSpeakConfig(DefaultConfig):
+class WyvernConfig(DefaultConfig):
SMTP_SERVER = 'localhost'
SMTP_PORT = 25
ADDRESS = 'pypy-svn at codespeak.net'
#
CHANNEL = '#pypy'
- BOT = '/svn/hooks/commit-bot/message'
-
+ #BOT = '/svn/hooks/commit-bot/message'
+ BOT = '/home/buildmaster/commit-bot/message'
class ViperConfig(DefaultConfig):
SMTP_SERVER = "out.alice.it"
@@ -84,4 +84,4 @@
app.config.from_object(ViperConfig)
else:
# real settings, (they works on codespeak at least)
- app.config.from_object(CodeSpeakConfig)
+ app.config.from_object(WyvernConfig)
diff --git a/bitbucket_hook/run.py b/bitbucket_hook/run.py
--- a/bitbucket_hook/run.py
+++ b/bitbucket_hook/run.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
"""
To start the server in production mode, run this command::
@@ -13,7 +13,7 @@
if __name__ == '__main__':
- HOST_NAME = 'codespeak.net'
+ HOST_NAME = 'wyvern.cs.uni-duesseldorf.de'
PORT_NUMBER = 9237
main.app.run(
host = HOST_NAME if 'deploy' in sys.argv else 'localhost',
diff --git a/bitbucket_hook/scm.py b/bitbucket_hook/scm.py
--- a/bitbucket_hook/scm.py
+++ b/bitbucket_hook/scm.py
@@ -19,18 +19,25 @@
return unicode(stdout, encoding='utf-8', errors='replace')
-def get_diff(local_repo, hgid, files):
- import re
- binary = re.compile('^GIT binary patch$', re.MULTILINE)
- files = [item['file'] for item in files]
+def get_diff(local_repo, hgid):
+ out = hg('-R', local_repo, 'diff', '--git', '-c', hgid)
+ out = out.splitlines(True)
+ out_iter = iter(out)
lines = []
- for filename in files:
- out = hg('-R', local_repo, 'diff', '--git', '-c', hgid,
- local_repo.join(filename))
- match = binary.search(out)
- if match:
- # it's a binary patch, omit the content
- out = out[:match.end()]
- out += u'\n[cut]'
- lines.append(out)
- return u'\n'.join(lines)
+ for line in out_iter:
+ lines.append(line)
+ if line == 'GIT binary patch\n':
+ out_iter.next() # discard literal line
+ lines.append('\n[cut]\n')
+
+ for item in out_iter:
+ if item[0]!='z':
+ break # binary patches end with a empty line
+
+
+ return u''.join(lines)
+
+
+if __name__=='__main__':
+ # needs the pypy repo
+ print get_diff(sys.argv[1], '426be91e82b0f91b09a028993d2364f1d62f1615').encode('utf-8')
diff --git a/bot2/pypybuildbot/builds.py b/bot2/pypybuildbot/builds.py
--- a/bot2/pypybuildbot/builds.py
+++ b/bot2/pypybuildbot/builds.py
@@ -102,11 +102,17 @@
class CheckGotRevision(ShellCmd):
description = 'got_revision'
- command = ['hg', 'parents', '--template', '{rev}:{node|short}']
+ command = ['hg', 'parents', '--template', '{rev}:{node}']
def commandComplete(self, cmd):
if cmd.rc == 0:
got_revision = cmd.logs['stdio'].getText()
+ # manually get the effect of {node|short} without using a
+ # '|' in the command-line, because it doesn't work on Windows
+ num = got_revision.find(':')
+ if num > 0:
+ got_revision = got_revision[:num+13]
+ #
final_file_name = got_revision.replace(':', '-')
# ':' should not be part of filenames --- too many issues
self.build.setProperty('got_revision', got_revision, 'got_revision')
diff --git a/bot2/pypybuildbot/master.py b/bot2/pypybuildbot/master.py
--- a/bot2/pypybuildbot/master.py
+++ b/bot2/pypybuildbot/master.py
@@ -207,7 +207,7 @@
JITLINUX32, # on tannit32, uses 1 core
JITLINUX64, # on tannit64, uses 1 core
OJITLINUX32, # on tannit32, uses 1 core
- APPLVLWIN32, # on bigboard
+ JITWIN32, # on bigboard
STACKLESSAPPLVLFREEBSD64, # on headless
JITMACOSX64, # on mvt's machine
], hour=4, minute=0),
@@ -303,7 +303,7 @@
'category': 'linux64',
},
{"name" : JITMACOSX64,
- "slavenames": ["macmini-mvt"],
+ "slavenames": ["macmini-mvt", "xerxes"],
'builddir' : JITMACOSX64,
'factory' : pypyJITTranslatedTestFactoryOSX64,
'category' : 'mac64',
@@ -328,6 +328,6 @@
},
],
- 'buildbotURL': 'http://codespeak.net:%d/'%(httpPortNumber),
- 'projectURL': 'http://codespeak.net/pypy/',
+ 'buildbotURL': 'http://wyvern.cs.uni-duesseldorf.de:%d/'%(httpPortNumber),
+ 'projectURL': 'http://pypy.org/',
'projectName': 'PyPy'}
diff --git a/bot2/pypybuildbot/util.py b/bot2/pypybuildbot/util.py
--- a/bot2/pypybuildbot/util.py
+++ b/bot2/pypybuildbot/util.py
@@ -1,7 +1,7 @@
import socket
def we_are_debugging():
- return socket.gethostname() not in ("code0.codespeak.net",)
+ return socket.gethostname() not in ("wyvern",)
def load(name):
mod = __import__(name, {}, {}, ['__all__'])
More information about the pypy-commit
mailing list