Bitbucket Data Center: "You are attempting to modify a pull request based on out-of-date information"
Bitbucket Data Center (formerly Bitbucket Server) gives every pull request a version number, and a change such as a merge or a decline names the version it was based on. When the pull request has been updated since, Bitbucket refuses the change with this message instead of applying it to something the requester did not see. It is not a permission problem and not a merge conflict: the usual fix is to read the pull request again and repeat the action, after a look at what changed.
The answer
HTTP/1.1 409 Conflict
Content-Type: application/json
{"errors": [{"message": "You are attempting to modify a pull request based on out-of-date information.",
"exceptionName": "com.atlassian.bitbucket.pull.PullRequestOutOfDateException",
"currentVersion": 14, "expectedVersion": 12, ...}]}
currentVersionis the server's version of the pull request,expectedVersionthe one the request named. The numbers above are from a public bug report (BSERV-11108). Atlassian's knowledge base article showsexpectedVersion-1, and the class under its older name,com.atlassian.stash.pull.PullRequestOutOfDateException.- Atlassian's REST API definition (Bitbucket 9.4) lists 409 for it on merge ("The specified version is out of date") and on decline ("has been updated since the version specified by the request"). Atlassian's API reference describes the exception as "thrown when a PullRequest's version is out-of-date".
- Not reproduced here: we have no Data Center server. The body shows the parts the reports quote, in Bitbucket's error format.
When it happens
- A script that does not send the version. The REST API's
versionparameter defaults to -1, which matches no pull request. Atlassian's knowledge base article Bitbucket Server REST API for merging Pull Request fails gives this as the cause of a refusedPOST …/merge. - Quick actions in the web interface. BSERV-20504 (July 2026; Bitbucket 9.4.22, 10.2.5 and 10.4.1): adding yourself as a reviewer, approving and merging in quick succession ends with this message. Atlassian's workaround: refresh the pull request and merge again.
- Declining twice. BSERV-11108 (2018; Bitbucket 5.12 and 5.13): declining, reopening and declining again. The workaround: refresh the page.
- Someone else updated it. The author, another reviewer or a tool changed the pull request (its title, description or reviewers, for example) after you loaded it, and the change you based on the old version is refused.
What to do
- In the browser: reload the pull request, look at what changed, and repeat the action.
- In a script: read the pull request first (
GET /rest/api/latest/projects/{project}/repos/{repo}/pull-requests/{id}), take itsversion, and send it:POST …/merge?version=N, and the same for…/declineand…/reopen. The API documentation says to fetch the pull request from the server before the operation and look for itsversionattribute. - Before merging with the version you just read, check that it is still the pull request you checked: a version read right before the merge passes the check for whatever the pull request has become. Compare its
fromRef.latestCommitwith the commit your review or build was based on. - For approvals, the API definition marks the
versionparameter ofPUT …/participants/{userSlug}as deprecated and says to send the last reviewed commit in the request body instead (lastReviewedCommit). Bitbucket then answers 409 when the pull request "has been updated since the last reviewed commit specified by the request".
Bitbucket pull requests in IntelliJ IDEA
Pull Request Inbox for Bitbucket, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the pull requests that wait for your review in an IDE tool window, from Bitbucket Cloud and, in beta, from Bitbucket Data Center 8.9 or later with a personal HTTP access token, sent only to that server. In Data Center it reads the pull request just before it approves, declines or merges, and sends that version. It does not stop at the version: from version 1.0.28 (merging) and 1.0.29 (approving) it compares the source branch's latest commit with the one on your screen, and when new commits came in after you opened the pull request, it does not merge or approve and reloads the pull request with them. From 1.0.30, a line comment on a file that a push changed since is not added either. The review inbox, diffs and discussions are free; approving, commenting and merging are Pro (US$1.50 a month, with a 30-day trial).
Get it on JetBrains Marketplace
Bitbucket and Atlassian are trademarks of Atlassian; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by Atlassian or JetBrains.
More: You are not permitted to access this resource (Data Center) · Bitbucket's diff limits · Bitbucket pull request plugins for IntelliJ IDEA, compared · 日本語