Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-7127

POST service orders commits backwards (BB-8235)

    XMLWordPrintable

Details

    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&#x27;raw_author&#x27;: u&#x27;Martin Geisler <martin.geisler@dealini.ch>&#x27;,
                     u&#x27;raw_node&#x27;: u&#x27;bb432135bdb590104d01c108ea6e4d26c90b3dd9&#x27;,
                     u&#x27;revision&#x27;: 1,
                     u&#x27;size&#x27;: -1,
                     u&#x27;timestamp&#x27;: u&#x27;2013-04-19 17:43:23&#x27;,
                     u&#x27;utctimestamp&#x27;: u&#x27;2013-04-19 15:43:23+00:00&#x27;},
                    {u&#x27;author&#x27;: u&#x27;mg&#x27;,
                     u&#x27;branch&#x27;: u&#x27;default&#x27;,
                     u&#x27;files&#x27;: [{u&#x27;file&#x27;: u&#x27;a.txt&#x27;, u&#x27;type&#x27;: u&#x27;added&#x27;}],
                     u&#x27;message&#x27;: u&#x27;first&#x27;,
                     u&#x27;node&#x27;: u&#x27;34fb7a4e134a&#x27;,
                     u&#x27;parents&#x27;: [],
                     u&#x27;raw_author&#x27;: u&#x27;Martin Geisler <martin.geisler@dealini.ch>&#x27;,
                     u&#x27;raw_node&#x27;: u&#x27;34fb7a4e134a49ede8516c798b1ba807980d9ced&#x27;,
                     u&#x27;revision&#x27;: 0,
                     u&#x27;size&#x27;: -1,
                     u&#x27;timestamp&#x27;: u&#x27;2013-04-19 17:43:17&#x27;,
                     u&#x27;utctimestamp&#x27;: u&#x27;2013-04-19 15:43:17+00:00&#x27;}],
       u&#x27;repository&#x27;: {u&#x27;absolute_url&#x27;: u&#x27;/mg/post-test/&#x27;,
                       u&#x27;fork&#x27;: False,
                       u&#x27;is_private&#x27;: False,
                       u&#x27;name&#x27;: u&#x27;post-test&#x27;,
                       u&#x27;owner&#x27;: u&#x27;mg&#x27;,
                       u&#x27;scm&#x27;: u&#x27;hg&#x27;,
                       u&#x27;slug&#x27;: u&#x27;post-test&#x27;,
                       u&#x27;website&#x27;: u&#x27;&#x27;},
       u&#x27;truncated&#x27;: False,
       u&#x27;user&#x27;: u&#x27;mg&#x27;}
      

      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.

      Attachments

        Activity

          People

            6995b9ed1710 evzijst
            e07804f3a382 mg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: