Details
-
Bug
-
Resolution: Fixed
-
Medium
Description
I believe this changed recently, i.e., today: the list of commits in the JSON sent by the POST service is backwards with the oldest commit first, and the newest commit last.
I setup a test repository to verify this and posted to a postbin service. The JSON posted looks like this:
>>> pprint(json.loads(payload)) {u'canon_url': u'https://bitbucket.org', u'commits': [{u'author': u'mg', u'branch': u'default', u'files': [{u'file': u'a.txt', u'type': u'modified'}], u'message': u'second', u'node': u'bb432135bdb5', u'parents': [u'34fb7a4e134a'], u'raw_author': u'Martin Geisler <martin.geisler@dealini.ch>', u'raw_node': u'bb432135bdb590104d01c108ea6e4d26c90b3dd9', u'revision': 1, u'size': -1, u'timestamp': u'2013-04-19 17:43:23', u'utctimestamp': u'2013-04-19 15:43:23+00:00'}, {u'author': u'mg', u'branch': u'default', u'files': [{u'file': u'a.txt', u'type': u'added'}], u'message': u'first', u'node': u'34fb7a4e134a', u'parents': [], u'raw_author': u'Martin Geisler <martin.geisler@dealini.ch>', u'raw_node': u'34fb7a4e134a49ede8516c798b1ba807980d9ced', u'revision': 0, u'size': -1, u'timestamp': u'2013-04-19 17:43:17', u'utctimestamp': u'2013-04-19 15:43:17+00:00'}], u'repository': {u'absolute_url': u'/mg/post-test/', u'fork': False, u'is_private': False, u'name': u'post-test', u'owner': u'mg', u'scm': u'hg', u'slug': u'post-test', u'website': u''}, u'truncated': False, u'user': u'mg'}
This confuses my Buildbot: it sees the changes and thinks the last commit (really the first) is the one it should build. It builds this commit and fails to build the following commits.