Issue #8178 resolved

Compare API endpoint

Ron Cohen
created an issue

I was looking for the BitBucket compare API endpoint, and found this:

From what i can tell, the call is actually implemented despite the lacking documentation. There are some oddities in the response which leads me to belive the implementation is not completed.

Diffs look like repr of python objects: "diff": "<HgDiff a61d18b9db51:3b3ee9df3977 ['demos/template/content/templates-tenjin/membership/signup.html']>"

Reproduce like this: curl -v

It would be great to know if BitBucket is committed to supporting this endpoint?

Comments (6)

  1. Erik van Zijst staff

    That endpoint is not public, but is used as the backend part of our compare view UI. It implements only what we need for that page and is subject to change as we change the compare view.

    You could nonetheless use it, but it could change or be removed entirely in the future.

    Fortunately we're working on a new API that, among other things, can produce diffs and patches for arbitrary revspecs, compatible with what's supported in the UI.

    This new API does not produce JSON-formatted objects though, but simply the raw diff and so depending on what you want to do with it, you might need to parse it first.

    Keep an eye on our blog.

  2. Ron Cohen reporter

    Ideally, I would get back a list of commits that makes up the diff, as the current endpoint does. Will that be possible with the v2 endpoint?

  3. Log in to comment