[pypy-svn] commit/buildbot: antocuni: correctly handle filenames in the new format, where we have a dash instead of a colon to separate revnum and hgid
Bitbucket
commits-noreply at bitbucket.org
Thu Dec 16 15:12:20 CET 2010
1 new changeset in buildbot:
http://bitbucket.org/pypy/buildbot/changeset/68c2ab6173c2/
changeset: r382:68c2ab6173c2
user: antocuni
date: 2010-12-16 15:12:11
summary: correctly handle filenames in the new format, where we have a dash instead of a colon to separate revnum and hgid
affected #: 2 files (210 bytes)
--- a/bot2/pypybuildbot/pypylist.py Wed Dec 15 20:31:10 2010 +0100
+++ b/bot2/pypybuildbot/pypylist.py Thu Dec 16 15:12:11 2010 +0100
@@ -60,15 +60,20 @@
if not self.filename.endswith('.tar.bz2'):
raise ValueError
name = self.filename.replace('.tar.bz2', '')
- self.exe, self.backend, self.features, self.rev, self.platform = name.split('-')
- if ':' in self.rev:
+ dashes = name.count('-')
+ if dashes == 4:
+ # svn based
+ self.exe, self.backend, self.features, self.rev, self.platform = name.split('-')
+ self.numrev = int(self.rev)
+ self.vcs = 'svn'
+ elif dashes == 5:
# mercurial based
- num, _ = self.rev.split(':')
+ self.exe, self.backend, self.features, num, hgid, self.platform = name.split('-')
self.numrev = int(num)
+ self.rev = '%s:%s' % (num, hgid)
self.vcs = 'hg'
else:
- self.numrev = int(self.rev)
- self.vcs = 'svn'
+ raise ValueError
def key(self):
return (self.VCS_PRIORITY.get(self.vcs, -1),
--- a/bot2/pypybuildbot/test/test_pypylist.py Wed Dec 15 20:31:10 2010 +0100
+++ b/bot2/pypybuildbot/test/test_pypylist.py Thu Dec 16 15:12:11 2010 +0100
@@ -13,8 +13,8 @@
assert t.vcs == 'svn'
def test_pypytarball_hg():
- t = PyPyTarball('pypy-c-jit-75654:foo-linux.tar.bz2')
- assert t.filename == 'pypy-c-jit-75654:foo-linux.tar.bz2'
+ t = PyPyTarball('pypy-c-jit-75654-foo-linux.tar.bz2')
+ assert t.filename == 'pypy-c-jit-75654-foo-linux.tar.bz2'
assert t.exe == 'pypy'
assert t.backend == 'c'
assert t.features == 'jit'
@@ -43,13 +43,13 @@
'pypy-c-jit-10000-linux64.tar.bz2',
'pypy-c-jit-10000-win32.tar.bz2',
'pypy-c-stackless-10000-linux.tar.bz2',
- 'pypy-c-jit-1000:e5b73981fc8d-linux.tar.bz2', # this is mercurial based
+ 'pypy-c-jit-1000-e5b73981fc8d-linux.tar.bz2', # this is mercurial based
])
files.sort(key=PyPyTarball.key, reverse=True)
files = [f.filename for f in files]
assert files == [
- 'pypy-c-jit-1000:e5b73981fc8d-linux.tar.bz2', # mercurial first
+ 'pypy-c-jit-1000-e5b73981fc8d-linux.tar.bz2', # mercurial first
'pypy-c-jit-20000-linux.tar.bz2',
'pypy-c-jit-10000-linux.tar.bz2',
'pypy-c-jit-10000-linux64.tar.bz2',
Repository URL: https://bitbucket.org/pypy/buildbot/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the Pypy-commit
mailing list