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

Incorrect diffstat api result for changed files (Mercurial)

    XMLWordPrintable

Details

    Description

      After executing https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/diffstat/d222fa2..e174964

      Result

      #!json
      
      {
        "pagelen": 500,
        "values": [
          {
            "status": "modified",
            "old": {
              "path": "setup.py",
              "type": "commit_file",
              "links": {
                "self": {
                  "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/e1749643d655d7c7014001a6c0f58abaf42ad850/setup.py"
                }
              }
            },
            "lines_removed": 1,
            "lines_added": 2,
            "new": {
              "path": "setup.py",
              "type": "commit_file",
              "links": {
                "self": {
                  "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/6aac8f0c4735789eb491b585d34189ea1adafb04/setup.py"
                }
              }
            },
            "type": "diffstat"
          }
        ],
        "page": 1,
        "size": 1
      }
      

      The 'href' of the new file points to

      #!html
      
      https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/6aac8f0c4735789eb491b585d34189ea1adafb04/setup.py
      

      When we access this url, we get

      #!json
      {"type":"error","error":{"message":"Changeset not found."}}
      
      

      Clearly the sha1/commit id in the response url for new files list is incorrect.

      Attachments

        Activity

          People

            Unassigned Unassigned
            49b619073144 Ankit Oswal
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: