Author: David Schneider <david.schnei...@picle.org> Branch: buildbot-update Changeset: r844:f8dca433431b Date: 2013-08-30 16:18 +0200 http://bitbucket.org/pypy/buildbot/changeset/f8dca433431b/
Log: map several possible values to 'trunk' for the downloads page diff --git a/bot2/pypybuildbot/builds.py b/bot2/pypybuildbot/builds.py --- a/bot2/pypybuildbot/builds.py +++ b/bot2/pypybuildbot/builds.py @@ -28,6 +28,7 @@ # while the boards can only run one job at the same time ARMBoardLock = locks.SlaveLock('arm_boards', maxCount=1) +map_branch_name = lambda x: x if x not in ['', None, 'default'] else 'trunk' class ShellCmd(shell.ShellCommand): # our own version that can distinguish abort cases (rc == -1) @@ -44,9 +45,7 @@ def start(self): properties = self.build.getProperties() - branch = properties['branch'] - if branch is None: - branch = 'trunk' + branch = map_branch_name(properties['branch']) #masterdest = properties.render(self.masterdest) masterdest = os.path.expanduser(self.masterdest) if branch.startswith('/'): @@ -83,11 +82,8 @@ def start(self): properties = self.build.getProperties() - branch = properties['branch'] + branch = map_branch_name(properties['branch']) revision = properties['revision'] - - if branch is None: - branch = 'trunk' mastersrc = os.path.expanduser(self.mastersrc) if branch.startswith('/'): @@ -158,9 +154,7 @@ builder.summary_by_branch_and_revision = {} try: rev = properties['got_revision'] - branch = properties['branch'] - if branch is None: - branch = 'trunk' + branch = map_branch_name(properties['branch']) if branch.endswith('/'): branch = branch[:-1] except KeyError: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit